PTX ISA v9.4

9.7.9.5. Logic and Shift Instructions: cnot

cnot

C/C++ style logical negation.

Syntax

ptx
cnot.type d, a;

.type = { .b16, .b32, .b64 };

Description

Compute the logical negation using C/C++ semantics.

Semantics

ptx
d = (a==0) ? 1 : 0;

Notes

The size of the operands must match, but not necessarily the type.

PTX ISA Notes

Introduced in PTX ISA version 1.0.

Target ISA Notes

Supported on all target architectures.

Examples

ptx
cnot.b32 d,a;
esc
Type to search across all documentation