Merge "1. fp_mad.rs: Pass C99 check. 2. Include C99 header (Will be fixed later at build.git.)" into honeycomb
This commit is contained in:
committed by
Android (Google) Code Review
commit
b25de0558c
@@ -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;
|
||||
|
||||
@@ -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*/,
|
||||
|
||||
@@ -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) { \
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
#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;
|
||||
|
||||
Reference in New Issue
Block a user