LSSTApplications  10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
Public Member Functions | Private Attributes | List of all members
ndarray::detail::ExternalInitializer< T, N, Owner > Class Template Reference

#include <initialization.h>

Inheritance diagram for ndarray::detail::ExternalInitializer< T, N, Owner >:
ndarray::detail::Initializer< N, ExternalInitializer< T, N, Owner > >

Public Member Functions

template<typename Target >
Target apply () const
 
 ExternalInitializer (T *data, Vector< int, N > const &shape, Vector< int, N > const &strides, Owner const &owner)
 
- Public Member Functions inherited from ndarray::detail::Initializer< N, ExternalInitializer< T, N, Owner > >
 operator Array< T, N, C > () const
 
 operator ArrayRef< T, N, C > () const
 

Private Attributes

T * _data
 
Owner _owner
 
Vector< int, N > _shape
 
Vector< int, N > _strides
 

Detailed Description

template<typename T, int N, typename Owner>
class ndarray::detail::ExternalInitializer< T, N, Owner >

Definition at line 76 of file initialization.h.

Constructor & Destructor Documentation

template<typename T, int N, typename Owner>
ndarray::detail::ExternalInitializer< T, N, Owner >::ExternalInitializer ( T *  data,
Vector< int, N > const &  shape,
Vector< int, N > const &  strides,
Owner const &  owner 
)
inline

Member Function Documentation

template<typename T, int N, typename Owner>
template<typename Target >
Target ndarray::detail::ExternalInitializer< T, N, Owner >::apply ( ) const
inline

Definition at line 80 of file initialization.h.

80  {
81  typedef detail::ArrayAccess< Target > Access;
82  typedef typename Access::Core Core;
83  Manager::Ptr manager;
84  if (!boost::is_same<Owner,NullOwner>::value) {
85  manager = makeManager(_owner);
86  }
87  return Access::construct(_data, Core::create(_shape, _strides, manager));
88  }
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
boost::intrusive_ptr< Manager > Ptr
Definition: Manager.h:42
Manager::Ptr makeManager(T const &owner)
Definition: Manager.h:101

Member Data Documentation

template<typename T, int N, typename Owner>
T* ndarray::detail::ExternalInitializer< T, N, Owner >::_data
private

Definition at line 98 of file initialization.h.

template<typename T, int N, typename Owner>
Owner ndarray::detail::ExternalInitializer< T, N, Owner >::_owner
private

Definition at line 99 of file initialization.h.

template<typename T, int N, typename Owner>
Vector<int,N> ndarray::detail::ExternalInitializer< T, N, Owner >::_shape
private

Definition at line 100 of file initialization.h.

template<typename T, int N, typename Owner>
Vector<int,N> ndarray::detail::ExternalInitializer< T, N, Owner >::_strides
private

Definition at line 101 of file initialization.h.


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