am b25de055: Merge "1. fp_mad.rs: Pass C99 check. 2. Include C99 header (Will be fixed later at build.git.)" into honeycomb

* commit 'b25de0558c4e5440982db53a220943a899390c90':
  1. fp_mad.rs: Pass C99 check. 2. Include C99 header (Will be fixed later at build.git.)
This commit is contained in:
Shih-wei Liao
2011-01-19 02:25:25 -08:00
committed by Android Git Automerger
4 changed files with 15 additions and 6 deletions

View File

@@ -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;

View File

@@ -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*/,

View File

@@ -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) { \

View File

@@ -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;