Scalar Programming - 2022.2 English

AI Engine Kernel and Graph Programming Guide (UG1079)

Document ID
UG1079
Release Date
2022-10-19
Version
2022.2 English

The compiler and scalar unit enable the programmer to use standard C data types. The following table shows standard C data types with their precisions. All types, except float and double, support signed and unsigned prefixes.

Table 1. Scalar Data Types
Data Type Precision Comment
char 8-bit signed  
short 16-bit signed  
int 32-bit signed Native support
long 64-bit signed  
float 32-bit  
double 64-bit Emulated using softfloat library. Scalar proc does not contain FPU.

It is important to remember that control flow statements such as branching are still handled by the scalar unit even in the presence of vector instructions. This concept is critical to maximizing the performance of the AI Engine.