mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
32 lines
1.3 KiB
C
32 lines
1.3 KiB
C
#ifndef BLAS_H
|
|
#define BLAS_H
|
|
void pm(int M, int N, float *A);
|
|
float *random_matrix(int rows, int cols);
|
|
void time_random_matrix(int TA, int TB, int m, int k, int n);
|
|
|
|
void test_blas();
|
|
|
|
void const_cpu(int N, float ALPHA, float *X, int INCX);
|
|
void pow_cpu(int N, float ALPHA, float *X, int INCX, float *Y, int INCY);
|
|
void mul_cpu(int N, float *X, int INCX, float *Y, int INCY);
|
|
|
|
void axpy_cpu(int N, float ALPHA, float *X, int INCX, float *Y, int INCY);
|
|
void copy_cpu(int N, float *X, int INCX, float *Y, int INCY);
|
|
void scal_cpu(int N, float ALPHA, float *X, int INCX);
|
|
float dot_cpu(int N, float *X, int INCX, float *Y, int INCY);
|
|
void test_gpu_blas();
|
|
|
|
#ifdef GPU
|
|
void axpy_ongpu(int N, float ALPHA, float * X, int INCX, float * Y, int INCY);
|
|
void axpy_ongpu_offset(int N, float ALPHA, float * X, int OFFX, int INCX, float * Y, int OFFY, int INCY);
|
|
void copy_ongpu(int N, float * X, int INCX, float * Y, int INCY);
|
|
void copy_ongpu_offset(int N, float * X, int OFFX, int INCX, float * Y, int OFFY, int INCY);
|
|
void scal_ongpu(int N, float ALPHA, float * X, int INCX);
|
|
void mask_ongpu(int N, float * X, float mask_num, float * mask);
|
|
void const_ongpu(int N, float ALPHA, float *X, int INCX);
|
|
void pow_ongpu(int N, float ALPHA, float *X, int INCX, float *Y, int INCY);
|
|
void mul_ongpu(int N, float *X, int INCX, float *Y, int INCY);
|
|
|
|
#endif
|
|
#endif
|