From 89c6bde2193a0ae8ef4630af198b5fab8c0168e0 Mon Sep 17 00:00:00 2001 From: Kenneth Jao Date: Fri, 2 Jun 2023 15:34:55 -0500 Subject: [PATCH] Added CUDA Compatible slicing --- Array.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Array.h b/Array.h index efb8eee..f8fbcb7 100644 --- a/Array.h +++ b/Array.h @@ -32,7 +32,13 @@ template struct EigenAdaptConst_S { typedef ConstEigenMapM template using EigenAdaptConst = typename EigenAdaptConst_S::type; template class Array; -using Slice = std::pair; + +struct Slice { + uint32_t first; + uint32_t second; + HD Slice(const std::initializer_list i) + : first(*i.begin()), second(*(i.begin() + 1)) {} +}; template class ArrayIterator { private: