Skip to content

Commit

Permalink
Remove static/inline
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidan committed Jun 14, 2024
1 parent c31b635 commit 28e098a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
10 changes: 5 additions & 5 deletions tests/unit_tests/blas/batch/gemm_batch_stride.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ template <class T>
using vec_type_t = typename vec_type<T>::type;

// Check for int32_t and Ts=float as small differences in the reference become large after rounding
inline bool check_equal_matrix_int(acc_type_t<int32_t> &M, vec_type_t<int32_t> &M_ref,
oneapi::mkl::layout layout, int m, int n, int ld, int error_mag,
std::ostream &out) {
bool check_equal_matrix_int(acc_type_t<int32_t> &M, vec_type_t<int32_t> &M_ref,
oneapi::mkl::layout layout, int m, int n, int ld, int error_mag,
std::ostream &out) {
bool good = true;
int idx, count = 0;
for (int j = 0; j < n; j++) {
Expand All @@ -93,8 +93,8 @@ inline bool check_equal_matrix_int(acc_type_t<int32_t> &M, vec_type_t<int32_t> &
}

template <typename T>
inline bool check_mat(acc_type_t<T> &M, vec_type_t<T> &M_ref, oneapi::mkl::layout layout, int m,
int n, int ld, int error_mag, std::ostream &out) {
bool check_mat(acc_type_t<T> &M, vec_type_t<T> &M_ref, oneapi::mkl::layout layout, int m, int n,
int ld, int error_mag, std::ostream &out) {
if constexpr (std::is_same<T, int32_t>::value)
return check_equal_matrix_int(M, M_ref, layout, m, n, ld, error_mag, out);
return check_equal_matrix<acc_type_t<T>>(M, M_ref, layout, m, n, ld, error_mag, out);
Expand Down
10 changes: 5 additions & 5 deletions tests/unit_tests/blas/batch/gemm_batch_stride_usm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ template <class T>
using vec_type_t = typename vec_type<T>::type;

// Check for int32_t and Ts=float as small differences in the reference become large after rounding
inline bool check_equal_matrix_int(vec_type_t<int32_t> &M, vec_type_t<int32_t> &M_ref,
oneapi::mkl::layout layout, int m, int n, int ld, int error_mag,
std::ostream &out) {
bool check_equal_matrix_int(vec_type_t<int32_t> &M, vec_type_t<int32_t> &M_ref,
oneapi::mkl::layout layout, int m, int n, int ld, int error_mag,
std::ostream &out) {
bool good = true;
int idx, count = 0;
for (int j = 0; j < n; j++) {
Expand All @@ -85,8 +85,8 @@ inline bool check_equal_matrix_int(vec_type_t<int32_t> &M, vec_type_t<int32_t> &
}

template <typename T>
inline bool check_mat(vec_type_t<T> &M, vec_type_t<T> &M_ref, oneapi::mkl::layout layout, int m,
int n, int ld, int error_mag, std::ostream &out) {
bool check_mat(vec_type_t<T> &M, vec_type_t<T> &M_ref, oneapi::mkl::layout layout, int m, int n,
int ld, int error_mag, std::ostream &out) {
if constexpr (std::is_same<T, int32_t>::value)
return check_equal_matrix_int(M, M_ref, layout, m, n, ld, error_mag, out);
return check_equal_matrix<vec_type_t<T>>(M, M_ref, layout, m, n, ld, error_mag, out);
Expand Down
9 changes: 4 additions & 5 deletions tests/unit_tests/blas/batch/gemm_batch_usm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ typename std::enable_if<std::is_integral<fp>::value, bool>::type check_equal_int
}

// Check for int32_t and Ts=float as small differences in the reference become large after rounding
static bool check_equal_matrix_int(const int32_t *M, const int32_t *M_ref,
oneapi::mkl::layout layout, int m, int n, int ld, int error_mag,
std::ostream &out) {
bool check_equal_matrix_int(const int32_t *M, const int32_t *M_ref, oneapi::mkl::layout layout,
int m, int n, int ld, int error_mag, std::ostream &out) {
bool good = true;
int idx, count = 0;
for (int j = 0; j < n; j++) {
Expand All @@ -77,8 +76,8 @@ static bool check_equal_matrix_int(const int32_t *M, const int32_t *M_ref,
}

template <typename T>
inline bool check_mat(const T *M, const T *M_ref, oneapi::mkl::layout layout, int m, int n, int ld,
int error_mag, std::ostream &out) {
bool check_mat(const T *M, const T *M_ref, oneapi::mkl::layout layout, int m, int n, int ld,
int error_mag, std::ostream &out) {
if constexpr (std::is_same<T, int32_t>::value)
return check_equal_matrix_int(M, M_ref, layout, m, n, ld, error_mag, out);
return check_equal_matrix<T>(M, M_ref, layout, m, n, ld, error_mag, out);
Expand Down

0 comments on commit 28e098a

Please sign in to comment.