1 // SPDX-License-Identifier: Apache-2.0
3 * Copyright (C) 2020 Jijoong Moon <jijoong.moon@samsung.com>
5 * @file blas_interface.h
7 * @see https://github.com/nnstreamer/nntrainer
8 * @author Jijoong Moon <jijoong.moon@samsung.com>
9 * @bug No known bugs except for NYI items
10 * @brief This is dummy header for blas support
14 #ifndef __BLAS_INTERFACE_H_
15 #define __BLAS_INTERFACE_H_
23 enum CBLAS_ORDER { CblasRowMajor = 101, CblasColMajor = 102 };
25 enum CBLAS_TRANSPOSE {
33 #include <helper_cuda.h>
34 #include <helper_functions.h>
39 /* TODO : need to scopy, sscal, snrm2 */
40 void sscal(const int N, const float alpha, float *X, const int incX);
42 float snrm2(const int N, const float *X, const int incX);
44 void scopy(const unsigned int N, const float *X, const int incX, float *Y,
47 void saxpy(const unsigned int N, const float alpha, const float *X,
48 const int incX, float *Y, const int incY);
50 void sgemm(CBLAS_ORDER order, CBLAS_TRANSPOSE TransA, CBLAS_TRANSPOSE TransB,
51 const unsigned int M, const unsigned int N, const unsigned int K,
52 const float alpha, const float *A, const unsigned int lda,
53 const float *B, const unsigned int ldb, const float beta, float *C,
54 const unsigned int ldc);
56 void sgemv(CBLAS_ORDER order, CBLAS_TRANSPOSE TransA, const unsigned int M,
57 const unsigned int N, const float alpha, const float *A,
58 const unsigned int lda, const float *X, const int incX,
59 const float beta, float *Y, const int incY);
61 } /* namespace nntrainer */
62 #endif /* __cplusplus */
63 #endif /* __BLAS_INTERFACE_H__ */