CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions
edm::zero_allocator< T, Allocator > Class Template Reference

#include <zero_allocator.h>

Inheritance diagram for edm::zero_allocator< T, Allocator >:

Classes

struct  rebind
 

Public Types

using base_allocator_type = Allocator< T >
 
using value_type = T
 

Public Member Functions

Tallocate (const std::size_t n, const void *hint=nullptr)
 
 zero_allocator () throw ()
 
 zero_allocator (const zero_allocator &a) throw ()
 
template<typename U >
 zero_allocator (const zero_allocator< U > &a) throw ()
 

Detailed Description

template<typename T, template< typename X > class Allocator = oneapi::tbb::tbb_allocator>
class edm::zero_allocator< T, Allocator >

Definition at line 30 of file zero_allocator.h.

Member Typedef Documentation

template<typename T, template< typename X > class Allocator = oneapi::tbb::tbb_allocator>
using edm::zero_allocator< T, Allocator >::base_allocator_type = Allocator<T>

Definition at line 33 of file zero_allocator.h.

template<typename T, template< typename X > class Allocator = oneapi::tbb::tbb_allocator>
using edm::zero_allocator< T, Allocator >::value_type = T

Definition at line 32 of file zero_allocator.h.

Constructor & Destructor Documentation

template<typename T, template< typename X > class Allocator = oneapi::tbb::tbb_allocator>
edm::zero_allocator< T, Allocator >::zero_allocator ( )
throw (
)
inline

Definition at line 39 of file zero_allocator.h.

39 {}
template<typename T, template< typename X > class Allocator = oneapi::tbb::tbb_allocator>
edm::zero_allocator< T, Allocator >::zero_allocator ( const zero_allocator< T, Allocator > &  a)
throw (
)
inline

Definition at line 40 of file zero_allocator.h.

Allocator< T > base_allocator_type
double a
Definition: hdecay.h:119
template<typename T, template< typename X > class Allocator = oneapi::tbb::tbb_allocator>
template<typename U >
edm::zero_allocator< T, Allocator >::zero_allocator ( const zero_allocator< U > &  a)
throw (
)
inline

Definition at line 42 of file zero_allocator.h.

42 : base_allocator_type(Allocator<U>(a)) {}
Allocator< T > base_allocator_type
double a
Definition: hdecay.h:119

Member Function Documentation

template<typename T, template< typename X > class Allocator = oneapi::tbb::tbb_allocator>
T* edm::zero_allocator< T, Allocator >::allocate ( const std::size_t  n,
const void *  hint = nullptr 
)
inline

Definition at line 44 of file zero_allocator.h.

44  {
45  //T* ptr = base_allocator_type::allocate( n, hint );
46  T *ptr = base_allocator_type::allocate(n);
47  std::memset(static_cast<void *>(ptr), 0, n * sizeof(value_type));
48  return ptr;
49  }
long double T