Developer Guide and Reference

ID 767253
Date 10/31/2024
Public
Document Table of Contents

Half-Precision Comparison Functions

hisnan

Description: Returns true if the input half precision value is NAN.

Calling Interface:

bool hisnan(sycl::half x)

heq

Description: Returns true if two input half precision values are equal.

Calling Interface:

bool heq(sycl::half x, sycl::half y)

hequ

Description: Returns true if two input half precision values are equal. If inputs include NAN, the final result is true.

Calling Interface:

bool hequ(sycl::half x, sycl::half y)

hge

Description: For two half precision inputs x, y. Returns true if x >=y.

Calling Interface:

bool hge(sycl::half x, sycl::half y)

hgeu

Description: For two half precision inputs x, y. Returns true if x >= y. If inputs include NAN, the final result is true.

Calling Interface:

bool hgeu(sycl::half x, sycl::half y)

hgt

Description: For two half precision inputs x, y. Returns true if x > y.

Calling Interface:

bool hgt(sycl::half x, sycl::half y)

hgtu

Description: For two half precision inputs x, y. Returns true if x > y. If inputs include NAN, the final result is true.

Calling Interface:

bool hgtu(sycl::half x, sycl::half y)

hle

Description: For two half precision inputs x, y. Returns true if x <= y.

Calling Interface:

bool hle(sycl::half x, sycl::half y)

hleu

Description: For two half precision inputs x, y. Returns true if x <= y. If inputs include NAN, the final result is true.

Calling Interface:

bool hleu(sycl::half x, sycl::half y)

hlt

Description: For two half precision inputs x, y. Returns true if x < y.

Calling Interface:

bool hlt(sycl::half x, sycl::half y)

hltu

Description: For two half precision inputs x, y. Returns true if x < y. If inputs include NAN, the final result is true.

Calling Interface:

bool hltu(sycl::half x, sycl::half y)

hne

Description: Returns true if two input half precision values are not equal.

Calling Interface:

bool hne(sycl::half x, sycl::half y)

hneu

Description: Returns true if two input half precision values are not equal. If inputs include NAN, the final result is true.

Calling Interface:

bool hneu(sycl::half x, sycl::half y)

hbeq2

Description: For sycl::half2 inputs x, y. Each includes two half precision elements: x0, x1 and y0, y1.

bool b0 = (x0 == y0);
bool b1 = (x1 == y1);

Returns true only when both b0 and b1 are true.

Calling Interface:

bool hbeq2(sycl::half2 x, sycl::half2 y)

hbequ2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

bool b0 = (x0 == y0);
bool b1 = (x1 == y1);

If either x0 or y0 is NAN, b0 is true and if either y0 or y1 is NAN, b1 is true. Returns true only when both b0 and b1 are true.

Calling Interface:

bool hbequ2(sycl::half2 x, sycl::half2 y)

hbge2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

bool b0 = (x0 >= y0);
bool b1 = (x1 >= y1);

Returns true only when both b0 and b1 are true.

Calling Interface:

bool hbge2(sycl::half2 x, sycl::half2 y)

hbgeu2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

bool b0 = (x0 >= y0);
bool b1 = (x1 >= y1);

If either x0 or y0 is NAN, b0 is true and if either y0 or y1 is NAN, b1 is true. Returns true only when both b0 and b1 are true.

Calling Interface:

bool hbgeu2(sycl::half2 x, sycl::half2 y)

hbgt2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

bool b0 = (x0 > y0);
bool b1 = (x1 > y1);

Returns true only when both b0 and b1 are true.

Calling Interface:

bool hbgt2(sycl::half2 x, sycl::half2 y)

hbgtu2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

bool b0 = (x0 > y0);
bool b1 = (x1 > y1);

If either x0 or y0 is NAN, b0 is true and if either y0 or y1 is NAN, b1 is true. Returns true only when both b0 and b1 are true.

Calling Interface:

bool hbgtu2(sycl::half2 x, sycl::half2 y)

hble2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

bool b0 = (x0 <= y0);
bool b1 = (x1 <= y1);

Returns true only when both b0 and b1 are true.

Calling Interface:

bool hble2(sycl::half2 x, sycl::half2 y)

hbleu2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

bool b0 = (x0 <= y0);
bool b1 = (x1 <= y1);

If either x0 or y0 is NAN, b0 is true and if either y0 or y1 is NAN, b1 is true. Returns true only when both b0 and b1 are true.

Calling Interface:

bool hbleu2(sycl::half2 x, sycl::half2 y)

hblt2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

bool b0 = (x0 < y0);
bool b1 = (x1 < y1);

Returns true only when both b0 and b1 are true.

Calling Interface:

bool hblt2(sycl::half2 x, sycl::half2 y)

hbltu2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

bool b0 = (x0 < y0);
bool b1 = (x1 < y1);

If either x0 or y0 is NAN, b0 is true and if either y0 or y1 is NAN, b1 is true. Returns true only when both b0 and b1 are true.

Calling Interface:

bool hbltu2(sycl::half2 x, sycl::half2 y)

hbne2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

bool b0 = (x0 != y0);
bool b1 = (x1 != y1);

Returns true only when both b0 and b1 are true.

Calling Interface:

bool hbne2(sycl::half2 x, sycl::half2 y)

hbneu2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

bool b0 = (x0 != y0);
bool b1 = (x1 != y1);

If either x0 or y0 is NAN, b0 is true and if either y0 or y1 is NAN, b1 is true. Returns true only when both b0 and b1 are true.

Calling Interface:

bool hbneu2(sycl::half2 x, sycl::half2 y)

heq2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

sycl::half b0 = (x0 == y0) ? 1.0 : 0.0;
sycl::half b1 = (x1 == y1) ? 1.0 : 0.0;

Returns sycl::half2{b0, b1}.

Calling Interface:

sycl::half2 heq2(sycl::half2 x, sycl::half2 y)

hequ2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

sycl::half b0 = (x0 == y0) ? 1.0 : 0.0;
sycl::half b1 = (x1 == y1) ? 1.0 : 0.0;

If either x0 or y0 is NAN, b0 is 1.0 and if either y0 or y1 is NAN, b1 is 1.0. Returns sycl::half2{b0, b1}.

Calling Interface:

sycl::half2 hequ2(sycl::half2 x, sycl::half2 y)

hge2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

sycl::half b0 = (x0 >= y0) ? 1.0 : 0.0;
sycl::half b1 = (x1 >= y1) ? 1.0 : 0.0;

Returns sycl::half2{b0, b1}.

Calling Interface:

sycl::half2 hge2(sycl::half2 x, sycl::half2 y)

hgeu2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

sycl::half b0 = (x0 >= y0) ? 1.0 : 0.0;
sycl::half b1 = (x1 >= y1) ? 1.0 : 0.0;

If either x0 or y0 is NAN, b0 is 1.0 and if either y0 or y1 is NAN, b1 is 1.0. Returns sycl::half2{b0, b1}.

Calling Interface:

sycl::half2 hgeu2(sycl::half2 x, sycl::half2 y)

hgt2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

sycl::half b0 = (x0 > y0) ? 1.0 : 0.0;
sycl::half b1 = (x1 > y1) ? 1.0 : 0.0;

Returns sycl::half2{b0, b1}.

Calling Interface:

sycl::half2 hgt2(sycl::half2 x, sycl::half2 y)

hgtu2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

sycl::half b0 = (x0 > y0) ? 1.0 : 0.0;
sycl::half b1 = (x1 > y1) ? 1.0 : 0.0;

If either x0 or y0 is NAN, b0 is 1.0 and if either y0 or y1 is NAN, b1 is 1.0. Returns sycl::half2{b0, b1}.

Calling Interface:

sycl::half2 hgtu2(sycl::half2 x, sycl::half2 y)

hle2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

sycl::half b0 = (x0 <= y0) ? 1.0 : 0.0;
sycl::half b1 = (x1 <= y1) ? 1.0 : 0.0;

Returns sycl::half2{b0, b1}.

Calling Interface:

sycl::half2 hle2(sycl::half2 x, sycl::half2 y)

hleu2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

sycl::half b0 = (x0 <= y0) ? 1.0 : 0.0;
sycl::half b1 = (x1 <= y1) ? 1.0 : 0.0;

If either x0 or y0 is NAN, b0 is 1.0 and if either y0 or y1 is NAN, b1 is 1.0. Returns sycl::half2{b0, b1}.

Calling Interface:

sycl::half2 hleu2(sycl::half2 x, sycl::half2 y)

hlt2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

sycl::half b0 = (x0 < y0) ? 1.0 : 0.0;
sycl::half b1 = (x1 < y1) ? 1.0 : 0.0;

Returns sycl::half2{b0, b1}.

Calling Interface:

sycl::half2 hlt2(sycl::half2 x, sycl::half2 y)

hltu2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

sycl::half b0 = (x0 < y0) ? 1.0 : 0.0;
sycl::half b1 = (x1 < y1) ? 1.0 : 0.0;

If either x0 or y0 is NAN, b0 is 1.0 and if either y0 or y1 is NAN, b1 is 1.0. Returns sycl::half2{b0, b1}.

Calling Interface:

sycl::half2 hltu2(sycl::half2 x, sycl::half2 y)

hne2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

sycl::half b0 = (x0 != y0) ? 1.0 : 0.0;
sycl::half b1 = (x1 != y1) ? 1.0 : 0.0;

Returns sycl::half2{b0, b1}.

Calling Interface:

sycl::half2 hne2(sycl::half2 x, sycl::half2 y)

hneu2

Description: For sycl::half2 input x, y. Each includes two half precision elements: x0, x1 and y0, y1.

sycl::half b0 = (x0 != y0) ? 1.0 : 0.0;
sycl::half b1 = (x1 != y1) ? 1.0 : 0.0;

If either x0 or y0 is NAN, b0 is 1.0 and if either y0 or y1 is NAN, b1 is 1.0. Returns sycl::half2{b0, b1}.

Calling Interface:

sycl::half2 hneu2(sycl::half2 x, sycl::half2 y)