Scalar Programming - 2023.2 English

AI Engine Kernel and Graph Programming Guide (UG1079)

Document ID
UG1079
Release Date
2023-12-04
Version
2023.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 Emulated. Scalar processor does not contain a floating point unit (FPU).
double 64-bit Emulated. Scalar processor does not contain a floating point unit (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.