18#include <fletcher/fletcher.h>
The Kernel class is used to manage the computational kernel of the accelerator.
std::shared_ptr< Context > context()
Return the context of this Kernel.
std::shared_ptr< Context > context_
The context that this kernel should operate on.
Status WriteMetaData()
Write RecordBatch metadata from the Context to the Kernel MMIO registers.
Status PollUntilDone()
Poll the done flag of the status register for assertion (blocking). Polls at maximum speed.
Status PollUntilDoneInterval(unsigned int poll_interval_usec)
Poll (blocking) the done flag of the status register for assertion with an interval.
Status GetStatus(uint32_t *status_out)
Read the status register of the Kernel.
bool ImplementsSchemaSet(const std::vector< std::shared_ptr< arrow::Schema > > &schema_set)
Returns true if the kernel implements an operation over a set of arrow::Schemas. Not implemented.
uint32_t done_status
Status register done value.
bool metadata_written
Whether RecordBatch metadata was written.
Status GetReturn(uint32_t *ret0, uint32_t *ret1=nullptr)
Read the return registers of the Kernel. If ret1 is nullptr, REG_RETURN1 is ignored.
Status SetRange(size_t recordbatch_index, int32_t first, int32_t last)
Set the first (inclusive) and last (exclusive) row to process of some RecordBatch.
uint32_t ctrl_reset
Control register reset command value.
uint32_t ctrl_start
Control register start command value.
uint32_t done_status_mask
Status register done mask bits.
Status Start()
Start the kernel.
Status Reset()
Reset the Kernel.
Kernel(std::shared_ptr< Context > context)
Construct a new kernel that can operate within a specific context.
Status SetArguments(const std::vector< uint32_t > &arguments)
Set custom arguments to the kernel. Writes consecutive MMIO registers starting from custom register o...
Contains all Fletcher classes and functions for use in run-time applications.
Status return value of all Fletcher run-time functions.