Skip to content

Commit fad513b

Browse files
committed
Fix: Missing blasint type
1 parent df9b1ea commit fad513b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

reduce_blas.hpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,17 @@ class blas_dot_t {
2222
float const *const begin_ = nullptr;
2323
float const *const end_ = nullptr;
2424

25+
#if defined(CBLAS_INDEX)
26+
using blas_dim_t = CBLAS_INDEX;
27+
#else
28+
using blas_dim_t = blasint;
29+
#endif
30+
2531
public:
2632
blas_dot_t() = default;
2733
blas_dot_t(float const *b, float const *e) : begin_(b), end_(e) {
28-
constexpr std::size_t max_length = static_cast<std::size_t>(std::numeric_limits<blasint>::max());
29-
if (end_ - begin_ > max_length) throw std::length_error("BLAS not configured for 64-bit sizes");
34+
constexpr std::size_t max_length_k = static_cast<std::size_t>(std::numeric_limits<blas_dim_t>::max());
35+
if (end_ - begin_ > max_length_k) throw std::length_error("BLAS not configured for 64-bit sizes");
3036
}
3137

3238
float operator()() const noexcept {

0 commit comments

Comments
 (0)