ImFusion C++ SDK 4.5.0
ImFusion::CUDA::ExecutionConfig Class Reference

Public Member Functions

 ExecutionConfig ()
 Constructor without a shape. setShape or setShapeToCover will need to be called in order to obtain a valid configuration.
 ExecutionConfig (vec3i grid, vec3i block)
void addArgument (const DeviceBufferView *buff)
void addArgument (const DeviceBufferView &buff)
void addArgument (const ArrayBufferView *arr)
void addArgument (const ArrayBufferView &arr)
void addArgument (const KernelBuffer &buff)
void addArgument (char x)
void addArgument (unsigned char x)
void addArgument (int x)
void addArgument (unsigned int x)
void addArgument (float x)
void addArgument (size_t x)
void addArgument (const vec3i &x)
void addArgument (const vec4i &x)
void addArgument (const vec3f &x)
void addArgument (const vec4f &x)
template<typename T, typename... Args>
void addArguments (const T &arg, Args &&... others)
 Convenience method for adding multiple arguments in a single line.
void setShape (const vec3i &grid, const vec3i &block)
 Sets the shapes of the grid and the block size.
void setShape (int grid, int block)
 Equivalent to setShape(vec3i(grid, 1, 1), vec3i(block, 1, 1).
void setShapeToCover (int totalSize, int block)
 Sets the shape of the grid so that the kernel execution will cover the specified size given the provided block shape.
void setShapeToCover (vec3i totalSize, vec3i block)
size_t numArgs () const
const std::vector< size_t > & argsSizes () const
std::vector< void * > argsPointers () const
bool isValid () const
void setArgumentBuffer (std::vector< char > argsBuffer, std::vector< size_t > argsIndices, std::vector< size_t > argsSizes)

Public Attributes

vec3i gridShape = {0, 0, 0}
vec3i blockShape = {0, 0, 0}

Member Function Documentation

◆ setShapeToCover()

void ImFusion::CUDA::ExecutionConfig::setShapeToCover ( int totalSize,
int block )

Sets the shape of the grid so that the kernel execution will cover the specified size given the provided block shape.

For example with totalSize = 100, block = 16 the grid will have size 7 so that 16*7 >= 100 Equivalent to setShapeToCover(vec3i(totalSize, 1, 1), vec3i(block, 1, 1)


The documentation for this class was generated from the following file:
  • ImFusion/CUDA/ExecutionConfig.h
Search Tab / S to search, Esc to close