37 resize(s + inSize *
sizeof(Type));
40 Type *
data =
reinterpret_cast<Type *
>(&
at(s));
43 for (Type *d =
data, *d_end =
data + inSize; d < d_end; ++d)
54 size_t size = inData.
size() *
sizeof(Type);
61 const Type *
Get(
size_t inPosition)
const
63 return reinterpret_cast<const Type *
>(&
at(inPosition));
68 Type *
Get(
size_t inPosition)
70 return reinterpret_cast<Type *
>(&
at(inPosition));
std::uint8_t uint8
Definition Core.h:482
#define JPH_NAMESPACE_END
Definition Core.h:414
#define JPH_NAMESPACE_BEGIN
Definition Core.h:408
#define JPH_ASSERT(...)
Definition IssueReporting.h:33
constexpr bool IsPowerOf2(T inV)
Check if inV is a power of 2.
Definition Math.h:76
T AlignUp(T inV, uint64 inAlignment)
Align inV up to the next inAlignment bytes.
Definition Math.h:83
void resize(size_type inNewSize)
Resize array to new length.
Definition Array.h:120
const T * data() const
Definition Array.h:444
size_type size() const
Returns amount of elements in the array.
Definition Array.h:320
T & at(size_type inIdx)
Access element.
Definition Array.h:468
Simple byte buffer, aligned to a cache line.
Definition ByteBuffer.h:16
Type * Get(size_t inPosition)
Get object at inPosition (an offset in bytes)
Definition ByteBuffer.h:68
Type * Allocate(size_t inSize=1)
Allocate block of data of inSize elements and return the pointer.
Definition ByteBuffer.h:33
void AppendVector(const Array< Type > &inData)
Append inData to the buffer.
Definition ByteBuffer.h:52
size_t Align(size_t inSize)
Align the size to a multiple of inSize, returns the length after alignment.
Definition ByteBuffer.h:19
const Type * Get(size_t inPosition) const
Get object at inPosition (an offset in bytes)
Definition ByteBuffer.h:61