Name Strings
SPV_INTEL_ternary_bitwise_function
Contact
To report problems with this extension, please open a new issue at:
Contributors
-
Ben Ashbaugh, Intel
-
Victor Mustya, Intel
Notice
Copyright (c) 2025 Intel Corporation. All rights reserved.
Status
-
Complete
Version
Last Modified Date |
2025-03-24 |
Revision |
1 |
Dependencies
This extension is written against the SPIR-V Specification, Version 1.6, Revision 5.
This extension requires SPIR-V 1.0.
Overview
This extension adds an instruction to efficiently compute a bitwise function of three input operands. The bitwise function that is performed is described by a lookup table index. This instruction can be used to accelerate the bitwise operations used in cryptography, hash computation, and many other algorithms.
Bitwise functions may also be known as Boolean functions or logical functions, because they perform logical operations on the bits of the input operands.
Extension Name
To use this extension within a SPIR-V module, the appropriate OpExtension must be present in the module:
OpExtension "SPV_INTEL_ternary_bitwise_function"
Modifications to the SPIR-V Specification, Version 1.6
Capabilities
Modify Section 3.31, Capability, adding rows to the Capability table:
Capability | Implicitly Declares | |
---|---|---|
6241 |
TernaryBitwiseFunctionINTEL |
Instructions
Modify Section 3.56.14, Bit Instructions, adding to the end of the list of instructions:
Computes a bitwise function of three input operands A, B, and C. Result Type must be a scalar or vector of integer type. The types of A, B, and C must be the same as Result Type. The LUTIndex operand is a lookup table index that describes the bitwise function that is computed. It must be a constant instruction with scalar 32-bit integer type. Only the low eight bits of LUTIndex are used. If any of the upper 24 bits of LUTIndex are nonzero, then behavior is undefined. To compute the lookup table index for a bitwise function, let sA equal to For example, a Results are computed per component. |
Capability: |
||||||
7 |
6242 |
<id> |
<id> |
<id> |
<id> |
<id> |
<id> |
Issues
-
What should this extension be called?
RESOLVED: The name of the extension will be SPV_INTEL_ternary_bitwise_function. This name is chosen to be consistent with terminology used elsewhere in SPIR-V, such as the OpBitwiseAnd instruction. It is also consistent with the "bitwise ternary logic" terminology used by the Intel CPU instructions that may be used to implement this extension.
Revision History
Rev | Date | Author | Changes |
---|---|---|---|
1 |
2025-03-24 |
Ben Ashbaugh |
Initial version for publication |