LightsprintSDK 2021.08.08
rr::RRAligned Class Reference

#include <RRMemory.h>

Inheritance diagram for rr::RRAligned:
rr::RRUniformlyAllocated rr::RRAlignedNonCopyable rr::RRRay rr::RRCollider

Public Member Functions

void * operator new (std::size_t n)
 
void * operator new[] (std::size_t n)
 
void operator delete (void *p, std::size_t n)
 
void operator delete[] (void *p, std::size_t n)
 
- Public Member Functions inherited from rr::RRUniformlyAllocated
void * operator new (std::size_t n)
 
void * operator new[] (std::size_t n)
 
void operator delete (void *p, std::size_t n)
 
void operator delete[] (void *p, std::size_t n)
 

Detailed Description

When used as base class, instances on heap are 16byte aligned for SIMD instructions. Note that this does not align static and stack instances.

Member Function Documentation

◆ operator new()

void * rr::RRAligned::operator new ( std::size_t  n)

Allocates aligned space for instance of any derived class.

◆ operator new[]()

void * rr::RRAligned::operator new[] ( std::size_t  n)

Allocates aligned space for array of instances of any derived class.

◆ operator delete()

void rr::RRAligned::operator delete ( void *  p,
std::size_t  n 
)

Frees aligned space allocated by new.

◆ operator delete[]()

void rr::RRAligned::operator delete[] ( void *  p,
std::size_t  n 
)

Frees aligned space allocated by new[].