Blaze 3.9
Loading...
Searching...
No Matches
blaze::DynamicAllocator< A1, As > Struct Template Reference

Deduction of an allocator type for dynamic vectors and matrices. More...

#include <DynamicAllocator.h>

Detailed Description

template<typename A1, typename... As>
struct blaze::DynamicAllocator< A1, As >

Deduction of an allocator type for dynamic vectors and matrices.

General

The DynamicAllocator type trait deduces the allocator type for dynamic vectors and matrices. Given one or two allocators, it provides a nested Type alias template, which results in the according allocator type:

blaze::DynamicAllocator<A1,A2>::Type<double> // Results in 'AlignedAllocator<double>'
Allocator for type-specific aligned memory.
Definition AlignedAllocator.h:72
Deduction of an allocator type for dynamic vectors and matrices.
Definition DynamicAllocator.h:95

In case no resulting allocator type can be determined, the nested Type template will result in blaze::NullAllocator for all possible types.


Creating custom specializations

DynamicAllocator is guaranteed to work only for all Blaze allocator types. In order to add support for user-defined allocator types it is possible to specialize the DynamicAllocator template. The following example demonstrates the according specialization for the blaze::AlignedAllocator class template:

template< typename T1, typename T2 >
{
template< typename U >
};

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