// // Copyright (c) 2017 The Khronos Group Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // #include #include #include #if !defined (_WIN32) #include #if defined(__APPLE__) #include #endif #include #include #endif #include "harness/testHarness.h" #include "harness/mingw_compat.h" #include "harness/parseParameters.h" #if defined (__MINGW32__) #include #endif #include "cl_utils.h" #include "tests.h" const char ** argList = NULL; size_t argCount = 0; char appName[64] = "ctest"; const char *addressSpaceNames[AS_NumAddressSpaces] = {"global", "private", "local", "constant"}; #pragma mark - #pragma mark Declarations static int ParseArgs( int argc, const char **argv ); static void PrintUsage( void ); int g_arrVecSizes[kVectorSizeCount+kStrangeVectorSizeCount]; int g_arrVecAligns[kLargestVectorSize+1]; static int arrStrangeVecSizes[kStrangeVectorSizeCount] = {3}; test_definition test_list[] = { ADD_TEST( vload_half ), ADD_TEST( vloada_half ), ADD_TEST( vstore_half ), ADD_TEST( vstorea_half ), ADD_TEST( vstore_half_rte ), ADD_TEST( vstorea_half_rte ), ADD_TEST( vstore_half_rtz ), ADD_TEST( vstorea_half_rtz ), ADD_TEST( vstore_half_rtp ), ADD_TEST( vstorea_half_rtp ), ADD_TEST( vstore_half_rtn ), ADD_TEST( vstorea_half_rtn ), ADD_TEST( roundTrip ), }; const int test_num = ARRAY_SIZE( test_list ); int main (int argc, const char **argv ) { int error; int i; int alignbound; for(i = 0; i < kVectorSizeCount; ++i) { g_arrVecSizes[i] = (1<\n", appName ); vlog( "\t\t-d\tToggle double precision testing (default: on if double supported)\n" ); vlog( "\t\t-t\tToggle reporting performance data.\n" ); vlog( "\t\t-w\tRun in wimpy mode\n" ); vlog( "\t\t-[2^n]\tSet wimpy reduction factor, recommended range of n is 1-12, default factor(%u)\n", gWimpyReductionFactor); vlog( "\t\t-h\tHelp\n" ); for( int i = 0; i < test_num; i++ ) { vlog("\t\t%s\n", test_list[i].name ); } }