boostorg / boostorg/compute

Add .x, .y, .z accessors to vector types

オープン
#44 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
feature
主要言語
C++
スター
1.7k
フォーク
340
PR マージ指標
30日以内にマージされた PR はありません

説明

Make is possible to access components of vector types (e.g. `float4_`, `int8_`) by names (e.g. `.x`, `.y`).

For example, this should be possible:

```
boost::compute::float4_ v;
v.x = 1;
v.y = 2;
v.z = 3;
v.w = 4;
assert(v == boost::compute::float4_(1, 2, 3, 4));
```

Note that names should only be available if the type actually has enough values (e.g. `float2_` should not have a `.z` field).
##

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。