1 // 2 // Copyright (c) 2017 The Khronos Group Inc. 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 #ifndef TEST_CONFIG_H 17 #define TEST_CONFIG_H 18 19 #include <CL/cl.h> 20 21 #define MULTITHREAD 1 22 23 #define kVectorSizeCount 5 24 #define kStrangeVectorSizeCount 1 25 #define kMinVectorSize 0 26 #define kLargestVectorSize (1 << (kVectorSizeCount-1)) 27 28 #define kLastVectorSizeToTest (kVectorSizeCount + kStrangeVectorSizeCount) 29 30 #define BUFFER_SIZE ((size_t)2 * 1024 * 1024) 31 32 extern size_t getBufferSize(cl_device_id device_id); 33 extern cl_ulong getBufferCount(cl_device_id device_id, size_t vecSize, size_t typeSize); 34 // could call 35 // CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 36 #define kPageSize 4096 37 38 extern int g_arrVecSizes[kVectorSizeCount+kStrangeVectorSizeCount]; 39 extern int g_arrVecAligns[kLargestVectorSize+1]; 40 41 #endif /* TEST_CONFIG_H */ 42 43 44