testp GPU Virtual ISA NVIDIA

testp Floating-Point Instructions

testp.op.type p, a; // result is .pred

testp tests common properties of floating-point numbers and returns a predicate value of 1 if True and 0 if False.

Encoding

PTX is a virtual instruction set. It has no single, stable native binary encoding - the compiler lowers this instruction to different native machine code depending on the selected NVIDIA target architecture (compute capability). This page intentionally shows no bit-diagram; see the target/version requirements below for what governs how this instruction compiles.
PTX ISA Version Introduced PTX ISA 2.0
Minimum Target sm_20

Syntax Forms

One mnemonic covers many type / state-space / scope / modifier combinations - each row below is an independently valid form.

Syntax Data Types State Space(s) Modifiers Min. Target Description
testp.op.type p, a; // result is .pred sm_20 testp tests common properties of floating-point numbers and returns a predicate value of 1 if True and 0 if False. testp.finite True if the input is not infinite or NaN testp. (see the official PTX ISA docs for the full description)

Operands

At a Glance

Data Types -

Related

More in Floating-Point Instructions

Reference

NVIDIA PTX ISA

Description

testp tests common properties of floating-point numbers and returns a predicate value of 1 if True and 0 if False. testp.finite True if the input is not infinite or NaN testp.infinite True if the input is positive or negative infinity testp.number True if the input is not NaN testp.notanumber True if the input is NaN testp.normal True if the input is a normal number (not NaN, not infinity) testp.subnormal True if the input is a subnormal number (not NaN, not infinity) As a special case, positive and negative zero are considered normal numbers.

Examples

testp.notanumber.f32  isnan, f0;
testp.infinite.f64    p, X;

Reproduced from NVIDIA's official PTX ISA documentation for technical accuracy.

Sources