The Fletcher C++ Run-time Library enables support for Fletcher-based accelerated applications.
- Apache Arrow 7.0+ C++ run-time and development headers.
- A C++17 compliant compiler
- CMake 3.14
mkdir build
cmake ..
make
sudo make install
Include:
#include <fletcher/api.h>
Example snippet:
using fletcher::Platform;
using fletcher::Context;
using fletcher::Kernel;
// Given a RecordBatch:
std::shared_ptr<arrow::RecordBatch> batch = ...
std::shared_ptr<Platform> platform;
std::shared_ptr<Context> context;
Platform::Make(&platform); // Create an interface to an auto-detected FPGA Platform.
platform->Init(); // Initialize the Platform.
Context::Make(&context, platform); // Create a Context for our data on the Platform.
context->QueueRecordBatch(number_batch); // Queue the RecordBatch to the Context.
context->Enable(); // Enable the Context, (potentially transferring the data to FPGA).
Kernel kernel(context); // Set up an interface to the Kernel, supplying the Context.
kernel.Start(); // Start the kernel.
kernel.PollUntilDone(); // Wait for the kernel to finish.
kernel.GetReturn(&result); // Obtain the result.