| AI Engine-ML v2 Intrinsics User Guide v2025.2

Loading...
Searching...
No Matches
Data Structures
Scalar Data Types

All the standard C scalar data-types are supported. More...

## Data Structures
class | bfloat16
| Brain floating point 16-bit: 1 bit sign, 8 bits exponent, 7 bits mantissa. More...
class | bfloat8
| Brain floating point 8-bit: 1 bit sign, 5 bits exponent, 2 bits mantissa. More...
struct | cbfloat16
struct | cfloat
class | float
| Emulated data type following IEEE-754 standard: 1 bit sign, 8 bits exponent, 23 bits mantissa. More...
class | float16
| Following IEEE-754 standard half precision: 5 bits exponent, 10 bits mantissa. More...
class | float8
| Floating point 8-bit: 1 bit sign, 4 bits exponent, 3 bits mantissa. More...
struct | mx4
| Shared exponent (formerly block floating-point or bfp) 3-bit mantissa, but represented as mx6 internally. More...
struct | mx6
| Shared exponent (formerly block floating-point or bfp) 5-bit mantissa. More...
struct | mx9
| Shared exponent (formerly block floating-point or bfp) 8-bit mantissa. More...

## Detailed Description

All the standard C scalar data-types are supported.

Emulated complex floating point 32-bit: 1 bit sign, 8 bits exponent, 23 bits mantissa.

Emulated complex brain floating point 16-bit: 1 bit sign, 8 bits exponent, 7 bits mantissa.

- char - 8 bit signed
- short - 16 bit signed
- int - 32 bit signed
- float - emulated type, 32 bit
- double - emulated type, 64 bit
- long double - emulated type, 64 bit
- long long - 64 bit signed

Note
  All types except float/double support signed and unsigned prefixes

## Data Structure Documentation

## ◆ bfloat16

class bfloat16

Brain floating point 16-bit: 1 bit sign, 8 bits exponent, 7 bits mantissa.

## ◆ bfloat8

class bfloat8

Brain floating point 8-bit: 1 bit sign, 5 bits exponent, 2 bits mantissa.

## ◆ cbfloat16

struct cbfloat16

### Public Member Functions
| cbfloat16 (bfloat16 a, bfloat16 b)
### Data Fields
bfloat16 | imag
bfloat16 | real

#### Constructor & Destructor Documentation

## ◆ cbfloat16()

cbfloat16::cbfloat16 | ( | bfloat16 | a,
|  | bfloat16 | b )

#### Field Documentation

## ◆ imag

bfloat16 cbfloat16::imag

## ◆ real

bfloat16 cbfloat16::real

## ◆ cfloat

struct cfloat

### Public Member Functions
| cfloat (float a, float b)
### Data Fields
float | imag
float | real

#### Constructor & Destructor Documentation

## ◆ cfloat()

cfloat::cfloat | ( | float | a,
|  | float | b )

#### Field Documentation

## ◆ imag

float cfloat::imag

## ◆ real

float cfloat::real

## ◆ float

class float

Emulated data type following IEEE-754 standard: 1 bit sign, 8 bits exponent, 23 bits mantissa.

## ◆ float16

class float16

Following IEEE-754 standard half precision: 5 bits exponent, 10 bits mantissa.

## ◆ float8

class float8

Floating point 8-bit: 1 bit sign, 4 bits exponent, 3 bits mantissa.

## ◆ mx4

struct mx4

Shared exponent (formerly block floating-point or bfp) 3-bit mantissa, but represented as mx6 internally.

## ◆ mx6

struct mx6

Shared exponent (formerly block floating-point or bfp) 5-bit mantissa.

## ◆ mx9

struct mx9

Shared exponent (formerly block floating-point or bfp) 8-bit mantissa.