ndarray
NumPy-friendly multidimensional arrays in C++
Loading...
Searching...
No Matches
Classes | Functions
initialization.h File Reference

Construction functions for array. More...

#include "ndarray/Array.h"
#include "ndarray/ArrayRef.h"
#include "ndarray/Manager.h"

Go to the source code of this file.

Classes

struct  ndarray::detail::NullOwner
 
class  ndarray::detail::Initializer< N, Derived >
 
class  ndarray::detail::SimpleInitializer< N >
 
class  ndarray::detail::ExternalInitializer< T, N, Owner >
 

Functions

template<int N, typename U >
detail::SimpleInitializer< N > ndarray::allocate (Vector< U, N > const &shape)
 Create an expression that allocates uninitialized memory for an array.
 
detail::SimpleInitializer< 1 > ndarray::allocate (Size n)
 Create an expression that allocates uninitialized memory for a 1-d array.
 
detail::SimpleInitializer< 2 > ndarray::allocate (Size n1, Size n2)
 Create an expression that allocates uninitialized memory for a 2-d array.
 
detail::SimpleInitializer< 3 > ndarray::allocate (Size n1, Size n2, Size n3)
 Create an expression that allocates uninitialized memory for a 3-d array.
 
template<typename Derived >
ArrayRef< typename boost::remove_const< typename Derived::Element >::type, Derived::ND::value, Derived::ND::value > ndarray::copy (ExpressionBase< Derived > const &expr)
 Create a new Array by copying an Expression.
 
template<int N>
Vector< Offset, N > ndarray::computeStrides (Vector< Size, N > const &shape, DataOrderEnum order=ROW_MAJOR)
 Compute row- or column-major strides for the given shape.
 
template<typename T , int N, typename U , typename V , typename Owner >
detail::ExternalInitializer< T, N, Owner > ndarray::external (T *data, Vector< U, N > const &shape, Vector< V, N > const &strides, Owner const &owner)
 Create an expression that initializes an Array with externally allocated memory.
 
template<typename T , int N, typename U , typename V >
detail::ExternalInitializer< T, N, detail::NullOwnerndarray::external (T *data, Vector< U, N > const &shape, Vector< V, N > const &strides)
 Create an expression that initializes an Array with externally allocated memory.
 
template<typename T , int N, typename U , typename Owner >
detail::ExternalInitializer< T, N, Owner > ndarray::external (T *data, Vector< U, N > const &shape, DataOrderEnum order, Owner const &owner)
 Create an expression that initializes an Array with externally allocated memory.
 
template<typename T , int N, typename U >
detail::ExternalInitializer< T, N, detail::NullOwnerndarray::external (T *data, Vector< U, N > const &shape, DataOrderEnum order=ROW_MAJOR)
 Create an expression that initializes an Array with externally allocated memory.
 

Detailed Description

Construction functions for array.