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
Public Types | Static Public Member Functions | List of all members
ndarray::detail::ViewBuilder< Array_, InSeq > Struct Template Reference

#include <ViewBuilder.h>

Public Types

typedef ExpressionTraits< Array_ > Traits
 
typedef Traits::Element Element
 
typedef Traits::ND InputND
 
typedef Traits::RMC InputRMC
 
typedef Traits::Core InputCore
 
typedef boost::mpl::bool_
<(InputRMC::value< 0)> 
IsColumnMajor
 
typedef ViewNormalizer
< InputND::value, InSeq > 
Normalizer
 
typedef ViewNormalizer
< InputND::value, InSeq >
::Output 
NormSeq
 
typedef ViewTraits
< InputND::value,
InputRMC::value, NormSeq
OutputTraits
 
typedef OutputTraits::ND OutputND
 
typedef OutputTraits::RMC OutputRMC
 
typedef ArrayRef< Element,
OutputND::value,
OutputRMC::value > 
OutputArray
 
typedef Core< OutputND::value > OutputCore
 

Static Public Member Functions

static OutputArray apply (Array_ const &array, InSeq const &seq)
 
template<int M, int N>
static std::pair< Element
*, typename OutputCore::Ptr
process (NormSeq const &seq, CoreTransformer< Element, M, N > t)
 
static std::pair< Element
*, typename OutputCore::Ptr
process (NormSeq const &seq, CoreTransformer< Element, 0, 0 > t)
 

Detailed Description

template<typename Array_, typename InSeq>
struct ndarray::detail::ViewBuilder< Array_, InSeq >

Definition at line 272 of file ViewBuilder.h.

Member Typedef Documentation

template<typename Array_ , typename InSeq >
typedef Traits::Element ndarray::detail::ViewBuilder< Array_, InSeq >::Element

Definition at line 274 of file ViewBuilder.h.

template<typename Array_ , typename InSeq >
typedef Traits::Core ndarray::detail::ViewBuilder< Array_, InSeq >::InputCore

Definition at line 277 of file ViewBuilder.h.

template<typename Array_ , typename InSeq >
typedef Traits::ND ndarray::detail::ViewBuilder< Array_, InSeq >::InputND

Definition at line 275 of file ViewBuilder.h.

template<typename Array_ , typename InSeq >
typedef Traits::RMC ndarray::detail::ViewBuilder< Array_, InSeq >::InputRMC

Definition at line 276 of file ViewBuilder.h.

template<typename Array_ , typename InSeq >
typedef boost::mpl::bool_<(InputRMC::value < 0)> ndarray::detail::ViewBuilder< Array_, InSeq >::IsColumnMajor

Definition at line 278 of file ViewBuilder.h.

template<typename Array_ , typename InSeq >
typedef ViewNormalizer<InputND::value,InSeq> ndarray::detail::ViewBuilder< Array_, InSeq >::Normalizer

Definition at line 280 of file ViewBuilder.h.

template<typename Array_ , typename InSeq >
typedef ViewNormalizer<InputND::value,InSeq>::Output ndarray::detail::ViewBuilder< Array_, InSeq >::NormSeq

Definition at line 281 of file ViewBuilder.h.

template<typename Array_ , typename InSeq >
typedef ArrayRef<Element,OutputND::value,OutputRMC::value> ndarray::detail::ViewBuilder< Array_, InSeq >::OutputArray

Definition at line 287 of file ViewBuilder.h.

template<typename Array_ , typename InSeq >
typedef Core<OutputND::value> ndarray::detail::ViewBuilder< Array_, InSeq >::OutputCore

Definition at line 288 of file ViewBuilder.h.

template<typename Array_ , typename InSeq >
typedef OutputTraits::ND ndarray::detail::ViewBuilder< Array_, InSeq >::OutputND

Definition at line 284 of file ViewBuilder.h.

template<typename Array_ , typename InSeq >
typedef OutputTraits::RMC ndarray::detail::ViewBuilder< Array_, InSeq >::OutputRMC

Definition at line 285 of file ViewBuilder.h.

template<typename Array_ , typename InSeq >
typedef ViewTraits<InputND::value,InputRMC::value,NormSeq> ndarray::detail::ViewBuilder< Array_, InSeq >::OutputTraits

Definition at line 282 of file ViewBuilder.h.

template<typename Array_ , typename InSeq >
typedef ExpressionTraits<Array_> ndarray::detail::ViewBuilder< Array_, InSeq >::Traits

Definition at line 273 of file ViewBuilder.h.

Member Function Documentation

template<typename Array_ , typename InSeq >
static OutputArray ndarray::detail::ViewBuilder< Array_, InSeq >::apply ( Array_ const &  array,
InSeq const &  seq 
)
inlinestatic

Definition at line 290 of file ViewBuilder.h.

290  {
291  CoreTransformer<Element,InputND::value,OutputND::value> initial(
292  array.getData(),
294  OutputCore::create(array.getManager())
295  );
296  NormSeq normSeq = Normalizer::apply(seq);
297  std::pair<Element*,typename OutputCore::Ptr> final = process(normSeq, initial);
298  return ArrayAccess< OutputArray >::construct(final.first, final.second);
299  }
static Ptr create(Vector< int, M > const &shape, Vector< int, M > const &strides, Manager::Ptr const &manager=Manager::Ptr())
Create a Core::Ptr with the given shape, strides, and manager.
Definition: Core.h:68
static Array_ construct(Element *data, CorePtr const &core)
Definition: ArrayAccess.h:48
static std::pair< Element *, typename OutputCore::Ptr > process(NormSeq const &seq, CoreTransformer< Element, M, N > t)
Definition: ViewBuilder.h:303
static CorePtr const & getCore(Array_ const &array)
Definition: ArrayAccess.h:44
static Output apply(Seq_ const &input)
Definition: ViewBuilder.h:254
ViewNormalizer< InputND::value, InSeq >::Output NormSeq
Definition: ViewBuilder.h:281
template<typename Array_ , typename InSeq >
template<int M, int N>
static std::pair<Element*,typename OutputCore::Ptr> ndarray::detail::ViewBuilder< Array_, InSeq >::process ( NormSeq const &  seq,
CoreTransformer< Element, M, N >  t 
)
inlinestatic

Definition at line 303 of file ViewBuilder.h.

303  {
304  return process(seq, transformCore(boost::fusion::at_c<(InputND::value-M)>(seq), t));
305  }
IndexTraits< Index >::template TransformCoreResult< T, M, N >::Type transformCore(Index const &index, CoreTransformer< T, M, N > &t)
Definition: ViewBuilder.h:204
static std::pair< Element *, typename OutputCore::Ptr > process(NormSeq const &seq, CoreTransformer< Element, M, N > t)
Definition: ViewBuilder.h:303
template<typename Array_ , typename InSeq >
static std::pair<Element*,typename OutputCore::Ptr> ndarray::detail::ViewBuilder< Array_, InSeq >::process ( NormSeq const &  seq,
CoreTransformer< Element, 0, 0 >  t 
)
inlinestatic

Definition at line 308 of file ViewBuilder.h.

308  {
309  return std::make_pair(t._data, boost::static_pointer_cast<OutputCore>(t._output));
310  }

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