mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Marked a few functions as EIGEN_DEVICE_FUNC to enable the use of tensors in cuda kernels.
This commit is contained in:
@@ -350,7 +350,7 @@ class Tensor : public TensorBase<Tensor<Scalar_, NumIndices_, Options_> >
|
||||
}
|
||||
#endif
|
||||
|
||||
void resize(const array<Index, NumIndices>& dimensions)
|
||||
EIGEN_DEVICE_FUNC void resize(const array<Index, NumIndices>& dimensions)
|
||||
{
|
||||
std::size_t i;
|
||||
Index size = Index(1);
|
||||
@@ -367,7 +367,7 @@ class Tensor : public TensorBase<Tensor<Scalar_, NumIndices_, Options_> >
|
||||
#endif
|
||||
}
|
||||
|
||||
void resize(const DSizes<Index, NumIndices>& dimensions) {
|
||||
EIGEN_DEVICE_FUNC void resize(const DSizes<Index, NumIndices>& dimensions) {
|
||||
array<Index, NumIndices> dims;
|
||||
for (std::size_t i = 0; i < NumIndices; ++i) {
|
||||
dims[i] = dimensions[i];
|
||||
|
||||
Reference in New Issue
Block a user