summaryrefslogtreecommitdiff
path: root/include/clblast_c.h
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2017-02-16 21:14:48 +0100
committerCedric Nugteren <web@cedricnugteren.nl>2017-02-16 21:14:48 +0100
commitcda449a5c39041b2a0e6893ee254e145447b78ca (patch)
tree3b4f18b497df26960dd72dd297a80421861e2a53 /include/clblast_c.h
parent08bfb75a9d72b6b373d8f18e8be83fe4ea31015b (diff)
Added a C interface to the OverrideParameters function; added some in-line comments to the API
Diffstat (limited to 'include/clblast_c.h')
-rw-r--r--include/clblast_c.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/clblast_c.h b/include/clblast_c.h
index 72f50d83..cd657f3b 100644
--- a/include/clblast_c.h
+++ b/include/clblast_c.h
@@ -96,6 +96,8 @@ typedef enum CLBlastStatusCode_ {
CLBlastInsufficientMemoryY = -1007, // Vector Y's OpenCL buffer is too small
// Custom additional status codes for CLBlast
+ CLBlastInvalidOverrideKernel = -2048, // Trying to override parameters for an invalid kernel
+ CLBlastMissingOverrideParameter = -2047, // Missing override parameter(s) for the target kernel
CLBlastInvalidLocalMemUsage = -2046, // Not enough local memory available on this device
CLBlastNoHalfPrecision = -2045, // Half precision (16-bits) not supported by the device
CLBlastNoDoublePrecision = -2044, // Double precision (64-bits) not supported by the device
@@ -117,6 +119,11 @@ typedef enum CLBlastDiagonal_ { CLBlastDiagonalNonUnit = 131,
CLBlastDiagonalUnit = 132 } CLBlastDiagonal;
typedef enum CLBlastSide_ { CLBlastSideLeft = 141, CLBlastSideRight = 142 } CLBlastSide;
+// Precision enum (values in bits)
+typedef enum CLBlastPrecision_ { CLBlastPrecisionHalf = 16, CLBlastPrecisionSingle = 32,
+ CLBlastPrecisionDouble = 64, CLBlastPrecisionComplexSingle = 3232,
+ CLBlastPrecisionComplexDouble = 6464 } CLBlastPrecision;
+
// =================================================================================================
// BLAS level-1 (vector-vector) routines
// =================================================================================================
@@ -1338,6 +1345,15 @@ CLBlastStatusCode PUBLIC_API CLBlastFillCache(const cl_device_id device);
// =================================================================================================
+// Overrides tuning parameters for a specific device-precision-routine combination. The next time
+// (and all further times) the target routine is called it will re-compile and use the new
+// parameters.
+CLBlastStatusCode PUBLIC_API OverrideParameters(const cl_device_id device, const char* kernel_name,
+ const CLBlastPrecision precision, const size_t num_parameters,
+ const char** parameters_names, const size_t* parameters_values);
+
+// =================================================================================================
+
#ifdef __cplusplus
} // extern "C"
#endif