Files
tfhe-rs/tfhe/docs/configuration/gpu-acceleration/gpu-operations.md
Arthur Meyre bd739c2d48 chore(docs): uniformize paths in docs to use "-" instead of "_"
- this is to avoid conflicts with gitbook
2025-07-09 14:36:04 +02:00

6.5 KiB

GPU operations

This document outlines the GPU operations supported in TFHE-rs.

The GPU backend includes the following operations for both signed and unsigned encrypted integers:

name symbol Enc/Enc Enc/ Int
Neg - ✔️ N/A
Add + ✔️ ✔️
Sub - ✔️ ✔️
Mul * ✔️ ✔️
Div / ✔️ ✔️
Rem % ✔️ ✔️
Not ! ✔️ N/A
BitAnd & ✔️ ✔️
BitOr | ✔️ ✔️
BitXor ^ ✔️ ✔️
Shr >> ✔️ ✔️
Shl << ✔️ ✔️
Rotate right rotate_right ✔️ ✔️
Rotate left rotate_left ✔️ ✔️
Min min ✔️ ✔️
Max max ✔️ ✔️
Greater than gt ✔️ ✔️
Greater or equal than ge ✔️ ✔️
Lower than lt ✔️ ✔️
Lower or equal than le ✔️ ✔️
Equal eq ✔️ ✔️
Not Equal ne ✔️ ✔️
Cast (into dest type) cast_into ✔️ N/A
Cast (from src type) cast_from ✔️ N/A
Ternary operator select ✔️ ✖️
Integer logarithm ilog2 ✔️ N/A
Count trailing/leading ones leading_zeros ✔️ N/A
Count trailing/leading zeros leading_ones ✔️ N/A
Oblivious Pseudo Random Generation oprf ✔️ N/A

{% hint style="info" %} All operations follow the same syntax as the one described in here. {% endhint %}