Shiokaze Framework
A research-oriented fluid solver for computer graphics
shared_array2< T > Class Template Reference

Storage class that enables sharing pre-allocated arrays. More...

#include <shared_array2.h>

Public Member Functions

 shared_array2 (const shape2 &shape, T initial_value=T(), std::string core_name="")
 Borrow a shared array. More...
 
 shared_array2 (const typename array2< T >::type2 &type, T initial_value=T())
 Borrow a shared array. More...
 
 shared_array2 (const array2< T > &array)
 Borrow a shared array and copy the input. More...
 
 ~shared_array2 ()
 Destructor for shared_array2.
 
const array2< T > & operator() () const
 Get the const reference to the internal borrowed array.
 
array2< T > & operator() ()
 Get the reference to the internal borrowed array.
 
array2< T > * operator-> ()
 Get the pointer to the internal borrowed array.
 
const array2< T > * operator-> () const
 Get the const pointer to the internal borrowed array.
 
array2< T > * get ()
 Get the pointer to the internal borrowed array.
 
const array2< T > * get () const
 Get the const pointer to the internal borrowed array.
 

Detailed Description

template<class T>
class shared_array2< T >

Storage class that enables sharing pre-allocated arrays.

Constructor & Destructor Documentation

◆ shared_array2() [1/3]

template<class T >
shared_array2< T >::shared_array2 ( const shape2 shape,
initial_value = T(),
std::string  core_name = "" 
)
inline

Borrow a shared array.

Parameters
[in]shapeShape of the grid.
[in]initial_valueInitial value.
[in]core_nameCore module name for the grid.

◆ shared_array2() [2/3]

template<class T >
shared_array2< T >::shared_array2 ( const typename array2< T >::type2 &  type,
initial_value = T() 
)
inline

Borrow a shared array.

Parameters
[in]shapeShape of the grid.
[in]initial_valueInitial value.

◆ shared_array2() [3/3]

template<class T >
shared_array2< T >::shared_array2 ( const array2< T > &  array)
inline

Borrow a shared array and copy the input.

Parameters
[in]arrayArray to copy from.

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