Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b25de055 authored by Shih-wei Liao's avatar Shih-wei Liao Committed by Android (Google) Code Review
Browse files

Merge "1. fp_mad.rs: Pass C99 check. 2. Include C99 header (Will be fixed...

Merge "1. fp_mad.rs: Pass C99 check. 2. Include C99 header (Will be fixed later at build.git.)" into honeycomb
parents 7f447de2 1ad9612e
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -102,7 +102,8 @@ static void test_clamp(uint32_t index) {
    start();

    // Do ~100 M ops
    for (int ct=0; ct < 1000 * 100; ct++) {
    int ct;
    for (ct=0; ct < 1000 * 100; ct++) {
        for (int i=0; i < (1000); i++) {
            data_f1[i] = clamp(data_f1[i], -1.f, 1.f);
        }
@@ -129,7 +130,8 @@ static void test_clamp4(uint32_t index) {

    float total = 0;
    // Do ~100 M ops
    for (int ct=0; ct < 1000 * 100 /4; ct++) {
    int ct;
    for (ct=0; ct < 1000 * 100 /4; ct++) {
        for (int i=0; i < (1000); i++) {
            data_f4[i] = clamp(data_f4[i], -1.f, 1.f);
        }
@@ -140,7 +142,8 @@ static void test_clamp4(uint32_t index) {
}

void fp_mad_test(uint32_t index, int test_num) {
    for (int x=0; x < 1025; x++) {
    int x;
    for (x=0; x < 1025; x++) {
        data_f1[x] = (x & 0xf) * 0.1f;
        data_f4[x].x = (x & 0xf) * 0.1f;
        data_f4[x].y = (x & 0xf0) * 0.1f;
+1 −1
Original line number Diff line number Diff line
@@ -485,7 +485,7 @@ void ScriptCState::runCompiler(Context *rsc,
        // Handle Fatal Error
    }

#if 0
#if 1
    if (bccLinkBC(s->mBccScript,
                  resName,
                  NULL /*rs_runtime_lib_bc*/,
+0 −2
Original line number Diff line number Diff line
@@ -7,8 +7,6 @@
#define _RS_STATIC  static
#endif

#define M_PI        3.14159265358979323846264338327950288f   /* pi */

// Conversions
#define CVT_FUNC_2(typeout, typein) \
_RS_STATIC typeout##2 __attribute__((overloadable)) convert_##typeout##2(typein##2 v) { \
+8 −0
Original line number Diff line number Diff line
#ifndef __RS_TYPES_RSH__
#define __RS_TYPES_RSH__

#define M_PI        3.14159265358979323846264338327950288f   /* pi */

//#include "external/clang/lib/Headers/stdbool.h"
#define bool _Bool
#define true 1
#define false 0
#define __bool_true_false_are_defined 1

typedef char int8_t;
typedef short int16_t;
typedef int int32_t;