From ea8296ae816f9e960dbdfd5aa04d6c8c1e31ef44 Mon Sep 17 00:00:00 2001 From: Tim Martin <38798827+tmartin-gh@users.noreply.github.com> Date: Thu, 22 Aug 2024 20:40:25 -0700 Subject: [PATCH] Allow access to Data() pointer from device --- include/matx/core/tensor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/matx/core/tensor.h b/include/matx/core/tensor.h index cc851409..23fbaf4c 100644 --- a/include/matx/core/tensor.h +++ b/include/matx/core/tensor.h @@ -946,7 +946,7 @@ class tensor_t : public detail::tensor_impl_t { * @returns Underlying data pointer of type T * */ - __MATX_HOST__ __MATX_INLINE__ T *Data() const noexcept { return this->ldata_; } + __MATX_HOST__ __MATX_DEVICE__ __MATX_INLINE__ T *Data() const noexcept { return this->ldata_; } /** * Set the underlying data pointer from the view @@ -1473,7 +1473,7 @@ class tensor_t : public detail::tensor_impl_t { } } - MATX_ASSERT_STR(((RANK - end_count) == N), matxInvalidSize, + MATX_ASSERT_STR(((RANK - end_count) == N), matxInvalidSize, "Number of matxDropDim specifiers must match the output rank"); #pragma unroll