diff --git a/test_conformance/basic/utils.h b/test_common/harness/stringHelpers.h similarity index 88% rename from test_conformance/basic/utils.h rename to test_common/harness/stringHelpers.h index 6409efcde..3f6bf64db 100644 --- a/test_conformance/basic/utils.h +++ b/test_common/harness/stringHelpers.h @@ -20,10 +20,6 @@ #include #include -#include - -extern cl_half_rounding_mode halfRoundingMode; - inline std::string concat_kernel(const char *sstr[], int num) { std::string res; @@ -42,7 +38,4 @@ inline std::string str_sprintf(const std::string &str, Args... args) return std::string(buffer.get(), buffer.get() + s - 1); } -#define HFF(num) cl_half_from_float(num, halfRoundingMode) -#define HTF(num) cl_half_to_float(num) - #endif // BASIC_UTIL_H diff --git a/test_conformance/basic/test_astype.cpp b/test_conformance/basic/test_astype.cpp index 08a4cb85a..45669a7cb 100644 --- a/test_conformance/basic/test_astype.cpp +++ b/test_conformance/basic/test_astype.cpp @@ -14,6 +14,9 @@ // limitations under the License. // #include "harness/compat.h" +#include "harness/conversions.h" +#include "harness/stringHelpers.h" +#include "harness/typeWrappers.h" #include #include @@ -22,11 +25,7 @@ #include #include -#include "harness/conversions.h" -#include "harness/typeWrappers.h" - #include "procs.h" -#include "utils.h" // clang-format off diff --git a/test_conformance/basic/test_vloadstore.cpp b/test_conformance/basic/test_vloadstore.cpp index b6c2b93fb..c2f7399e1 100644 --- a/test_conformance/basic/test_vloadstore.cpp +++ b/test_conformance/basic/test_vloadstore.cpp @@ -22,24 +22,29 @@ #include #include +#include + #include "procs.h" #include "harness/conversions.h" -#include "harness/typeWrappers.h" #include "harness/errorHelpers.h" - -#include "utils.h" +#include "harness/stringHelpers.h" +#include "harness/typeWrappers.h" // Outputs debug information for stores #define DEBUG 0 // Forces stores/loads to be done with offsets = tid #define LINEAR_OFFSETS 0 #define NUM_LOADS 512 +#define HFF(num) cl_half_from_float(num, halfRoundingMode) +#define HTF(num) cl_half_to_float(num) char pragma_str[128] = { 0 }; char mem_type[64] = { 0 }; char store_str[128] = { 0 }; char load_str[128] = { 0 }; +extern cl_half_rounding_mode halfRoundingMode; + // clang-format off static const char *store_pattern= "results[ tid ] = tmp;\n"; static const char *store_patternV3 = "results[3*tid] = tmp.s0; results[3*tid+1] = tmp.s1; results[3*tid+2] = tmp.s2;\n";