summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2016-05-26 23:36:19 +0200
committerCedric Nugteren <web@cedricnugteren.nl>2016-05-26 23:36:19 +0200
commit03182f9d07533f795a498936391da744d982e8e2 (patch)
tree3a73046809927abd1000fe3309f37787d1791976 /include
parentb487d4dd44179293c9e08ddf2ce3ed902fa749c8 (diff)
Added half-precision tests for the clBLAS reference through conversion to single-precision
Diffstat (limited to 'include')
-rw-r--r--include/internal/utilities.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/internal/utilities.h b/include/internal/utilities.h
index be7a77b4..d3c8ebdb 100644
--- a/include/internal/utilities.h
+++ b/include/internal/utilities.h
@@ -213,6 +213,16 @@ void PopulateVector(std::vector<T> &vector);
// =================================================================================================
+// Conversion between half and single-precision
+std::vector<float> HalfToFloatBuffer(const std::vector<half>& source);
+void FloatToHalfBuffer(std::vector<half>& result, const std::vector<float>& source);
+
+// As above, but now for OpenCL data-types instead of std::vectors
+Buffer<float> HalfToFloatBuffer(const Buffer<half>& source, cl_command_queue queue_raw);
+void FloatToHalfBuffer(Buffer<half>& result, const Buffer<float>& source, cl_command_queue queue_raw);
+
+// =================================================================================================
+
// Rounding functions
size_t CeilDiv(const size_t x, const size_t y);
size_t Ceil(const size_t x, const size_t y);