LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Classes | Static Public Member Functions | List of all members
ndarray::detail::IndexTraits< ndarray::index::Slice > Struct Template Reference

#include <ViewBuilder.h>

Classes

struct  Append
 
struct  TransformCoreResult
 Metafunction for the result type of transform(). More...
 

Static Public Member Functions

template<typename T , int M, int N>
static CoreTransformer< T, M-1,
N-1 > 
transformCore (ndarray::index::Slice const &index, CoreTransformer< T, M, N > &t)
 Apply a slice index. More...
 

Detailed Description

template<>
struct ndarray::detail::IndexTraits< ndarray::index::Slice >

Definition at line 80 of file ViewBuilder.h.

Member Function Documentation

template<typename T , int M, int N>
static CoreTransformer<T,M-1,N-1> ndarray::detail::IndexTraits< ndarray::index::Slice >::transformCore ( ndarray::index::Slice const &  index,
CoreTransformer< T, M, N > &  t 
)
inlinestatic

Apply a slice index.

Definition at line 98 of file ViewBuilder.h.

100  {
101  NDARRAY_ASSERT(index.step > 0);
102  NDARRAY_ASSERT(index.start <= index.stop);
103  NDARRAY_ASSERT(index.start >= 0);
104  NDARRAY_ASSERT(index.stop <= t._input->getSize());
105  t._data += index.start * t._input->getStride();
106  t._output->setSize(index.computeSize());
107  t._output->setStride(t._input->getStride() * index.step);
108  return t;
109  }
#define NDARRAY_ASSERT(ARG)
Definition: ndarray_fwd.h:51

The documentation for this struct was generated from the following file: