aboutsummaryrefslogtreecommitdiffhomepage
path: root/blas/common.h
diff options
context:
space:
mode:
authorGravatar Sameer Agarwal <sameeragarwal@google.com>2019-02-27 11:30:58 -0800
committerGravatar Sameer Agarwal <sameeragarwal@google.com>2019-02-27 11:30:58 -0800
commitc181dfb8ab0a009795858670b4236d7e64a0c79e (patch)
treed02742e47b37a092563976718c86b9584947846b /blas/common.h
parent9558f4c25f6f8dc3d5fce9379f435d23d6b79f3d (diff)
Consistently use EIGEN_BLAS_FUNC in BLAS.
Previously, for a few functions, eithe BLASFUNC or, EIGEN_CAT was being used. This change uses EIGEN_BLAS_FUNC consistently everywhere. Also introduce EIGEN_BLAS_FUNC_SUFFIX, which by default is equal to "_", this allows the user to inject a new suffix as needed.
Diffstat (limited to 'blas/common.h')
-rw-r--r--blas/common.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/blas/common.h b/blas/common.h
index 960c09cc6..a9b697842 100644
--- a/blas/common.h
+++ b/blas/common.h
@@ -166,6 +166,10 @@ T* copy_back(T* x_cpy, T* x, int n, int incx)
return x_cpy;
}
-#define EIGEN_BLAS_FUNC(X) EIGEN_CAT(SCALAR_SUFFIX,X##_)
+#ifndef EIGEN_BLAS_FUNC_SUFFIX
+#define EIGEN_BLAS_FUNC_SUFFIX _
+#endif
+
+#define EIGEN_BLAS_FUNC(X) EIGEN_CAT(SCALAR_SUFFIX, EIGEN_CAT(X, EIGEN_BLAS_FUNC_SUFFIX))
#endif // EIGEN_BLAS_COMMON_H