From 4bad6c64523bb97a100860eb2ed2dc06ef767477 Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Wed, 20 Apr 2022 18:40:52 -0400 Subject: [PATCH 1/2] misc dox fixes --- src/TiledArray/conversions/eigen.h | 2 +- src/TiledArray/expressions/add_expr.h | 3 +- src/TiledArray/expressions/blk_tsr_expr.h | 6 ++- src/TiledArray/expressions/expr.h | 3 +- src/TiledArray/expressions/mult_expr.h | 3 +- src/TiledArray/expressions/scal_tsr_engine.h | 3 +- src/TiledArray/expressions/scal_tsr_expr.h | 6 ++- src/TiledArray/expressions/tsr_expr.h | 1 - src/TiledArray/math/linalg/conjgrad.h | 2 +- .../math/linalg/non-distributed/cholesky.h | 7 ++-- .../math/linalg/non-distributed/heig.h | 24 ++++++------ src/TiledArray/permutation.h | 25 ++++++------ src/TiledArray/pmap/pmap.h | 4 +- src/TiledArray/size_array.h | 38 +++++++++++-------- src/TiledArray/sparse_shape.h | 2 +- src/TiledArray/tensor/tensor.h | 17 ++++----- src/TiledArray/tile_interface/trace.h | 18 ++++----- src/TiledArray/tile_op/mult.h | 2 +- src/TiledArray/tile_op/noop.h | 2 +- src/TiledArray/tiled_range1.h | 3 +- src/TiledArray/type_traits.h | 6 +-- src/TiledArray/util/bug.h | 6 +-- 22 files changed, 96 insertions(+), 87 deletions(-) diff --git a/src/TiledArray/conversions/eigen.h b/src/TiledArray/conversions/eigen.h index 94f5993c34..6d2da3b1b1 100644 --- a/src/TiledArray/conversions/eigen.h +++ b/src/TiledArray/conversions/eigen.h @@ -816,7 +816,7 @@ void counted_eigen_subtensor_to_tensor(const Eigen_Tensor_* src, /// Task function for assigning a tensor to an Eigen subtensor -/// \tparam Tensor_ a TiledArray::Tensor type +/// \tparam TA_Tensor_ a TiledArray::Tensor type /// \tparam Eigen_Tensor_ an Eigen::Tensor type /// \param src The source tensor /// \param dst The destination tensor diff --git a/src/TiledArray/expressions/add_expr.h b/src/TiledArray/expressions/add_expr.h index ba620a73a2..23584deb01 100644 --- a/src/TiledArray/expressions/add_expr.h +++ b/src/TiledArray/expressions/add_expr.h @@ -143,7 +143,8 @@ class ScalAddExpr : public BinaryExpr > { /// Expression constructor - /// \param arg The argument expression + /// \param left The left argument expression + /// \param right The right argument expression /// \param factor The scaling factor ScalAddExpr(const left_type& left, const right_type& right, const scalar_type factor) diff --git a/src/TiledArray/expressions/blk_tsr_expr.h b/src/TiledArray/expressions/blk_tsr_expr.h index e2680559b5..5604d71d63 100644 --- a/src/TiledArray/expressions/blk_tsr_expr.h +++ b/src/TiledArray/expressions/blk_tsr_expr.h @@ -759,7 +759,8 @@ inline ScalConjBlkTsrExpr operator*( /// Scaled block tensor expression factor /// \tparam Array A `DistArray` type -/// \tparam Scalar A scalar type +/// \tparam Scalar1 A scalar type +/// \tparam Scalar2 A scalar type /// \param expr The scaled block tensor expression object /// \param factor The scaling factor /// \return A scaled-tensor expression object @@ -776,7 +777,8 @@ inline ScalConjBlkTsrExpr> operator*( /// Scaled-tensor expression factor /// \tparam Array A `DistArray` type -/// \tparam Scalar A scalar type +/// \tparam Scalar1 A scalar type +/// \tparam Scalar2 A scalar type /// \param factor The scaling factor /// \param expr The scaled block tensor expression object /// \return A scaled-tensor expression object diff --git a/src/TiledArray/expressions/expr.h b/src/TiledArray/expressions/expr.h index d78aa26004..d0d84804bf 100644 --- a/src/TiledArray/expressions/expr.h +++ b/src/TiledArray/expressions/expr.h @@ -157,9 +157,8 @@ class Expr { return (*op)(cast_tile); } - /// Task function used to mutate result tiles + /// Task function used to mutate evaluated lazy tiles - /// \tparam R The result type /// \tparam T The lazy tile type /// \tparam Op Tile operation type /// \param tile A forwarding reference to a lazy tile diff --git a/src/TiledArray/expressions/mult_expr.h b/src/TiledArray/expressions/mult_expr.h index eaa5ae504a..5b72a38842 100644 --- a/src/TiledArray/expressions/mult_expr.h +++ b/src/TiledArray/expressions/mult_expr.h @@ -167,7 +167,8 @@ class ScalMultExpr : public BinaryExpr > { /// Expression constructor - /// \param arg The argument expression + /// \param left The left-hand argument expression + /// \param right The right-hand argument expression /// \param factor The scaling factor ScalMultExpr(const left_type& left, const right_type& right, const scalar_type factor) diff --git a/src/TiledArray/expressions/scal_tsr_engine.h b/src/TiledArray/expressions/scal_tsr_engine.h index 6bb75204cf..8dfcc596d9 100644 --- a/src/TiledArray/expressions/scal_tsr_engine.h +++ b/src/TiledArray/expressions/scal_tsr_engine.h @@ -70,7 +70,8 @@ struct EngineTrait, Scalar, Result>> { /// Scaled tensor expression engine -/// \tparam A The \c Array type +/// \tparam Array an DistArray type +/// \tparam Scalar a numeric scalar type template class ScalTsrEngine : public LeafEngine> { public: diff --git a/src/TiledArray/expressions/scal_tsr_expr.h b/src/TiledArray/expressions/scal_tsr_expr.h index ba7b96bf3e..a39f725170 100644 --- a/src/TiledArray/expressions/scal_tsr_expr.h +++ b/src/TiledArray/expressions/scal_tsr_expr.h @@ -295,7 +295,8 @@ inline ScalConjTsrExpr operator*( /// Scaled-tensor expression factor /// \tparam Array A `DistArray` type -/// \tparam Scalar A scalar type +/// \tparam Scalar1 A scalar type +/// \tparam Scalar2 A scalar type /// \param expr The scaled-tensor expression object /// \param factor The scaling factor /// \return A scaled-tensor expression object @@ -312,7 +313,8 @@ inline ScalConjTsrExpr > operator*( /// Scaled-tensor expression factor /// \tparam Array A `DistArray` type -/// \tparam Scalar A scalar type +/// \tparam Scalar1 A scalar type +/// \tparam Scalar2 A scalar type /// \param factor The scaling factor /// \param expr The scaled-tensor expression object /// \return A scaled-tensor expression object diff --git a/src/TiledArray/expressions/tsr_expr.h b/src/TiledArray/expressions/tsr_expr.h index 9a2e533f66..c606023c9c 100644 --- a/src/TiledArray/expressions/tsr_expr.h +++ b/src/TiledArray/expressions/tsr_expr.h @@ -363,7 +363,6 @@ class TsrExpr : public Expr> { /// \tparam Index1 An integral type /// \tparam Index2 An integral type - /// \tparam Index The bound index types /// \param lower_bound The lower_bound of the block /// \param upper_bound The upper_bound of the block template (A, ...) + * auto [L,Linv] = cholesky_Linv(A, ...) * - * @tparam Array a DistArray type (i.e., @c is_array_v is true) - * @tparam RetL Whether or not to return the cholesky factor + * @tparam Both Whether or not to return the Cholesky factor + * @tparam Array the type of `A`, a DistArray type + * (i.e., @c is_array_v is true) * * @param[in] A Input array to be diagonalized. Must be rank-2 * @param[in] l_trange TiledRange for resulting inverse Cholesky factor. diff --git a/src/TiledArray/math/linalg/non-distributed/heig.h b/src/TiledArray/math/linalg/non-distributed/heig.h index 6a7cccac3a..8a7c244bbc 100644 --- a/src/TiledArray/math/linalg/non-distributed/heig.h +++ b/src/TiledArray/math/linalg/non-distributed/heig.h @@ -26,9 +26,9 @@ #include -#include -#include #include +#include +#include namespace TiledArray::math::linalg::non_distributed { @@ -62,10 +62,7 @@ auto heig(const Array& A, TiledRange evec_trange = TiledRange()) { world.gop.broadcast_serializable(A_eig, 0); world.gop.broadcast_serializable(evals, 0); if (evec_trange.rank() == 0) evec_trange = A.trange(); - return std::tuple( - evals, - eigen_to_array(world, evec_trange, A_eig) - ); + return std::tuple(evals, eigen_to_array(world, evec_trange, A_eig)); } /** @@ -81,7 +78,9 @@ auto heig(const Array& A, TiledRange evec_trange = TiledRange()) { * * auto [E, X] = heig(A, B, ...) * - * @tparam Array Input array type + * @tparam ArrayA the type of @p A, i.e., an array type + * @tparam ArrayB the type of @p B, i.e., an array type + * @tparam EVecType an array type to use for returning the eigenvectors * * @param[in] A Input array to be diagonalized. Must be rank-2 * @param[in] B Positive-definite matrix @@ -92,7 +91,8 @@ auto heig(const Array& A, TiledRange evec_trange = TiledRange()) { * as std::vector and in TA format, respectively. */ template -auto heig(const ArrayA& A, const ArrayB& B, TiledRange evec_trange = TiledRange()) { +auto heig(const ArrayA& A, const ArrayB& B, + TiledRange evec_trange = TiledRange()) { using numeric_type = typename detail::array_traits::numeric_type; (void)detail::array_traits{}; World& world = A.world(); @@ -105,12 +105,10 @@ auto heig(const ArrayA& A, const ArrayB& B, TiledRange evec_trange = TiledRange( world.gop.broadcast_serializable(A_eig, 0); world.gop.broadcast_serializable(evals, 0); if (evec_trange.rank() == 0) evec_trange = A.trange(); - return std::tuple( - evals, - eigen_to_array(A.world(), evec_trange, A_eig) - ); + return std::tuple(evals, + eigen_to_array(A.world(), evec_trange, A_eig)); } -} // namespace TiledArray::math::linalg +} // namespace TiledArray::math::linalg::non_distributed #endif // TILEDARRAY_MATH_LINALG_NON_DISTRIBUTED_HEIG_H__INCLUDED diff --git a/src/TiledArray/permutation.h b/src/TiledArray/permutation.h index 71dce48c53..f90752e3dc 100644 --- a/src/TiledArray/permutation.h +++ b/src/TiledArray/permutation.h @@ -76,20 +76,19 @@ inline void permute_array(const Perm& perm, const Arg& arg, Result& result) { } } -template +template void permute_n(size_t N, P p, In in, Out out, std::bool_constant) { for (size_t k = 0; k < N; ++k) { if constexpr (Inverse) { out[*p++] = *in++; - } - else { + } else { *out++ = in[*p++]; } } } -template -auto permute(const P &p, const S &s, std::bool_constant) { +template +auto permute(const P& p, const S& s, std::bool_constant) { // using std::size; // using std::begin; // size_t K = size(p); @@ -97,8 +96,10 @@ auto permute(const P &p, const S &s, std::bool_constant) { // detail::permute_n(K, begin(p), begin(s), begin(r), args...); // return r; if (!p) return s; - if constexpr (Inverse) return p.inv()*s; - else return p*s; + if constexpr (Inverse) + return p.inv() * s; + else + return p * s; } } // namespace detail @@ -124,8 +125,6 @@ auto permute(const P &p, const S &s, std::bool_constant) { p1_inv = p1.inv(); // computes inverse of p1 \endcode - \note - \par Permutation is internally represented in one-line (image) form, e.g. \f$ @@ -631,14 +630,14 @@ inline std::vector operator*(const Permutation& perm, return result; } -template -S apply(const Permutation &p, const S &s) { +template +S apply(const Permutation& p, const S& s) { using detail::permute; return permute(p, s, std::false_type{}); } -template -S apply_inverse(const Permutation &p, const S &s) { +template +S apply_inverse(const Permutation& p, const S& s) { using detail::permute; return permute(p, s, std::true_type{}); } diff --git a/src/TiledArray/pmap/pmap.h b/src/TiledArray/pmap/pmap.h index ebd23ce86a..96599093d8 100644 --- a/src/TiledArray/pmap/pmap.h +++ b/src/TiledArray/pmap/pmap.h @@ -80,7 +80,7 @@ class Pmap { /// \param world The world where the tiles will be mapped /// \param size The number of tiles to be mapped - /// \param size The number of tiles that maps to this rank + /// \param local_size The number of tiles that maps to this rank Pmap(World& world, const size_type size, const size_type local_size = 0) : rank_(world.rank()), procs_(world.size()), @@ -156,7 +156,7 @@ class Pmap { /// overload this and construct Iterator with `use_pmap_advance=true` /// if need to implement custom iteration over local indices /// \param[in,out] value current index value on input, next value on output - /// \param[in[ increment if true, increase \p value, else decrease + /// \param[in] increment if true, increase \p value, else decrease virtual void advance(size_type& value, bool increment) const { if (increment) ++value; diff --git a/src/TiledArray/size_array.h b/src/TiledArray/size_array.h index 8574d023d2..6edbecb222 100644 --- a/src/TiledArray/size_array.h +++ b/src/TiledArray/size_array.h @@ -271,14 +271,19 @@ class SizeArray { /// Perform an element-wise binary reduction of the data of \c this and \c arg /// by executing join_op(result, reduce_op(*this[i], arg[i])) for - /// each \c i in the index range of \c this . \c result is initialized to \c - /// identity . If HAVE_INTEL_TBB is defined the reduction will be executed in - /// an undefined order, otherwise will execute in the order of increasing \c i - /// . \tparam Arg The right-hand argument type \tparam Result The reduction - /// result type \tparam ReduceOp The binary reduction operation type \tparam - /// JoinOp The join operation type \param arg The right-hand argument \param - /// result The initial value of the reduction \param op The binary reduction - /// operation \return The reduced value + /// each \c i in the index range of \c this . \c result is initialized to + /// \c identity . If `HAVE_INTEL_TBB` is defined the reduction will be + /// executed in an undefined order, otherwise will execute in the order + /// of increasing \c i . + /// \tparam Arg The right-hand argument type + /// \tparam Result The reduction result type + /// \tparam ReduceOp The binary reduction operation type + /// \tparam JoinOp The join operation type + /// \param arg The right-hand argument + /// \param result The initial value of the reduction + /// \param op The binary reduction + /// operation + /// \return The reduced value template Result reduce(const Arg* const arg, Result result, const ReduceOp& reduce_op, const JoinOp& join_op) const { @@ -290,13 +295,16 @@ class SizeArray { /// Perform an element-wise unary reduction of the data by /// executing join_op(result, reduce_op(*this[i])) for each - /// \c i in the index range of \c this . \c result is initialized to \c - /// identity . If HAVE_INTEL_TBB is defined the reduction will be executed in - /// an undefined order, otherwise will execute in the order of increasing \c i - /// . \tparam Result The reduction result type \tparam ReduceOp The binary - /// reduction operation type \tparam JoinOp The join operation type \param - /// result The initial value of the reduction \param op The unary reduction - /// operation \return The reduced value + /// \c i in the index range of \c this . \c result is initialized to + /// \c identity . If `HAVE_INTEL_TBB` is defined the reduction will be + /// executed in an undefined order, otherwise will execute in the order + /// of increasing \c i . + /// \tparam Result The reduction result type + /// \tparam ReduceOp The binary reduction operation type + /// \tparam JoinOp The join operation type + /// \param result The initial value of the reduction + /// \param op The unary reduction operation + /// \return The reduced value template Result reduce(Result result, const ReduceOp& reduce_op, const JoinOp& join_op) const { diff --git a/src/TiledArray/sparse_shape.h b/src/TiledArray/sparse_shape.h index a3ca9b8a55..63022bf9a3 100644 --- a/src/TiledArray/sparse_shape.h +++ b/src/TiledArray/sparse_shape.h @@ -562,7 +562,7 @@ class SparseShape { /// Compute union of two shapes - /// \param mask The input shape, hard zeros are used to mask the output. + /// \param mask_shape The input shape, hard zeros are used to mask the output. /// \return A shape that is masked by the mask. SparseShape_ mask(const SparseShape_& mask_shape) const { TA_ASSERT(!tile_norms_.empty()); diff --git a/src/TiledArray/tensor/tensor.h b/src/TiledArray/tensor/tensor.h index d41c3352e9..03af689a92 100644 --- a/src/TiledArray/tensor/tensor.h +++ b/src/TiledArray/tensor/tensor.h @@ -1607,7 +1607,7 @@ class Tensor { /// Contract this tensor with another tensor - /// \tparam As... Template parameter pack of a tensor type + /// \tparam As Template parameter pack of a tensor type /// \tparam V The type of \c alpha scalar /// \param A The tensor that will be contracted with this tensor /// \param alpha Multiply the result by this constant @@ -1651,15 +1651,14 @@ class Tensor { /// contractions. Tensor contractions that do not fit this pattern require /// one or more tensor permutation so that the tensors fit the required /// pattern. - /// \tparam U The left-hand tensor element type - /// \tparam AU The left-hand tensor allocator type - /// \tparam V The right-hand tensor element type - /// \tparam AV The right-hand tensor allocator type + /// \tparam As Template parameter pack of the left-hand tensor type + /// \tparam Bs Template parameter pack of the right-hand tensor type /// \tparam W The type of the scaling factor - /// \param left The left-hand tensor that will be contracted - /// \param right The right-hand tensor that will be contracted - /// \param factor The contraction result will be scaling by this value, then - /// accumulated into \c this \param gemm_helper The *GEMM operation meta data + /// \param A The left-hand tensor that will be contracted + /// \param B The right-hand tensor that will be contracted + /// \param alpha The contraction result will be scaled by this value, then + /// accumulated into \c this + /// \param gemm_helper The *GEMM operation meta data /// \return A reference to \c this /// \note if this is uninitialized, i.e., if \c this->empty()==true will /// this is equivalent to diff --git a/src/TiledArray/tile_interface/trace.h b/src/TiledArray/tile_interface/trace.h index 421e281e35..f82f8d5297 100644 --- a/src/TiledArray/tile_interface/trace.h +++ b/src/TiledArray/tile_interface/trace.h @@ -26,7 +26,7 @@ #ifndef TILEDARRAY_TRACE_H__INCLUDED #define TILEDARRAY_TRACE_H__INCLUDED -#include // enable_if, true_type, false_type +#include // enable_if, true_type, false_type namespace TiledArray { namespace detail { @@ -69,7 +69,7 @@ using enable_if_trace_is_defined_t = std::enable_if_t, U>; template struct Trace; -} // namespace detail +} // namespace detail /// Helper function for taking the trace of a tensor /// @@ -82,14 +82,12 @@ struct Trace; /// detail::trace_is_defined_v is true. /// /// \tparam T The type of tensor we are trying to take the trace of. -/// \tparam Template type parameter used for SFINAE. Defaults to -/// void when we know how to take the trace of a tensor type /// \param[in] t The tensor instance we want the trace of. /// \return The results of calling Trace::operator() on \c t. -/// \throw ??? Any exceptions thrown by Trace::operator() will also be thrown +/// \throw Any exceptions thrown by Trace::operator() will also be thrown /// by this function with the same throw guarantee. -template> -decltype(auto) trace(const T& t){ +template > +decltype(auto) trace(const T& t) { detail::Trace tracer; return tracer(t); } @@ -98,8 +96,8 @@ decltype(auto) trace(const T& t){ /// /// \tparam T The type of tensor for which we want to know the type resulting /// from tracing it. -template +template using result_of_trace_t = decltype(trace(std::declval())); -} // namespace TiledArray -#endif // TILEDARRAY_TRACE_H__INCLUDED +} // namespace TiledArray +#endif // TILEDARRAY_TRACE_H__INCLUDED diff --git a/src/TiledArray/tile_op/mult.h b/src/TiledArray/tile_op/mult.h index eaba991544..b9da1d5e24 100644 --- a/src/TiledArray/tile_op/mult.h +++ b/src/TiledArray/tile_op/mult.h @@ -172,7 +172,7 @@ class Mult { Mult() = default; /// Construct using custom element-wise op /// \tparam ElementOp a callable with signature element_op_type - /// \param op + /// \param op the element-wise operation template , Mult_> && diff --git a/src/TiledArray/tile_op/noop.h b/src/TiledArray/tile_op/noop.h index d590bfab11..7a102cc409 100644 --- a/src/TiledArray/tile_op/noop.h +++ b/src/TiledArray/tile_op/noop.h @@ -78,7 +78,7 @@ class Noop { public: /// Permute operator - /// \tparam A The tile argument type + /// \tparam Perm a permutation type /// \param arg The tile argument /// \param perm The permutation applied to the result tile /// \return A permuted copy of `arg` diff --git a/src/TiledArray/tiled_range1.h b/src/TiledArray/tiled_range1.h index 468f025f42..ef10c520d8 100644 --- a/src/TiledArray/tiled_range1.h +++ b/src/TiledArray/tiled_range1.h @@ -46,7 +46,8 @@ class TiledRange1 { typedef std::vector::const_iterator const_iterator; /// Default constructor creates an empty range (tile and element ranges are - /// both [0,0)) \post \code + /// both [0,0)) . + /// \post \code /// TiledRange1 tr; /// assert(tr.tiles_range() == (TiledRange1::range_type{0,0})); /// assert(tr.elements_range() == (TiledRange1::range_type{0,0})); diff --git a/src/TiledArray/type_traits.h b/src/TiledArray/type_traits.h index c08c2ca048..a1b1d4232e 100644 --- a/src/TiledArray/type_traits.h +++ b/src/TiledArray/type_traits.h @@ -277,8 +277,8 @@ class LazyArrayTile; using No = int; \ template \ static auto func(void*) \ - -> decltype(std::add_pointer_t()...))>{}, \ + -> decltype(std::add_pointer_t()...))>{}, \ Yes{}); \ template \ static No func(...); \ @@ -385,7 +385,7 @@ namespace detail { /// @brief helper to implement other metafunctions /// @c is_type::value is true if @c T is a valid type /// @tparam T a type -template +template struct is_type : public std::true_type {}; /// @tparam T a type /// @c is_type_v is an alias for @c is_type::value diff --git a/src/TiledArray/util/bug.h b/src/TiledArray/util/bug.h index 46158bf1f0..4bbc631081 100644 --- a/src/TiledArray/util/bug.h +++ b/src/TiledArray/util/bug.h @@ -177,13 +177,13 @@ class MemoryWatchpoint_x86_64 { } }; - /// @brief creates a MemoryWatchpoint watching memory window @c - /// [addr,addr+size) for condition @c cond from threads @c threads + /// @brief creates a MemoryWatchpoint watching memory window + /// `[addr,addr+size)` for condition @p cond from thread @p thread /// @param[in] addr the beginning of the memory window /// @param[in] size the size of the memory window /// @param[in] cond the condition to watch for /// @param[in] dr the debugging register to use - /// @param[in] threads the set of threads to watch + /// @param[in] thread the thread to watch /// @throw std::runtime_error if setting the watchpoint fails (either due to /// the lack of available registers or another reason) MemoryWatchpoint_x86_64(void *addr, Size size, Condition cond, From 8cf3327ef1489847e65b0fd7d01c8eb3e773ea54 Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Wed, 20 Apr 2022 18:41:51 -0400 Subject: [PATCH 2/2] deprecate DistArray::range in favor of DistArray::tiles_range --- src/TiledArray/dist_array.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/TiledArray/dist_array.h b/src/TiledArray/dist_array.h index 76fa88409d..6d7a41bacf 100644 --- a/src/TiledArray/dist_array.h +++ b/src/TiledArray/dist_array.h @@ -986,8 +986,10 @@ class DistArray : public madness::archive::ParallelSerializableObject { /// \throw TiledArray::Exception if the PIMPL is not initialized. Strong throw /// guarantee. /// \deprecated use DistArray::tiles_range() - // TODO: uncomment [[deprecated("use DistArray::tiles_range()")]] - const range_type& range() const { return impl_ref().tiles_range(); } + [[deprecated("use DistArray::tiles_range()")]] const range_type& range() + const { + return impl_ref().tiles_range(); + } /// Tile range accessor @@ -1546,7 +1548,7 @@ class DistArray : public madness::archive::ParallelSerializableObject { if (!is_initialized()) return; constexpr bool is_tot = detail::is_tensor_of_tensor_v; - const auto rank = range().rank(); + const auto rank = tiles_range().rank(); // TODO: Make constexpr and use structured bindings when CUDA supports C++17 if (is_tot) { // Make sure the index is capable of being interpreted as a ToT index