1#pragma version(1) 2#pragma rs java_package_name(foo) 3 4// "Divergent" = reflected code must have a runtime check for 32-bit 5// versus 64-bit target. 6 7// non-divergent 8int intVar; 9 10// non-divergent 11int intArray[10]; 12 13// non-divergent 14rs_matrix2x2 matVar; 15 16// non-divergent 17rs_matrix2x2 matArray[10]; 18 19// divergent 20rs_allocation allocVar; 21 22// divergent 23rs_allocation allocArray[10]; 24 25struct NonDivergent { 26 int i; 27 int j; 28}; 29 30struct NonDivergent ndVar; 31 32struct NonDivergent ndArray[10]; 33 34// 32-bit: 12 bytes; 64-bit: 48 bytes 35struct Divergent { 36 int i; 37 rs_allocation a; 38 int j; 39}; 40 41struct Divergent dVar; 42 43struct Divergent dArray[10]; 44 45// 32-bit: 20 bytes; 64-bit: 64 bytes 46struct DivergentNest { 47 int x; 48 struct Divergent d; 49 int y; 50}; 51 52#if 0 53 54// TODO: Add these variables back once http://b/65210157 is fixed 55 56struct DivergentNest dnVar; 57 58struct DivergentNest dnArray[10]; 59 60#endif 61 62void intFe(const int *in, int *out, const int *data) { } 63 64void matFe(const int *in, int *out, const rs_matrix2x2 *data) { } 65 66void allocFe(const int *in, int *out, const rs_allocation *data) { } 67 68void ndFe(const int *in, int *out, const struct NonDivergent *data) { } 69 70void dFe(const int *in, int *out, const struct Divergent *data) { } 71 72void dnFe(const int *in, int *out, const struct DivergentNest *data) { } 73 74// for arguments, should get a helper struct that looks like struct NonDivergent 75void ndInv(int i, int j) { } 76 77// for arguments, should get a helper struct that looks like struct Divergent 78void dInv(int i, rs_allocation a, int j) { (void)a; } 79 80// for arguments, should get a helper struct that looks like struct DivergentNest 81void dnInv(int x, struct Divergent d, int y) { (void)d; } 82