Developer Guide

Contents

Algorithmic C Data Types

The following table summarizes the algorithmic C (AC) data types:
Algorithmic C Data Types Supported by the
Intel® oneAPI
DPC++/C++
Compiler
Data Type
Header File
Variable Declaration
Description
ac_int
sycl/ext/intel/ac_types/ac_int.hpp
  • Template-based declaration:
    ac_int<
    N
    , true> var_name; //Signed N-bit integer
    ac_int<
    N
    , false> var_name; //Unsigned N-bit integer
  • Predefined types up to 63 bits:
    ac_int
    N
    ::int
    N
    var_name; //Signed N-bit integer
    ac_int
    N
    ::uint
    N
    var_name; //Unsigned N-bit integer
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
hls_float
sycl/ext/intel/ac_types/hls_float.hpp
ihc::hls_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 hls_float_math.hpp Header File

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
hls_float_math.hpp
Header File

The
hls_float_math.hpp
header file adds support for the following arbitrary precision fixed-point (
hls_float
) data type functions:
Math Functions Provided by
hls_float_math.hpp
Header File
Function Type
Math Functions
Comment
Exponential and logarithmic functions
  • ln
  • log
    2
    ,
    log
    10
  • e
    x
    ,
    2
    x
    ,
    10
    x
Supported only for
hls_float
data types with exponent width less than or equal to 15 bits and mantissa width less than or equal to 63 bits.
  • ln(1+x)
  • e
    x
    −1
Supported only for
hls_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
  • reciprocal
  • reciprocal_sqrt
  • sqrt
  • cube root
  • hypot
    (hypotenuse)
Power functions
  • pow
  • powr
  • pown
Trigonometric functions
  • sin
    ,
    cos
    ,
    sincos
  • sinpi
    ,
    cospi
  • asin
    ,
    asinpi
  • acos
    ,
    acospit
  • atan
    ,
    atanpi
    ,
    atan2

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.