29 #ifndef NVBLASTMEMORY_H 30 #define NVBLASTMEMORY_H 48 return (value + 0xF)&~(T)0xF;
57 return reinterpret_cast<T
>(
reinterpret_cast<char*
>(p)+offset);
63 return reinterpret_cast<T
>(
reinterpret_cast<const char*
>(p)+offset);
68 return pointerOffset<const void*>(p, offset);
73 return pointerOffset<void*>(p, offset);
81 #define NvBlastBlockData(_dataType, _name, _accessor) \ 82 _dataType* _accessor() const \ 84 return (_dataType*)((uintptr_t)this + _name); \ 90 #define NvBlastBlockArrayData(_dataType, _name, _accessor, _sizeExpr) \ 91 _dataType* _accessor() const \ 93 return (_dataType*)((uintptr_t)this + _name); \ 95 uint32_t _accessor##ArraySize() const \ 105 #define NvBlastCreateOffsetStart(_baseOffset) \ 106 size_t _lastOffset = _baseOffset; \ 110 #define NvBlastCreateOffsetAlign16(_name, _size) \ 111 _name = align16(_lastOffset + _lastSize); \ 112 _lastOffset = _name; \ 116 #define NvBlastCreateOffsetEndAlign16() \ 117 align16(_lastOffset + _lastSize) 121 #if NV_WINDOWS_FAMILY 123 #define NvBlastAlloca(x) _alloca(x) 124 #elif NV_LINUX || NV_ANDROID 126 #define NvBlastAlloca(x) alloca(x) 127 #elif NV_APPLE_FAMILY 129 #define NvBlastAlloca(x) alloca(x) 132 #define NvBlastAlloca(x) alloca(x) 135 #define NvBlastAlloca(x) alloca(x) 138 #define NvBlastAllocaAligned16(x) (void*)(((uintptr_t)PxAlloca(x + 0xF) + 0xF) & ~(uintptr_t)0xF) 141 #endif // #ifndef NVBLASTMEMORY_H NV_INLINE T pointerOffset(void *p, ptrdiff_t offset)
Definition: NvBlastMemory.h:55
#define NV_INLINE
Definition: NvPreprocessor.h:350
NV_INLINE T align16(T value)
Definition: NvBlastMemory.h:46
Definition: NvBlastArray.h:37