summaryrefslogtreecommitdiff
path: root/include/clblast.h
diff options
context:
space:
mode:
authorCNugteren <web@cedricnugteren.nl>2015-09-14 16:57:00 +0200
committerCNugteren <web@cedricnugteren.nl>2015-09-14 16:57:00 +0200
commita2e726d3bd4294f1eae1735f6ba23105dccc6b10 (patch)
tree2685c3204460a300088b13af66128cdda8e64c68 /include/clblast.h
parent2a383f34501b386b8e6c4beb56c6ac694622f060 (diff)
Added xDOT/xDOTU/xDOTC dot-product routines
Diffstat (limited to 'include/clblast.h')
-rw-r--r--include/clblast.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/clblast.h b/include/clblast.h
index 326c9ec2..72825e0b 100644
--- a/include/clblast.h
+++ b/include/clblast.h
@@ -68,6 +68,8 @@ enum class StatusCode {
kInvalidLocalMemUsage = -2046, // Not enough local memory available on this device
kNoHalfPrecision = -2045, // Half precision (16-bits) not supported by the device
kNoDoublePrecision = -2044, // Double precision (64-bits) not supported by the device
+ kInvalidVectorDot = -2043, // Vector dot is not a valid OpenCL buffer
+ kInsufficientMemoryDot = -2042, // Vector dot's OpenCL buffer is too small
};
// Matrix layout and transpose types
@@ -114,6 +116,30 @@ StatusCode Axpy(const size_t n,
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
cl_command_queue* queue, cl_event* event);
+// Dot product of two vectors: SDOT/DDOT
+template <typename T>
+StatusCode Dot(const size_t n,
+ cl_mem dot_buffer, const size_t dot_offset,
+ const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
+ const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
+ cl_command_queue* queue, cl_event* event);
+
+// Dot product of two complex vectors: CDOTU/ZDOTU
+template <typename T>
+StatusCode Dotu(const size_t n,
+ cl_mem dot_buffer, const size_t dot_offset,
+ const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
+ const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
+ cl_command_queue* queue, cl_event* event);
+
+// Dot product of two complex vectors, one conjugated: CDOTC/ZDOTC
+template <typename T>
+StatusCode Dotc(const size_t n,
+ cl_mem dot_buffer, const size_t dot_offset,
+ const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
+ const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
+ cl_command_queue* queue, cl_event* event);
+
// =================================================================================================
// BLAS level-2 (matrix-vector) routines
// =================================================================================================