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::Range > 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::Range const &index, CoreTransformer< T, M, N > &t)
 Apply a range index. More...
 

Detailed Description

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

Definition at line 114 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::Range >::transformCore ( ndarray::index::Range const &  index,
CoreTransformer< T, M, N > &  t 
)
inlinestatic

Apply a range index.

Definition at line 132 of file ViewBuilder.h.

134  {
135  NDARRAY_ASSERT(index.start <= index.stop);
136  NDARRAY_ASSERT(index.start >= 0);
137  NDARRAY_ASSERT(index.stop <= t._input->getSize());
138  t._data += index.start * t._input->getStride();
139  t._output->setSize(index.stop - index.start);
140  t._output->setStride(t._input->getStride());
141  return t;
142  }
#define NDARRAY_ASSERT(ARG)
Definition: ndarray_fwd.h:51

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