FNNEBufferAllocator
Visitor that allocates appropriate buffer types based on space definitions.
This visitor traverses space definitions and creates corresponding buffer instances with appropriate sizes and types for neural network inference.
struct FNNEBufferAllocator : public ConstSpaceVisitorMethods
FNNEBufferAllocator
inline FNNEBufferAllocator(TInstancedStruct<FNNEPointBuffer> &OutBuffer)Constructor that takes a reference to the output buffer.
Parameters
OutBuffer(TInstancedStruct<FNNEPointBuffer>)
operator()
virtual void operator()(const FDictSpace &InSpace) overrideVisit operation for dictionary spaces.
Parameters
InSpace(const FDictSpace)
operator()
virtual void operator()(const FBoxSpace &InSpace) overrideVisit operation for box spaces.
Parameters
InSpace(const FBoxSpace)
operator()
virtual void operator()(const FMultiBinarySpace &InSpace) overrideVisit operation for multi-binary spaces.
Parameters
InSpace(const FMultiBinarySpace)
operator()
virtual void operator()(const FDiscreteSpace &InSpace) overrideVisit operation for discrete spaces.
Parameters
InSpace(const FDiscreteSpace)
operator()
virtual void operator()(const FMultiDiscreteSpace &InSpace) overrideVisit operation for multi-discrete spaces.
Parameters
InSpace(const FMultiDiscreteSpace)
AllocateBuffer
static inline void AllocateBuffer(const TInstancedStruct<FSpace> &InSpace, TInstancedStruct<FNNEPointBuffer> &OutBuffer)Static utility function to allocate a buffer based on a space definition.
Parameters
-
InSpace(const TInstancedStruct<FSpace>) -
OutBuffer(TInstancedStruct<FNNEPointBuffer>)
Attributes
Buffer
TInstancedStruct<FNNEPointBuffer> &BufferReference to the buffer being allocated.
Source: Source/ScholaNNE/Public/NNEUtils/NNEBufferAllocator.h