ac_fixed Data Type
- Include theac_fixed.hppheader file as follows:#include <sycl/ext/intel/ac_types/ac_fixed.hpp>
- Declare yourac_fixedvariables as follows:ac_fixed<N, I, true, Q, O> var_name; //Signed fixed-point numberac_fixed<N, I, false, Q, O> var_name; //Unsigned fixed-point numberThe following table describes the template parameters:Template ParameterDescriptionNThe total length of the fixed-point number in bits.IThe number of bits used to represent the integer value of the fixed-point number. The difference ofdetermines how many bits represent the fractional part of the fixed-point number.N−IQThe quantization mode that determines how to handle values where the generated precision (number of decimal places) exceeds the number of bits available in the variable to represent the fractional part of the number.For a list of quantization modes and their descriptions, refer to theQuantization and Overflowsection in https://github.com/hlslibs/ac_types/blob/v3.7/pdfdocs/ac_datatypes_ref.pdf.OThe overflow mode that determines how to handle values where the generated value has more bits than the number of bits available in the variable. For a list of overflow modes and their descriptions, refer to theQuantization and Overflowsection in https://github.com/hlslibs/ac_types/blob/v3.7/pdfdocs/ac_datatypes_ref.pdf.
Math Functions Provided by the
ac_fixed_math.hpp Header File