Blender V5.0
aligned_malloc.h File Reference
#include <cstddef>

Go to the source code of this file.

Macros

#define MIN_ALIGNMENT_CPU_DATA_TYPES   16
#define MIN_ALIGNMENT_DEVICE_MEMORY   32

Functions

void * util_aligned_malloc (const size_t size, const int alignment)
void util_aligned_free (void *ptr, const size_t size)
template<typename T, typename... Args>
Tutil_aligned_new (Args... args)
template<typename T>
void util_aligned_delete (T *t)

Macro Definition Documentation

◆ MIN_ALIGNMENT_CPU_DATA_TYPES

#define MIN_ALIGNMENT_CPU_DATA_TYPES   16

Definition at line 12 of file cycles/util/aligned_malloc.h.

◆ MIN_ALIGNMENT_DEVICE_MEMORY

#define MIN_ALIGNMENT_DEVICE_MEMORY   32

Definition at line 14 of file cycles/util/aligned_malloc.h.

Referenced by Device::host_alloc(), and CPUDevice::mem_alloc().

Function Documentation

◆ util_aligned_delete()

template<typename T>
void util_aligned_delete ( T * t)

Definition at line 29 of file cycles/util/aligned_malloc.h.

References T, and util_aligned_free().

◆ util_aligned_free()

void util_aligned_free ( void * ptr,
const size_t size )

◆ util_aligned_malloc()

void * util_aligned_malloc ( const size_t size,
const int alignment )

◆ util_aligned_new()

template<typename T, typename... Args>
T * util_aligned_new ( Args... args)

Definition at line 23 of file cycles/util/aligned_malloc.h.

References T, and util_aligned_malloc().