| AI Engine-ML v2 Intrinsics User Guide (v2026.1)

Loading...
Searching...
No Matches
Functions
Integer Operations
Scalar Operations

Scalar division step intrinsic. More...

## Functions
void | dstep (unsigned, unsigned, unsigned &, unsigned &, unsigned)
int | scalar_abs (int a)
| Scalar absolute value intrinsic.

## Scalar select intrinsics
Scalar select These instructions are equivalent to the ternary ?: operator and should normally be inferred by the compiler automatically.
char | select (bool, char, char)
unsigned char | select (bool, unsigned char, unsigned char)
signed short | select (bool, signed short, signed short)
unsigned short | select (bool, unsigned short, unsigned short)
int | select (bool, int, int)
unsigned int | select (bool, unsigned int, unsigned int)
long | select (bool, long, long)
unsigned long | select (bool, unsigned long, unsigned long)
void * | select (bool, void *, void *)

## Integer delay line
int | delay1 (int)
int | delay2 (int)
int | delay3 (int)
int | delay4 (int)
int | delay5 (int)
int | delay6 (int)

## Pointer delay line
void * | delay1 (void *)
void * | delay2 (void *)
void * | delay3 (void *)
void * | delay4 (void *)
void * | delay5 (void *)
void * | delay6 (void *)

## Leading bit count
unsigned | clb (int n)
| Count number of leading consecutive bits. If a is positive, count leading 0's, otherwise count leading 1's.
unsigned | clb (unsigned n)
| Count number of leading consecutive 0's.
unsigned | clb (long long a)
| Count number of leading consecutive bits. If a is positive, count leading 0's, otherwise count leading 1's.
unsigned | clb (unsigned long long a)
| Count number of leading consecutive 0's.

## Population count
unsigned int | population_count (unsigned int)
unsigned int | population_count (int)

## NOP
void | nop (unsigned delay)
| Insert pipeline bubbles in the micro-code.
void | nop ()
| Insert 2 pipeline bubbles in the micro-code.

## Detailed Description

Scalar division step intrinsic.

## Function Documentation

## ◆ clb() [1/4]

unsigned clb | ( | int | n | ) |

Count number of leading consecutive bits. If a is positive, count leading 0's, otherwise count leading 1's.

## ◆ clb() [2/4]

unsigned clb | ( | long long | a | ) |

Count number of leading consecutive bits. If a is positive, count leading 0's, otherwise count leading 1's.

## ◆ clb() [3/4]

unsigned clb | ( | unsigned long long | a | ) |

Count number of leading consecutive 0's.

## ◆ clb() [4/4]

unsigned clb | ( | unsigned | n | ) |

Count number of leading consecutive 0's.

## ◆ delay1() [1/2]

int delay1 | ( | int |  | ) |

## ◆ delay1() [2/2]

void * delay1 | ( | void * |  | ) |

## ◆ delay2() [1/2]

int delay2 | ( | int |  | ) |

## ◆ delay2() [2/2]

void * delay2 | ( | void * |  | ) |

## ◆ delay3() [1/2]

int delay3 | ( | int |  | ) |

## ◆ delay3() [2/2]

void * delay3 | ( | void * |  | ) |

## ◆ delay4() [1/2]

int delay4 | ( | int |  | ) |

## ◆ delay4() [2/2]

void * delay4 | ( | void * |  | ) |

## ◆ delay5() [1/2]

int delay5 | ( | int |  | ) |

## ◆ delay5() [2/2]

void * delay5 | ( | void * |  | ) |

## ◆ delay6() [1/2]

int delay6 | ( | int |  | ) |

## ◆ delay6() [2/2]

void * delay6 | ( | void * |  | ) |

## ◆ dstep()

void dstep | ( | unsigned | ,
|  | unsigned | ,
|  | unsigned & | ,
|  | unsigned & | ,
|  | unsigned | )

## ◆ nop() [1/2]

void nop | ( |  | ) |

Insert 2 pipeline bubbles in the micro-code.

Note
  Subsequent nops will be collapsed into a single nop (only the maximum value will be seen).

## ◆ nop() [2/2]

void nop | ( | unsigned | delay | ) |

Insert pipeline bubbles in the micro-code.

Parameters

  delay | Number of cycles between two instructions.

Note
  Delay must be a compile time constant.
  Subsequent nops will be collapsed into a single nop (only the maximum value will be seen).

## ◆ population_count() [1/2]

unsigned int population_count | ( | int |  | ) |

## ◆ population_count() [2/2]

unsigned int population_count | ( | unsigned int |  | ) |

## ◆ scalar_abs()

int scalar_abs | ( | int | a | ) |

Scalar absolute value intrinsic.

## ◆ select() [1/9]

char select | ( | bool | ,
|  | char | ,
|  | char | )

## ◆ select() [2/9]

int select | ( | bool | ,
|  | int | ,
|  | int | )

## ◆ select() [3/9]

long select | ( | bool | ,
|  | long | ,
|  | long | )

## ◆ select() [4/9]

signed short select | ( | bool | ,
|  | signed short | ,
|  | signed short | )

## ◆ select() [5/9]

unsigned char select | ( | bool | ,
|  | unsigned char | ,
|  | unsigned char | )

## ◆ select() [6/9]

unsigned int select | ( | bool | ,
|  | unsigned int | ,
|  | unsigned int | )

## ◆ select() [7/9]

unsigned long select | ( | bool | ,
|  | unsigned long | ,
|  | unsigned long | )

## ◆ select() [8/9]

unsigned short select | ( | bool | ,
|  | unsigned short | ,
|  | unsigned short | )

## ◆ select() [9/9]

void * select | ( | bool | ,
|  | void * | ,
|  | void * | )