KhronosGroup / KhronosGroup/SYCL-Docs

What does `vec<bool, 2>() && vec<bool, 2>()` return?

Open
#426 4 comments 0 reactions 0 assignees View on GitHub
clarification
Dominant language
JavaScript
Stars
158
Forks
80
Avg merge
7d 6h
Merged PRs (30d)
5

Description

> `vec operatorOP(const vec& lhs, const vec& rhs)`

> Construct a new instance of the SYCL vec class template with the same template parameters as lhs vec with each element of the new SYCL vec instance the result of an element-wise OP logical operation between each element of lhs vec and each element of the rhs SYCL vec.

> The DataT template parameter of the constructed SYCL vec, RET, varies depending on the DataT template parameter of this SYCL vec. For a SYCL vec with DataT of type int8_t or uint8_t RET must be int8_t. For a SYCL vec with DataT of type int16_t, uint16_t or half RET must be int16_t. For a SYCL vec with DataT of type int32_t, uint32_t or float RET must be int32_t. For a SYCL vec with DataT of type int64_t, uint64_t or double RET must be int64_t.

> Where OP is: &&, ||.

The return type is not specified when `DataT = bool`. Also applies to `==, !=, <, >, <=, >=, !`.

Contributor guide

No contributing guide indexed for this repository

Research direction

No file, test, or entry point is named in the issue. Locate the SYCL vec operator specification for logical, comparison, and unary ! operations, then determine and document the return type when DataT is bool. Done means the specification explicitly covers bool for all listed operators.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.