1 /* 2 * Copyright (C) 2013 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #pragma version(1) 18 #pragma rs java_package_name(com.android.rs.typecheck) 19 #pragma rs_fp_relaxed 20 21 // Test initialized and uninitialized variables 22 char c1; 23 char c1i = 1; 24 char2 c2; 25 char2 c2i = {1, 2}; 26 char3 c3; 27 char3 c3i = {1, 2, 3}; 28 char4 c4; 29 char4 c4i = {1, 2, 3, 4}; 30 31 uchar uc1; 32 uchar uc1i = 1; 33 uchar2 uc2; 34 uchar2 uc2i = {1, 2}; 35 uchar3 uc3; 36 uchar3 uc3i = {1, 2, 3}; 37 uchar4 uc4; 38 uchar4 uc4i = {1, 2, 3, 4}; 39 40 short s1; 41 short s1i = 1; 42 short2 s2; 43 short2 s2i = {1, 2}; 44 short3 s3; 45 short3 s3i = {1, 2, 3}; 46 short4 s4; 47 short4 s4i = {1, 2, 3, 4}; 48 49 ushort us1; 50 ushort us1i = 1; 51 ushort2 us2; 52 ushort2 us2i = {1, 2}; 53 ushort3 us3; 54 ushort3 us3i = {1, 2, 3}; 55 ushort4 us4; 56 ushort4 us4i = {1, 2, 3, 4}; 57 58 int i1; 59 int i1i = 1; 60 int2 i2; 61 int2 i2i = {1, 2}; 62 int3 i3; 63 int3 i3i = {1, 2, 3}; 64 int4 i4; 65 int4 i4i = {1, 2, 3, 4}; 66 67 uint ui1; 68 uint ui1i = 1; 69 uint2 ui2; 70 uint2 ui2i = {1, 2}; 71 uint3 ui3; 72 uint3 ui3i = {1, 2, 3}; 73 uint4 ui4; 74 uint4 ui4i = {1, 2, 3, 4}; 75 76 long l1; 77 long l1i = 1; 78 long2 l2; 79 long2 l2i = {1, 2}; 80 long3 l3; 81 long3 l3i = {1, 2, 3}; 82 long4 l4; 83 long4 l4i = {1, 2, 3, 4}; 84 85 ulong ul1; 86 ulong ul1i = 1; 87 ulong2 ul2; 88 ulong2 ul2i = {1, 2}; 89 ulong3 ul3; 90 ulong3 ul3i = {1, 2, 3}; 91 ulong4 ul4; 92 ulong4 ul4i = {1, 2, 3, 4}; 93 94 float f1; 95 float f1i = 3.141592265358979f; 96 float2 f2; 97 float2 f2i = {1.f, 2.f}; 98 float3 f3; 99 float3 f3i = {1.f, 2.f, 3.f}; 100 float4 f4; 101 float4 f4i = {1.f, 2.f, 3.f, 4.f}; 102 103 double d1; 104 double d1i = 3.141592265358979; 105 double2 d2; 106 double2 d2i = {1, 2}; 107 double3 d3; 108 double3 d3i = {1, 2, 3}; 109 double4 d4; 110 double4 d4i = {1, 2, 3, 4}; 111 112 113 void __attribute__((kernel)) test_BOOLEAN(bool in) { 114 } 115 116 void __attribute__((kernel)) test_I8(char in) { 117 } 118 119 void __attribute__((kernel)) test_U8(uchar in) { 120 } 121 122 void __attribute__((kernel)) test_I16(short in) { 123 } 124 125 void __attribute__((kernel)) test_U16(ushort in) { 126 } 127 128 void __attribute__((kernel)) test_I32(int in) { 129 } 130 131 void __attribute__((kernel)) test_U32(uint in) { 132 } 133 134 void __attribute__((kernel)) test_I64(long in) { 135 } 136 137 void __attribute__((kernel)) test_U64(ulong in) { 138 } 139 140 void __attribute__((kernel)) test_F32(float in) { 141 } 142 143 void __attribute__((kernel)) test_F64(double in) { 144 } 145 146