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

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

## Functions
void | acquire_equal (chess_protect_access const void chess_storage(TM) *a, unsigned id, unsigned val)
void | acquire_equal (chess_protect_access const void chess_storage(TM) *a, unsigned id, unsigned val, int cond)
void | acquire_equal (const void *a, unsigned id, unsigned val)
| This call blocks until the value in the state of the lock ID (id) becomes equal to an Input value (val). It also waits at the entry to all reads and writes to data pointer a and the TM space to be completed. This function doesn't modify the value in the state of lock ID (id).
void | acquire_equal (const void *a, unsigned id, unsigned val, int cond)
| This call will be issued if cond==1. This call blocks until the value in the state of the lock ID (id) becomes equal to an Input value (val). It also waits at the entry to all reads and writes to data pointer a and the TM space to be completed. This function doesn't modify the value in the state of the lock ID (id).
void | acquire_equal (unsigned id, unsigned val)
| This call blocks until the value in the state of the lock ID (id) becomes equal to an Input value (val). This function doesn't modify the value in the state of lock ID (id).
void | acquire_equal (unsigned id, unsigned val, int cond)
| This call will be issued if cond==1. This call blocks until the value in the state of the lock ID (id) becomes equal to an Input value (val). This function doesn't modify the value in the state of the lock ID (id).
void | acquire_greater_equal (chess_protect_access const void chess_storage(TM) *a, unsigned id, unsigned val)
void | acquire_greater_equal (chess_protect_access const void chess_storage(TM) *a, unsigned id, unsigned val, int cond)
void | acquire_greater_equal (const void *a, unsigned id, unsigned val)
| This call blocks until the value in the state of the lock ID (id) becomes greater or equal to an Input value (val). It also waits at the entry to all reads and writes to data pointer a and the TM space to be completed. When the comparison becomes True, value in the state of the lock ID (id) is decremented by input value (val).
void | acquire_greater_equal (const void *a, unsigned id, unsigned val, int cond)
| This call will be issued if cond==1. This call blocks until the value in the state of the lock ID (id) becomes greater or equal to an Input value (val). It also waits at the entry to all reads and writes to data pointer a and the TM space to be completed. When the comparison becomes True, value in the state of the lock ID (id) is decremented by input value (val).
void | acquire_greater_equal (unsigned id, unsigned val)
| This call blocks until the value in the state of the lock ID (id) becomes greater or equal to an Input value (val). When the comparison becomes True, value in the state of the lock ID (id) is decremented by input value (val).
void | acquire_greater_equal (unsigned id, unsigned val, int cond)
| This call will be issued if cond==1. This call blocks until the value in the state of the lock ID (id) becomes greater or equal to an Input value (val). When the comparison becomes True, value in the state of the lock ID (id) is decremented by input value (val).
void | release (chess_protect_access const void chess_storage(TM) *a, unsigned id, signed val)
void | release (chess_protect_access const void chess_storage(TM) *a, unsigned id, signed val, int cond)
void | release (const void *a, unsigned id, signed val)
| This call will add input value (val) to the value in the state of lock ID (id). It also waits at the entry to all reads and writes to data pointer a and the TM space to be completed. Input value (val) is signed.
void | release (const void *a, unsigned id, signed val, int cond)
| This call will be issued if cond==1. This call will add input value (val) to the value in the state of lock ID (id). It also waits at the entry to all reads and writes to data pointer a and the TM space to be completed. Input value (val) is signed.
void | release (unsigned id, signed val)
| This call will add input value (val) to the value in the state of lock ID (id). Input value (val) is signed.
void | release (unsigned id, signed val, int cond)
| This call will be issued if cond==1. This call will add input value (val) to the value in the state of lock ID (id). Input value (val) is signed.

## Detailed Description

Lock instructions are implemented as semaphores, and we can distinguish between acquire and release instructions.

## Function Documentation

## ◆ acquire_equal() [1/6]

void acquire_equal | ( | chess_protect_access const void chess_storage(TM) * | a,
|  | unsigned | id,
|  | unsigned | val )

## ◆ acquire_equal() [2/6]

void acquire_equal | ( | chess_protect_access const void chess_storage(TM) * | a,
|  | unsigned | id,
|  | unsigned | val,
|  | int | cond )

## ◆ acquire_equal() [3/6]

void acquire_equal | ( | const void * | a,
|  | unsigned | id,
|  | unsigned | val )

This call blocks until the value in the state of the lock ID (id) becomes equal to an Input value (val). It also waits at the entry to all reads and writes to data pointer a and the TM space to be completed. This function doesn't modify the value in the state of lock ID (id).

Parameters

  [in] | a | Pointer to data
  [in] | id | Lock ID (0..63)
  [in] | val | Input value (0..63)

## ◆ acquire_equal() [4/6]

void acquire_equal | ( | const void * | a,
|  | unsigned | id,
|  | unsigned | val,
|  | int | cond )

This call will be issued if cond==1. This call blocks until the value in the state of the lock ID (id) becomes equal to an Input value (val). It also waits at the entry to all reads and writes to data pointer a and the TM space to be completed. This function doesn't modify the value in the state of the lock ID (id).

Parameters

  [in] | a | Pointer to data
  [in] | id | Lock ID (0..63)
  [in] | val | Input value (0..63)
  [in] | cond | condition to issue intrinsic

## ◆ acquire_equal() [5/6]

void acquire_equal | ( | unsigned | id,
|  | unsigned | val )

This call blocks until the value in the state of the lock ID (id) becomes equal to an Input value (val). This function doesn't modify the value in the state of lock ID (id).

Parameters

  [in] | id | Lock ID (0..63)
  [in] | val | Input value (0..63)

## ◆ acquire_equal() [6/6]

void acquire_equal | ( | unsigned | id,
|  | unsigned | val,
|  | int | cond )

This call will be issued if cond==1. This call blocks until the value in the state of the lock ID (id) becomes equal to an Input value (val). This function doesn't modify the value in the state of the lock ID (id).

Parameters

  [in] | id | Lock ID (0..63)
  [in] | val | Input value (0..63)
  [in] | cond | condition to issue intrinsic

## ◆ acquire_greater_equal() [1/6]

void acquire_greater_equal | ( | chess_protect_access const void chess_storage(TM) * | a,
|  | unsigned | id,
|  | unsigned | val )

## ◆ acquire_greater_equal() [2/6]

void acquire_greater_equal | ( | chess_protect_access const void chess_storage(TM) * | a,
|  | unsigned | id,
|  | unsigned | val,
|  | int | cond )

## ◆ acquire_greater_equal() [3/6]

void acquire_greater_equal | ( | const void * | a,
|  | unsigned | id,
|  | unsigned | val )

This call blocks until the value in the state of the lock ID (id) becomes greater or equal to an Input value (val). It also waits at the entry to all reads and writes to data pointer a and the TM space to be completed. When the comparison becomes True, value in the state of the lock ID (id) is decremented by input value (val).

Parameters

  [in] | a | Pointer to data
  [in] | id | Lock ID (0..63)
  [in] | val | Input value (0..63)

## ◆ acquire_greater_equal() [4/6]

void acquire_greater_equal | ( | const void * | a,
|  | unsigned | id,
|  | unsigned | val,
|  | int | cond )

This call will be issued if cond==1. This call blocks until the value in the state of the lock ID (id) becomes greater or equal to an Input value (val). It also waits at the entry to all reads and writes to data pointer a and the TM space to be completed. When the comparison becomes True, value in the state of the lock ID (id) is decremented by input value (val).

Parameters

  [in] | a | Pointer to data
  [in] | id | Lock ID (0..63)
  [in] | val | Input value (0..63)
  [in] | cond | condition to issue intrinsic

## ◆ acquire_greater_equal() [5/6]

void acquire_greater_equal | ( | unsigned | id,
|  | unsigned | val )

This call blocks until the value in the state of the lock ID (id) becomes greater or equal to an Input value (val). When the comparison becomes True, value in the state of the lock ID (id) is decremented by input value (val).

Parameters

  [in] | id | Lock ID (0..63)
  [in] | val | Input value (0..63)

## ◆ acquire_greater_equal() [6/6]

void acquire_greater_equal | ( | unsigned | id,
|  | unsigned | val,
|  | int | cond )

This call will be issued if cond==1. This call blocks until the value in the state of the lock ID (id) becomes greater or equal to an Input value (val). When the comparison becomes True, value in the state of the lock ID (id) is decremented by input value (val).

Parameters

  [in] | id | Lock ID (0..63)
  [in] | val | Input value (0..63)
  [in] | cond | condition to issue intrinsic

## ◆ release() [1/6]

void release | ( | chess_protect_access const void chess_storage(TM) * | a,
|  | unsigned | id,
|  | signed | val )

## ◆ release() [2/6]

void release | ( | chess_protect_access const void chess_storage(TM) * | a,
|  | unsigned | id,
|  | signed | val,
|  | int | cond )

## ◆ release() [3/6]

void release | ( | const void * | a,
|  | unsigned | id,
|  | signed | val )

This call will add input value (val) to the value in the state of lock ID (id). It also waits at the entry to all reads and writes to data pointer a and the TM space to be completed. Input value (val) is signed.

Parameters

  [in] | a | Pointer to data
  [in] | id | Lock ID (0..63)
  [in] | val | Input value (-63..63)

## ◆ release() [4/6]

void release | ( | const void * | a,
|  | unsigned | id,
|  | signed | val,
|  | int | cond )

This call will be issued if cond==1. This call will add input value (val) to the value in the state of lock ID (id). It also waits at the entry to all reads and writes to data pointer a and the TM space to be completed. Input value (val) is signed.

Parameters

  [in] | a | Pointer to data
  [in] | id | Lock ID (0..63)
  [in] | val | Input value (-63..63)
  [in] | cond | condition to issue intrinsic

## ◆ release() [5/6]

void release | ( | unsigned | id,
|  | signed | val )

This call will add input value (val) to the value in the state of lock ID (id). Input value (val) is signed.

Parameters

  [in] | id | lock ID (0..63)
  [in] | val | Input value (-63..63)

## ◆ release() [6/6]

void release | ( | unsigned | id,
|  | signed | val,
|  | int | cond )

This call will be issued if cond==1. This call will add input value (val) to the value in the state of lock ID (id). Input value (val) is signed.

Parameters

  [in] | id | Lock ID (0..63)
  [in] | val | Input value (-63..63)
  [in] | cond | condition to issue intrinsic