diff options
-rw-r--r-- | include/clblast_blas.h | 20 | ||||
-rw-r--r-- | scripts/generator/generator/routine.py | 4 | ||||
-rw-r--r-- | src/clblast_blas.cpp | 20 | ||||
-rw-r--r-- | src/utilities/utilities.cpp | 4 |
4 files changed, 26 insertions, 22 deletions
diff --git a/include/clblast_blas.h b/include/clblast_blas.h index 927f84cd..ff560712 100644 --- a/include/clblast_blas.h +++ b/include/clblast_blas.h @@ -581,24 +581,24 @@ void PUBLIC_API cblas_zgerc(const CLBlastLayout layout, // Hermitian rank-1 matrix update: CHER/ZHER void PUBLIC_API cblas_cher(const CLBlastLayout layout, const CLBlastTriangle triangle, const int n, - const void* alpha, + const float alpha, const void* x, const int x_inc, void* a, const int a_ld); void PUBLIC_API cblas_zher(const CLBlastLayout layout, const CLBlastTriangle triangle, const int n, - const void* alpha, + const double alpha, const void* x, const int x_inc, void* a, const int a_ld); // Hermitian packed rank-1 matrix update: CHPR/ZHPR void PUBLIC_API cblas_chpr(const CLBlastLayout layout, const CLBlastTriangle triangle, const int n, - const void* alpha, + const float alpha, const void* x, const int x_inc, void* ap); void PUBLIC_API cblas_zhpr(const CLBlastLayout layout, const CLBlastTriangle triangle, const int n, - const void* alpha, + const double alpha, const void* x, const int x_inc, void* ap); @@ -791,15 +791,15 @@ void PUBLIC_API cblas_zsyrk(const CLBlastLayout layout, const CLBlastTriangle tr // Rank-K update of a hermitian matrix: CHERK/ZHERK void PUBLIC_API cblas_cherk(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const int n, const int k, - const void* alpha, + const float alpha, const void* a, const int a_ld, - const void* beta, + const float beta, void* c, const int c_ld); void PUBLIC_API cblas_zherk(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const int n, const int k, - const void* alpha, + const double alpha, const void* a, const int a_ld, - const void* beta, + const double beta, void* c, const int c_ld); // Rank-2K update of a symmetric matrix: SSYR2K/DSYR2K/CSYR2K/ZSYR2K/HSYR2K @@ -838,14 +838,14 @@ void PUBLIC_API cblas_cher2k(const CLBlastLayout layout, const CLBlastTriangle t const void* alpha, const void* a, const int a_ld, const void* b, const int b_ld, - const void* beta, + const float beta, void* c, const int c_ld); void PUBLIC_API cblas_zher2k(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose ab_transpose, const int n, const int k, const void* alpha, const void* a, const int a_ld, const void* b, const int b_ld, - const void* beta, + const double beta, void* c, const int c_ld); // Triangular matrix-matrix multiplication: STRMM/DTRMM/CTRMM/ZTRMM/HTRMM diff --git a/scripts/generator/generator/routine.py b/scripts/generator/generator/routine.py index c35f5b4c..085845a8 100644 --- a/scripts/generator/generator/routine.py +++ b/scripts/generator/generator/routine.py @@ -341,9 +341,9 @@ class Routine: """Retrieves the definition of a scalar (alpha/beta) but make it a void pointer in case of non-standard types""" if name in self.scalars: if name == "alpha": - data_type = "void*" if flavour.is_non_standard() else flavour.alpha_cpp + data_type = "void*" if flavour.is_complex("alpha") else flavour.alpha_cpp return ["const " + data_type + " " + name] - data_type = "void*" if flavour.is_non_standard() else flavour.beta_cpp + data_type = "void*" if flavour.is_complex("beta") else flavour.beta_cpp return ["const " + data_type + " " + name] return [] diff --git a/src/clblast_blas.cpp b/src/clblast_blas.cpp index 974dc21a..9b59a20d 100644 --- a/src/clblast_blas.cpp +++ b/src/clblast_blas.cpp @@ -2974,7 +2974,7 @@ void cblas_zgerc(const CLBlastLayout layout, // HER void cblas_cher(const CLBlastLayout layout, const CLBlastTriangle triangle, const int n, - const void* alpha, + const float alpha, const void* x, const int x_inc, void* a, const int a_ld) { auto device = get_device(); @@ -3002,7 +3002,7 @@ void cblas_cher(const CLBlastLayout layout, const CLBlastTriangle triangle, } void cblas_zher(const CLBlastLayout layout, const CLBlastTriangle triangle, const int n, - const void* alpha, + const double alpha, const void* x, const int x_inc, void* a, const int a_ld) { auto device = get_device(); @@ -3032,7 +3032,7 @@ void cblas_zher(const CLBlastLayout layout, const CLBlastTriangle triangle, // HPR void cblas_chpr(const CLBlastLayout layout, const CLBlastTriangle triangle, const int n, - const void* alpha, + const float alpha, const void* x, const int x_inc, void* ap) { auto device = get_device(); @@ -3060,7 +3060,7 @@ void cblas_chpr(const CLBlastLayout layout, const CLBlastTriangle triangle, } void cblas_zhpr(const CLBlastLayout layout, const CLBlastTriangle triangle, const int n, - const void* alpha, + const double alpha, const void* x, const int x_inc, void* ap) { auto device = get_device(); @@ -3988,9 +3988,9 @@ void cblas_zsyrk(const CLBlastLayout layout, const CLBlastTriangle triangle, con // HERK void cblas_cherk(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const int n, const int k, - const void* alpha, + const float alpha, const void* a, const int a_ld, - const void* beta, + const float beta, void* c, const int c_ld) { auto device = get_device(); auto context = Context(device); @@ -4020,9 +4020,9 @@ void cblas_cherk(const CLBlastLayout layout, const CLBlastTriangle triangle, con } void cblas_zherk(const CLBlastLayout layout, const CLBlastTriangle triangle, const CLBlastTranspose a_transpose, const int n, const int k, - const void* alpha, + const double alpha, const void* a, const int a_ld, - const void* beta, + const double beta, void* c, const int c_ld) { auto device = get_device(); auto context = Context(device); @@ -4207,7 +4207,7 @@ void cblas_cher2k(const CLBlastLayout layout, const CLBlastTriangle triangle, co const void* alpha, const void* a, const int a_ld, const void* b, const int b_ld, - const void* beta, + const float beta, void* c, const int c_ld) { auto device = get_device(); auto context = Context(device); @@ -4244,7 +4244,7 @@ void cblas_zher2k(const CLBlastLayout layout, const CLBlastTriangle triangle, co const void* alpha, const void* a, const int a_ld, const void* b, const int b_ld, - const void* beta, + const double beta, void* c, const int c_ld) { auto device = get_device(); auto context = Context(device); diff --git a/src/utilities/utilities.cpp b/src/utilities/utilities.cpp index b4a18311..24456252 100644 --- a/src/utilities/utilities.cpp +++ b/src/utilities/utilities.cpp @@ -151,6 +151,10 @@ std::string ToString(Precision value) { case Precision::kComplexDouble: return ToString(static_cast<int>(value))+" (complex-double)"; } } +template <> +std::string ToString(StatusCode value) { + return std::to_string(static_cast<int>(value)); +} // ================================================================================================= |