Visible to Intel only — GUID: GUID-E667B8E4-2F16-4713-974F-D08371071684
Visible to Intel only — GUID: GUID-E667B8E4-2F16-4713-974F-D08371071684
Algorithmic C Data Types
The following table summarizes the algorithmic C (AC) data types:
Data Type | Header File | Variable Declaration | Description |
---|---|---|---|
ac_int | <sycl/ext/intel/ac_types/ac_int.hpp> |
|
Arbitrary-precision integer support |
ac_fixed | <sycl/ext/intel/ac_types/ac_fixed.hpp> | ac_fixed<N, I, true, Q, O> var_name; //Signed fixed-point number ac_fixed<N, I, false, Q, O> var_name; //Unsigned fixed-point number |
Arbitrary-precision fixed-point number support. For math functions supported by this data type, refer to Math Functions Provided by the ac_fixed_math.hpp Header File. |
ac_complex | <sycl/ext/intel/ac_types/ac_complex.hpp> | Declare according to the data type of your complex number. | Complex number support |
ap_float | <sycl/ext/intel/ac_types/ap_float.hpp> | ihc::ap_float<exponent_width, mantissa_width[,rounding_mode]> | Arbitrary-precision floating-point number support. For math functions supported by this data type, refer to Math Functions Provided by ap_float_math.hpp Header File |
Compilation Flags
Data Type | SYCL Command Flags | Description |
---|---|---|
AC type |
|
Use these flags to include ac_types header files on the include path and link against AC type libraries required for the host device execution support. |
ap_float type |
|
Use these flags to ensure that floating-point operations are accurate. |
-DFPGA_EMULATOR | Compiles programs with ap_float data type for emulation. |
Explicit Conversion Functions
The following table lists the functions to convert to C signed and unsigned integer types int, long and Slong for the ac_int and ac_fixed data types:
AC Data Type | Supported Conversion Functions |
---|---|
ac_int | to_int(), to_uint(), to_long(), to_ulong(), to_int64(), to_uint64(), to_double() |
ac_fixed | to_int(), to_uint(), to_long(), to_ulong(), to_int64(), to_uint64(), to_double(), to_float() , to_ac_int() |
Math Functions Provided by the ac_fixed_math.hpp Header File
The ac_fixed_math.hpp header file adds support for the following non-standard math functions for the arbitrary precision fixed-point (ac_fixed) data type:
- sqrt_fixed
- reciprocal_fixed
- reciprocal_sqrt_fixed
- sin_fixed
- cos_fixed
- sincos_fixed
- sinpi_fixed
- cospi_fixed
- sincospi_fixed
- log_fixed
- exp_fixed
Math Functions Provided by ap_float_math.hpp Header File
The ap_float_math.hpp header file adds support for the following arbitrary precision fixed-point (ap_float) data type functions:
Function Type | Math Functions | Comment |
---|---|---|
Exponential and logarithmic functions |
|
Supported only for ap_float data types with exponent width less than or equal to 15 bits and mantissa width less than or equal to 63 bits. |
|
Supported only for ap_float data types with exponent width less than or equal to 11 bits and mantissa width less than or equal to 52 bits. | |
Advanced functions |
|
|
Power functions |
|
|
Trigonometric functions |
|