Contains classes that implement memory allocation and deallocation.
More...
|
class | BufferView< T > |
| Class that refers to a contiguous sequence of objects, but doesn't control allocated memory buffer and objects lifetime, user is responsible for correct memory management and deallocation. More...
|
|
class | Collection< T > |
| Class that implements functionality of the Collection container. More...
|
|
class | Atomic< dataType > |
| Class that represents an atomic object. More...
|
|
class | DeleterIface |
| Interface for a utility class used within SharedPtr to delete an object when the object owner is destroyed. More...
|
|
class | ObjectDeleter< T > |
| Implementation of DeleterIface to destroy a pointer by the delete operator. More...
|
|
class | ServiceDeleter |
| Implementation of DeleterIface to destroy a pointer by the daal_free function. More...
|
|
class | EmptyDeleter |
| Implementation of DeleterIface without pointer destroying. More...
|
|
class | RefCounter |
| Implementation of reference counter. More...
|
|
class | RefCounterImp< Deleter > |
| Provides implementations of the operator() method of the RefCounter class. More...
|
|
class | SharedPtr< T > |
| Shared pointer that retains shared ownership of an object through a pointer. Several SharedPtr objects may own the same object. The object is destroyed and its memory deallocated when either of the following happens:
1) the last remaining SharedPtr owning the object is destroyed.
2) the last remaining SharedPtr owning the object is assigned another pointer via operator=.
The object is destroyed using the delete operator. More...
|
|
class | String |
| Class that implements functionality of the string, an object that represents a sequence of characters. More...
|
|
class | StringView |
| Class that implements functionality of the string but doesn't manage provided memory, user is responsible for correct memory management and deallocation. More...
|
|
class | Buffer< T > |
| Class that provides simple memory management routines for handling blocks of continues memory, also provides automatic memory deallocation. Note this class doesn't provide functionality for objects constructions and simply allocates and deallocates memory. In case of objects consider Collection or ObjectPtrCollection. More...
|
|
|
template<class T , class U > |
SharedPtr< T > | staticPointerCast (const SharedPtr< U > &r) |
|
template<class T , class U > |
SharedPtr< T > | reinterpretPointerCast (const SharedPtr< U > &r) |
|
template<class T , class U > |
SharedPtr< T > | dynamicPointerCast (const SharedPtr< U > &r) |
|
template<class U > |
| SharedPtr (const SharedPtr< U > &other) |
|
template<class U > |
| SharedPtr (const SharedPtr< U > &r, T *ptr, T *shiftedPtr) |
|
void | _remove () |
|
SharedPtr< T > & | operator= (const SharedPtr< T > &ptr) |
|
template<class U > |
void | reset (U *ptr) |
|
template<class U , class D > |
void | reset (U *ptr, const D &deleter) |
|
DAAL_EXPORT void * | daal_malloc (size_t size, size_t alignment=DAAL_MALLOC_DEFAULT_ALIGNMENT) |
|
DAAL_EXPORT void * | daal_calloc (size_t size, size_t alignment=DAAL_MALLOC_DEFAULT_ALIGNMENT) |
|
DAAL_EXPORT void | daal_free (void *ptr) |
|
DAAL_DEPRECATED DAAL_EXPORT void | daal_memcpy_s (void *dest, size_t numberOfElements, const void *src, size_t count) |
|
Decreases the reference count If the reference count becomes equal to zero, deletes the owned pointer
DAAL_EXPORT void* daal::services::daal_calloc |
( |
size_t |
size, |
|
|
size_t |
alignment = DAAL_MALLOC_DEFAULT_ALIGNMENT |
|
) |
| |
Allocates and initializes with zero an aligned block of memory
- Parameters
-
[in] | size | Size of the block of memory in bytes |
[in] | alignment | Alignment constraint. Must be a power of two |
- Returns
- Pointer to the beginning of a newly allocated zero-filled block of memory
DAAL_EXPORT void daal::services::daal_free |
( |
void * |
ptr | ) |
|
Deallocates the space previously allocated by daal_malloc
- Parameters
-
[in] | ptr | Pointer to the beginning of a block of memory to deallocate |
DAAL_EXPORT void* daal::services::daal_malloc |
( |
size_t |
size, |
|
|
size_t |
alignment = DAAL_MALLOC_DEFAULT_ALIGNMENT |
|
) |
| |
Allocates an aligned block of memory
- Parameters
-
[in] | size | Size of the block of memory in bytes |
[in] | alignment | Alignment constraint. Must be a power of two |
- Returns
- Pointer to the beginning of a newly allocated block of memory
DAAL_DEPRECATED DAAL_EXPORT void daal::services::daal_memcpy_s |
( |
void * |
dest, |
|
|
size_t |
numberOfElements, |
|
|
const void * |
src, |
|
|
size_t |
count |
|
) |
| |
Copies bytes between buffers
- Parameters
-
[out] | dest | Pointer to new buffer |
[in] | numberOfElements | Size of new buffer |
[in] | src | Pointer to source buffer |
[in] | count | Number of bytes to copy. |
- Deprecated:
- This item will be removed in a future release.
SharedPtr<T> daal::services::interface1::dynamicPointerCast |
( |
const SharedPtr< U > & |
r | ) |
|
Creates a new instance of SharedPtr whose managed object type is obtained from the type of the managed object of r using a cast expression. Both shared pointers share ownership of the managed object. The managed object of the resulting SharedPtr is obtained by calling dynamic_cast<T*>(r.get()).
SharedPtr< T > & operator= |
( |
const SharedPtr< T > & |
ptr | ) |
|
Makes a copy of an input shared pointer and increments the reference count
- Parameters
-
[in] | ptr | Shared pointer to copy |
SharedPtr<T> daal::services::interface1::reinterpretPointerCast |
( |
const SharedPtr< U > & |
r | ) |
|
Creates a new instance of SharedPtr whose managed object type is obtained from the type of the managed object of r using a cast expression. Both shared pointers share ownership of the managed object. The managed object of the resulting SharedPtr is obtained by calling reinterpret_cast<T*>(r.get()).
Releases managed pointer, takes an ownership of ptr with default deleter
- Template Parameters
-
U | Class of the managed object |
- Parameters
-
[in] | ptr | Pointer to the managed object |
void reset |
( |
U * |
ptr, |
|
|
const D & |
deleter |
|
) |
| |
Releases managed pointer, takes an ownership of ptr with deleter D
- Template Parameters
-
U | Class of the managed object |
D | Class of the deleter object |
- Parameters
-
[in] | ptr | Pointer to the managed object |
[in] | deleter | Object used to delete the pointer when the reference count becomes equal to zero |
Constructs a shared pointer from another shared pointer of the same type
- Parameters
-
[in] | other | Input shared pointer |
SharedPtr |
( |
const SharedPtr< U > & |
r, |
|
|
T * |
ptr, |
|
|
T * |
shiftedPtr |
|
) |
| |
Aliasing constructor: constructs a SharedPtr that shares ownership information with r, but holds an unrelated and unmanaged ptr pointer. Even if this SharedPtr is the last of the group to go out of scope, it calls the destructor for the object originally managed by r. However, calling get() on this always returns a copy of ptr. It is the responsibility of a programmer to make sure this ptr remains valid as long as this SharedPtr exists, such as in the typical use cases where ptr is a member of the object managed by r or is an alias (e.g., downcast) of r.get()
SharedPtr<T> daal::services::interface1::staticPointerCast |
( |
const SharedPtr< U > & |
r | ) |
|
Creates a new instance of SharedPtr whose managed object type is obtained from the type of the managed object of r using a cast expression. Both shared pointers share ownership of the managed object. The managed object of the resulting SharedPtr is obtained by calling static_cast<T*>(r.get()).