Accelerated functions setup

The easiest way to start, is by looking at the examples provided for each HUGenomic core. You can find the examples also in the accelerated functions section of this guide.

To execute one of the accelerated HUGenomic core you first need to configure the FPGA with the specific HUGenomic core you want to use.

Once the computation is over, or whenever you want to reconfigure the FPGA with a new HUGenomic core, remember to release and reconfigure the FPGA.

On this page you can find the methods in hugenomic.hpp to perform the aforementioned operations.

Copyright (c) 2019, Huxelerate S.r.l. All rights reserved.

namespace hugenomic

Enums

enum hugenomic_core

The HUGenomic cores available within the HUGenomic library.

Values:

smith_waterman
dynamic_time_warping
ksw2_score
ksw2_cigar

Functions

void fpga_configure(hugenomic_core core, uint32_t fpga_id)

Configure an HUGenomic core onto one of the available FPGAs. The number of available FPGAs varies according to the AWS F1 instance being selected (https://aws.amazon.com/it/ec2/instance-types/f1/):

  • f1.2xlarge: 1 FPGA (fpga id: 0)

  • f1.4xlarge: 2 FPGAs (fpga id from 0 to 1)

  • f1.16xlarge 8 FPGAs (fpga id from 0 to 7)

Parameters
  • core: The HUGenomic core to configure on the FPGA

  • fpga_id: Identifier of the FPGA

Exceptions

void fpga_release(uint32_t fpga_id)

Release the resources allocated to a specific FPGA.

Parameters
  • fpga_id: The identifier of the FPGA (from 0 to 7)

Exceptions

uint32_t get_available_fpgas()

Return the number of available FPGAs on the current instance.

Note

When using the software emulator, this method always returns MAX_NUM_FPGA_PER_INSTANCE.

Return

The number of available FPGAs

Variables

const uint32_t MAX_NUM_FPGA_PER_INSTANCE = 8

The maximum number of FPGAs per AWS F1 instance.