Flatten Function¶
Syntax
#pragma HLS function flatten branchless(true|false)
Description
This pragma unrolls all loops and inlines all subfunctions for a given function.
If the branchless
option is set to true, all branches (e.g., if-else,
switch) in the specified function will also be flatten to allow more
parallelism between operations, specifically between the operations that are
under different-yet-independent conditions.
Parameters
Parameter |
Value |
Optional |
Default |
Description |
---|---|---|---|---|
|
|
Yes |
|
|
Position
At the beginning of the function definition block.
Examples
int sum(int *a) {
#pragma HLS function flatten branchless(true)
...
}