Warning, /kdevelop/kdevelop/plugins/clang/tests/files/test.cl is written in an unsupported language. File is not indexed.
0001 #pragma OPENCL EXTENSION cl_khr_fp16 : enable 0002 #pragma OPENCL EXTENSION cl_khr_fp64 : enable 0003 #pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable 0004 #pragma OPENCL EXTENSION cl_khr_int64_extended_atomics : enable 0005 0006 typedef half half4 __attribute__((ext_vector_type(4))); 0007 typedef float float4 __attribute__((ext_vector_type(4))); 0008 typedef double double4 __attribute__((ext_vector_type(4))); 0009 0010 void kernel testFloatTypes() { 0011 /// "isAtomic" : false 0012 half scalarHalf; 0013 /// "isAtomic" : false 0014 half4 vectorHalf; 0015 /// "isAtomic" : false 0016 float scalarFloat; 0017 /// "isAtomic" : false 0018 float4 vectorFloat; 0019 /// "isAtomic" : false 0020 double scalarDouble; 0021 /// "isAtomic" : false 0022 double4 vectorDouble; 0023 } 0024 0025 /// "isVirtual" : false 0026 void kernel testFlatImageTys(image1d_t img1d, image2d_t img2d, image3d_t img3d) { 0027 } 0028 0029 /// "isVirtual" : false 0030 void kernel testImageArrays(image1d_array_t img1d, image2d_array_t img2d, image2d_array_depth_t img2da, 0031 image2d_array_msaa_t img2dmsaa, image2d_array_msaa_depth_t img2damd) { 0032 } 0033 0034 /// "isVirtual" : false 0035 void kernel testOtherImageTys(image1d_buffer_t img1d, image2d_depth_t img2ddepth, 0036 image2d_msaa_t msaa, image2d_msaa_depth_t img2ddepthmsaa) { 0037 } 0038 0039 /// "isVirtual" : false 0040 void kernel testOpaqueTys(sampler_t samplerTy) { 0041 event_t eventTy; 0042 0043 #if __OPENCL_C_VERSION__ >= 200 0044 queue_t queueTy; 0045 ndrange_t ndrangeTy; 0046 clk_event_t clkeventTy; 0047 reserve_id_t reservedIDTy; 0048 #endif 0049 } 0050 0051 #if __OPENCL_C_VERSION__ >= 200 0052 void kernel testAtomicTys() { 0053 /// "isAtomic" : true 0054 atomic_int ai; 0055 /// "isAtomic" : true 0056 atomic_uint aui; 0057 /// "isAtomic" : true 0058 atomic_long al; 0059 /// "isAtomic" : true 0060 atomic_ulong aul; 0061 /// "isAtomic" : true 0062 atomic_float af; 0063 /// "isAtomic" : true 0064 atomic_double ad; 0065 /// "isAtomic" : true 0066 atomic_intptr_t ap; 0067 /// "isAtomic" : true 0068 atomic_uintptr_t au; 0069 /// "isAtomic" : true 0070 atomic_size_t as; 0071 /// "isAtomic" : true 0072 atomic_ptrdiff_t apdt; 0073 } 0074 #endif