Skip to content

Commit 6afd0d8

Browse files
committed
dot: cast shape to size_t in resize
1 parent 1bd5ba2 commit 6afd0d8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/xtensor-blas/xlinalg.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ namespace linalg
705705
throw std::runtime_error("Dot: shape mismatch.");
706706
}
707707

708-
result.resize({t.shape()[0]});
708+
result.resize({static_cast<std::size_t>(t.shape()[0])});
709709

710710
blas_index_t shape_x, shape_y;
711711
cxxblas::Transpose trans;
@@ -747,7 +747,7 @@ namespace linalg
747747
throw std::runtime_error("Dot: shape mismatch.");
748748
}
749749

750-
result.resize({o.shape()[1]});
750+
result.resize({static_cast<std::size_t>(o.shape()[1])});
751751

752752
blas_index_t shape_x, shape_y;
753753
cxxblas::Transpose trans;
@@ -812,7 +812,7 @@ namespace linalg
812812
{
813813
// TODO add check to compare strides & shape
814814

815-
result.resize({t.shape()[0], t.shape()[0]});
815+
result.resize({static_cast<std::size_t>(t.shape()[0]), static_cast<std::size_t>(t.shape()[0])});
816816

817817
cxxblas::syrk<blas_index_t>(
818818
get_blas_storage_order(result),
@@ -838,7 +838,7 @@ namespace linalg
838838
return result;
839839
}
840840

841-
result.resize({t.shape()[0], o.shape()[1]});
841+
result.resize({static_cast<std::size_t>(t.shape()[0]), static_cast<std::size_t>(o.shape()[1])});
842842

843843
cxxblas::gemm<blas_index_t>(
844844
get_blas_storage_order(result),

0 commit comments

Comments
 (0)