|
ArrayFromFP8
Copies an array of type uchar into an array of float or double type with the given format.
bool ArrayFromFP8(
|
Overloading for the double type
bool ArrayFromFP8(
|
Parameters
dst_array[]
[out] Receiver array of type float or double.
src_array[]
[in] Source array of type uchar.
fmt
[in] Copying format from the ENUM_FLOAT8_FORMAT enumeration.
Return Value
Returns true if successful or false otherwise.
Note
All kinds of FP8 format are defined in the ENUM_FLOAT8_FORMAT enumeration and are used in MQL5 only for operations with ONNX models.
If the output parameters obtained from the OnnxRun function execution are of FP8 from the ENUM_FLOAT8_FORMAT enumeration, you can use this function to convert the result into float or double arrays.
FP8 (8-bit floating point) is one of the data types used to represent floating point numbers. In FP8, each number is represented by 8 data bits, typically divided into three components: sign, exponent and mantissa. This format offers a balance between accuracy and storage efficiency, making it attractive for applications that require memory and computational efficiency.
By employing compact number representation, FP8 reduces memory requirements and accelerates calculations. In addition, FP8 can be useful for implementing low-level operations such as arithmetic calculations and signal processing.
Example: function from the article Working with ONNX models in float16 and float8 formats
//+------------------------------------------------------------------+
|
See also