swarm::EnsembleAlloc< W, _Allocator > Struct Template Reference

Allocator based version of ensemble containing memory management routines It takes an allocator as a parameter and uses the allocator for allocate, deallocate and copying the ensemble. More...

#include <ensemble.hpp>

Inheritance diagram for swarm::EnsembleAlloc< W, _Allocator >:

swarm::EnsembleBase< W >

List of all members.

Public Member Functions

EnsembleAlloc clone ()
 Deep copy of this ensemble.
template<class Other >
Other cloneTo ()
 Clone to a different memory (e.g. GPU).
template<class Other >
void copyTo (Other &o)
 Copy to another ensemble located on a different memory.

Static Public Member Functions

static EnsembleAlloc create (const int &nbod, const int &nsys)
 Create a new ensemble that can accomodate nsys systems with nbod bodies Arrays are allocated on the heap but ensemble structure is value-copied.


Detailed Description

template<int W, template< class T > class _Allocator>
struct swarm::EnsembleAlloc< W, _Allocator >

Allocator based version of ensemble containing memory management routines It takes an allocator as a parameter and uses the allocator for allocate, deallocate and copying the ensemble.

The allocated memories are protected by shared pointers.

Definition at line 748 of file ensemble.hpp.


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

doxygen