PTX ISA v9.4

9.7.1.9. Integer Arithmetic Instructions: div

div

Divide one value by another.

Syntax

ptx
div.type  d, a, b;

.type = { .u16, .u32, .u64,
          .s16, .s32, .s64 };

Description

Divides a by b, stores result in d.

Semantics

ptx
d = a / b;

Notes

Division by zero yields an unspecified, machine-specific value.

PTX ISA Notes

Introduced in PTX ISA version 1.0.

Target ISA Notes

Supported on all target architectures.

Examples

ptx
div.s32  b,n,i;
esc
Type to search across all documentation