Intel® High Level Synthesis Compiler Pro Edition: Reference Manual

ID 683349
Date 10/04/2021
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

3.3.2. Overloaded Functions

HLS component functions can be overloaded, but HLS task functions cannot because the ihc::launch and ihc::collect calls cannot distinguish between overloaded variants of a task function.

To overload a component function, define multiple variants of the function.

For example:
component int mult (int a, int b) {
  return a * b;
}

component float mult (float a, float b) {
  return a * b;
}