Skip to content

Commit

Permalink
Moved string helper procedures due to request for test_commonfns PR K…
Browse files Browse the repository at this point in the history
  • Loading branch information
shajder committed Jun 12, 2023
1 parent 7e65206 commit 16719f1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@

#include <memory>
#include <string>
#include <CL/cl_half.h>

extern cl_half_rounding_mode halfRoundingMode;

inline std::string concat_kernel(const char *sstr[], int num)
{
Expand All @@ -41,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
7 changes: 3 additions & 4 deletions test_conformance/basic/test_astype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <limits.h>
#include <stdio.h>
Expand All @@ -22,11 +25,7 @@
#include <sys/stat.h>
#include <vector>

#include "harness/conversions.h"
#include "harness/typeWrappers.h"

#include "procs.h"
#include "utils.h"

// clang-format off

Expand Down
7 changes: 6 additions & 1 deletion test_conformance/basic/test_int2fp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "CL/cl_half.h"
#include "harness/compat.h"
#include "harness/errorHelpers.h"
#include "harness/stringHelpers.h"

#include <stdio.h>
#include <stdlib.h>
Expand All @@ -28,7 +29,11 @@
#include <vector>

#include "procs.h"
#include "utils.h"

extern cl_half_rounding_mode halfRoundingMode;

#define HFF(num) cl_half_from_float(num, halfRoundingMode)
#define HTF(num) cl_half_to_float(num)

namespace {
const char *int2float_kernel_code = R"(
Expand Down

0 comments on commit 16719f1

Please sign in to comment.