Skip to content

Latest commit

 

History

History
60 lines (41 loc) · 1.51 KB

README.md

File metadata and controls

60 lines (41 loc) · 1.51 KB

Fletcher C++ Run-time Library

The Fletcher C++ Run-time Library enables support for Fletcher-based accelerated applications.

Build & install

Requirements

Build

mkdir build
cmake ..
make
sudo make install

Example usage

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.

Documentation

C++ API Documentation