Class function

Inheritance Relationships

Base Type

Class Documentation

class legion::core::compute::function : public legion::core::compute::function_base

Public Functions

inline function(std::string name)
function() = default
inline function(function &&other) noexcept
inline function(const function &other)
inline function &operator=(const function &other)
inline function &operator=(function &&other)
inline void setProgram(Program &&p)

Sets the program from which to create the wrapped kernel.

template<typename ...Args>
inline common::result<void, void> operator()(std::variant<size_type, math::ivec2, math::ivec3> dispatch_size, Args&&... args)

Invokes the wrapped kernel with the passed buffers.


Ok() if the kernel succeeded or Err() otherwise

  • dispatch_size: How many items to process.

  • args: a collection of either vectors and wrapped vectors or compute::Buffers

inline bool isValid() const
inline size_type setLocalSize(size_type locals)

Sets how many work-elements should be processed concurrently.


How many parallel processes are going to be used.

  • locals: Number of parallel processes or 0, when 0 the measured max will be used.

Public Static Functions

static inline void from_resource(function *value, const filesystem::basic_resource &resource)