Class GenericMemoryVector

Inheritance Relationships

Derived Type

Class Documentation

class GenericMemoryVector

Pure abstract memory vector

Subclassed by flamegpu::detail::MemoryVector< T >

Public Functions

inline virtual ~GenericMemoryVector()

Acts as a multiplier

virtual const std::type_index &getType() const = 0

Returns the type index of the base type of an element.

virtual unsigned int getElements() const = 0

Returns the number of elements in a variable This is likely to be 1 unless the variable is an array variable

See also

getTypeSize()

virtual size_t getTypeSize() const = 0

Returns the size (in bytes) of a base type of an element of the MemoryVector e.g. = type size = variable size / elements

See also

getElements()

virtual size_t getVariableSize() const = 0

Returns the size (in bytes) of a single element of the MemoryVector. e.g. variable size = type size * elements

See also

getElements()

See also

getTypeSize()

virtual void *getDataPtr() = 0

Returns a pointer to the front of the internal buffer

Note

If the vector is resized the pointer will become invalid

virtual const void *getReadOnlyDataPtr() const = 0

Returns a const pointer to the front of the internal buffer

Note

If the vector is resized the pointer will become invalid

virtual GenericMemoryVector *clone() const = 0

Returns a copy of the vector with the same contents

virtual void resize(unsigned int t) = 0

Resize the buffer to hold t items

Parameters:

t – The size of the buffer (in terms of items, not bytes)