7
7
#include " pbat/common/ConstexprFor.h"
8
8
9
9
#include < array>
10
+ #include < cstdint>
10
11
#include < initializer_list>
11
12
#include < string.h>
12
13
#include < utility>
@@ -234,7 +235,7 @@ PBAT_HOST_DEVICE auto Unit(auto i)
234
235
return Identity<TScalar, M, M>().Col (i);
235
236
}
236
237
237
- template <int M, int N, class TScalar , class IndexType >
238
+ template <int M, int N, class TScalar , class IndexType = std:: int64_t >
238
239
PBAT_HOST_DEVICE auto FromFlatBuffer (TScalar* buf, IndexType bi)
239
240
{
240
241
return SMatrixView<TScalar, M, N>(buf + M * N * bi);
@@ -254,7 +255,7 @@ PBAT_HOST_DEVICE auto FromFlatBuffer(TScalar* buf, TIndexMatrix const& inds)
254
255
return A;
255
256
}
256
257
257
- template <CMatrix TMatrix, class IndexType >
258
+ template <CMatrix TMatrix, class IndexType = std:: int64_t >
258
259
PBAT_HOST_DEVICE void
259
260
ToFlatBuffer (TMatrix const & A, typename TMatrix::ScalarType* buf, IndexType bi)
260
261
{
@@ -289,7 +290,7 @@ ToFlatBuffer(TMatrix const& A, TIndexMatrix const& inds, typename TMatrix::Scala
289
290
}
290
291
}
291
292
292
- template <int M, int N, class TScalar , class IndexType >
293
+ template <int M, int N, class TScalar , class IndexType = std:: int64_t >
293
294
PBAT_HOST_DEVICE auto FromBuffers (std::array<TScalar*, M> buf, IndexType bi)
294
295
{
295
296
using ScalarType = std::remove_const_t <TScalar>;
@@ -314,7 +315,7 @@ PBAT_HOST_DEVICE auto FromBuffers(std::array<TScalar*, K> buf, TIndexMatrix cons
314
315
return A;
315
316
}
316
317
317
- template <CMatrix TMatrix, int M, class IndexType >
318
+ template <CMatrix TMatrix, int M, class IndexType = std:: int64_t >
318
319
PBAT_HOST_DEVICE void
319
320
ToBuffers (TMatrix const & A, std::array<typename TMatrix::ScalarType*, M> buf, IndexType bi)
320
321
{
0 commit comments