A Context for a platform where a RecordBatches can be prepared for processing by the Kernel.
More...
#include <context.h>
A Context for a platform where a RecordBatches can be prepared for processing by the Kernel.
Definition at line 83 of file context.h.
◆ Context()
fletcher::Context::Context |
( |
std::shared_ptr< Platform > |
platform | ) |
|
|
inlineexplicit |
Context constructor.
- Parameters
-
[in] | platform | A platform to construct the context on. |
Definition at line 89 of file context.h.
◆ ~Context()
fletcher::Context::~Context |
( |
| ) |
|
Deconstruct the context object, freeing all allocated device buffers.
◆ device_buffer()
DeviceBuffer fletcher::Context::device_buffer |
( |
size_t |
i | ) |
const |
|
inline |
◆ Enable()
Status fletcher::Context::Enable |
( |
| ) |
|
Enable the usage of the enqueued buffers by the device.
◆ GetQueueSize()
size_t fletcher::Context::GetQueueSize |
( |
| ) |
const |
Obtain the size (in bytes) of all buffers currently enqueued.
◆ Make()
static Status fletcher::Context::Make |
( |
std::shared_ptr< Context > * |
context, |
|
|
const std::shared_ptr< Platform > & |
platform |
|
) |
| |
|
static |
Create a new context on a specific platform.
- Parameters
-
[out] | context | A pointer to a shared pointer that will own the new Context. |
[in] | platform | The platform to create the Context on. |
- Returns
- Status::OK() if successful, otherwise a descriptive error status.
◆ num_buffers()
uint64_t fletcher::Context::num_buffers |
( |
| ) |
const |
Return the number of device buffers in this context.
◆ num_recordbatches()
uint64_t fletcher::Context::num_recordbatches |
( |
| ) |
const |
|
inline |
Return the number of RecordBatches in this context.
Definition at line 135 of file context.h.
◆ platform()
std::shared_ptr< Platform > fletcher::Context::platform |
( |
| ) |
const |
|
inline |
Return the platform this context is active on.
Definition at line 122 of file context.h.
◆ QueueRecordBatch()
Status fletcher::Context::QueueRecordBatch |
( |
const std::shared_ptr< arrow::RecordBatch > & |
record_batch, |
|
|
MemType |
mem_type = MemType::ANY |
|
) |
| |
Enqueue an arrow::RecordBatch for usage on the device.
This function utilizes Arrow metadata in the schema of the RecordBatch to determine whether or not some field (i.e. some Array in the internal structure) will be used on the device.
- Parameters
-
[in] | record_batch | The arrow::RecordBatch to queue |
[in] | mem_type | Force caching; i.e. the RecordBatch is guaranteed to be copied to on-board memory. |
- Returns
- Status::OK() if successful, otherwise a descriptive error status.
◆ recordbatch()
std::shared_ptr< arrow::RecordBatch > fletcher::Context::recordbatch |
( |
size_t |
i | ) |
const |
|
inline |
Return the i-th arrow::RecordBatch of this context.
- Parameters
-
[in] | i | The index of the arrow::RecordBatch to return. |
- Returns
- A shared pointer to the arrow::RecordBatch.
Definition at line 142 of file context.h.
◆ device_buffers_
std::vector<DeviceBuffer> fletcher::Context::device_buffers_ |
|
protected |
Prepared/cached buffers on the device.
Definition at line 154 of file context.h.
◆ host_batch_desc_
std::vector<RecordBatchDescription> fletcher::Context::host_batch_desc_ |
|
protected |
The descriptions of the RecordBatches on the host side.
Definition at line 150 of file context.h.
◆ host_batch_memtype_
std::vector<MemType> fletcher::Context::host_batch_memtype_ |
|
protected |
Whether the RecordBatch must be prepared or cached for the device.
Definition at line 152 of file context.h.
◆ host_batches_
std::vector<std::shared_ptr<arrow::RecordBatch> > fletcher::Context::host_batches_ |
|
protected |
The RecordBatches on the host side.
Definition at line 148 of file context.h.
◆ platform_
std::shared_ptr<Platform> fletcher::Context::platform_ |
|
protected |
The platform this context is running on.
Definition at line 146 of file context.h.
The documentation for this class was generated from the following file: