-
Notifications
You must be signed in to change notification settings - Fork 550
Expand file tree
/
Copy pathblas.cpp
More file actions
47 lines (40 loc) · 1.64 KB
/
blas.cpp
File metadata and controls
47 lines (40 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*******************************************************
* Copyright (c) 2015, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
********************************************************/
#include <af/blas.h>
#include "symbol_manager.hpp"
AFAPI af_err af_gemm(af_array *out, const af_mat_prop optLhs,
const af_mat_prop optRhs, const void *alpha,
const af_array lhs, const af_array rhs, const void *beta) {
CHECK_ARRAYS(out, lhs, rhs);
CALL(af_gemm, out, optLhs, optRhs, alpha, lhs, rhs, beta);
}
af_err af_matmul(af_array *out, const af_array lhs, const af_array rhs,
const af_mat_prop optLhs, const af_mat_prop optRhs) {
CHECK_ARRAYS(lhs, rhs);
CALL(af_matmul, out, lhs, rhs, optLhs, optRhs);
}
af_err af_dot(af_array *out, const af_array lhs, const af_array rhs,
const af_mat_prop optLhs, const af_mat_prop optRhs) {
CHECK_ARRAYS(lhs, rhs);
CALL(af_dot, out, lhs, rhs, optLhs, optRhs);
}
af_err af_dot_all(double *rval, double *ival, const af_array lhs,
const af_array rhs, const af_mat_prop optLhs,
const af_mat_prop optRhs) {
CHECK_ARRAYS(lhs, rhs);
CALL(af_dot_all, rval, ival, lhs, rhs, optLhs, optRhs);
}
af_err af_transpose(af_array *out, af_array in, const bool conjugate) {
CHECK_ARRAYS(in);
CALL(af_transpose, out, in, conjugate);
}
af_err af_transpose_inplace(af_array in, const bool conjugate) {
CHECK_ARRAYS(in);
CALL(af_transpose_inplace, in, conjugate);
}