Skip to content

Commit de3adbb

Browse files
committed
Force the use of 64-bit signed integers
1 parent 4e6eded commit de3adbb

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

source/pbat/math/linalg/mini/Matrix.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ PBAT_HOST_DEVICE auto Unit(auto i)
235235
return Identity<TScalar, M, M>().Col(i);
236236
}
237237

238-
template <int M, int N, class TScalar, class IndexType = std::int64_t>
239-
PBAT_HOST_DEVICE auto FromFlatBuffer(TScalar* buf, IndexType bi)
238+
template <int M, int N, class TScalar>
239+
PBAT_HOST_DEVICE auto FromFlatBuffer(TScalar* buf, std::int64_t bi)
240240
{
241241
return SMatrixView<TScalar, M, N>(buf + M * N * bi);
242242
}
@@ -255,9 +255,9 @@ PBAT_HOST_DEVICE auto FromFlatBuffer(TScalar* buf, TIndexMatrix const& inds)
255255
return A;
256256
}
257257

258-
template <CMatrix TMatrix, class IndexType = std::int64_t>
258+
template <CMatrix TMatrix>
259259
PBAT_HOST_DEVICE void
260-
ToFlatBuffer(TMatrix const& A, typename TMatrix::ScalarType* buf, IndexType bi)
260+
ToFlatBuffer(TMatrix const& A, typename TMatrix::ScalarType* buf, std::int64_t bi)
261261
{
262262
auto constexpr M = TMatrix::kRows;
263263
auto constexpr N = TMatrix::kCols;
@@ -290,8 +290,8 @@ ToFlatBuffer(TMatrix const& A, TIndexMatrix const& inds, typename TMatrix::Scala
290290
}
291291
}
292292

293-
template <int M, int N, class TScalar, class IndexType = std::int64_t>
294-
PBAT_HOST_DEVICE auto FromBuffers(std::array<TScalar*, M> buf, IndexType bi)
293+
template <int M, int N, class TScalar>
294+
PBAT_HOST_DEVICE auto FromBuffers(std::array<TScalar*, M> buf, std::int64_t bi)
295295
{
296296
using ScalarType = std::remove_const_t<TScalar>;
297297
SMatrix<ScalarType, M, N> A{};
@@ -315,9 +315,9 @@ PBAT_HOST_DEVICE auto FromBuffers(std::array<TScalar*, K> buf, TIndexMatrix cons
315315
return A;
316316
}
317317

318-
template <CMatrix TMatrix, int M, class IndexType = std::int64_t>
318+
template <CMatrix TMatrix, int M>
319319
PBAT_HOST_DEVICE void
320-
ToBuffers(TMatrix const& A, std::array<typename TMatrix::ScalarType*, M> buf, IndexType bi)
320+
ToBuffers(TMatrix const& A, std::array<typename TMatrix::ScalarType*, M> buf, std::int64_t bi)
321321
{
322322
static_assert(M == TMatrix::kRows, "A must have same rows as number of buffers");
323323
auto constexpr N = TMatrix::kCols;

0 commit comments

Comments
 (0)