Class task

Class Documentation

class ral::execution::task

Public Functions

task(std::vector<std::unique_ptr<ral::cache::CacheData>> inputs, std::shared_ptr<ral::cache::CacheMachine> output, size_t task_id, ral::cache::kernel *kernel, size_t attempts_limit, const std::map<std::string, std::string> &args, size_t attempts = 0)
void run(cudaStream_t stream, executor *executor)

Function which runs the kernel process on the inputs and puts results into output. This function does not modify the inputs and can throw an exception. In the case it throws an exception it gets placed back in the executor if it was a memory exception.

void complete()
void fail()
std::size_t task_memory_needed()
std::vector<std::unique_ptr<ral::cache::CacheData>> release_inputs()

This function releases the inputs of a task so that they can be manipulated. They then need to be set again with set_inputs

void set_inputs(std::vector<std::unique_ptr<ral::cache::CacheData>> inputs)

This function set the inputs of a task. It is meant to be used in conjunction with release_inputs

Public Members

std::shared_ptr<spdlog::logger> task_logger

Protected Attributes

std::vector<std::unique_ptr<ral::cache::CacheData>> inputs
std::shared_ptr<ral::cache::CacheMachine> output
size_t task_id
ral::cache::kernel *kernel
size_t attempts = 0
size_t attempts_limit
std::map<std::string, std::string> args