質問編集履歴
2
s
title
CHANGED
File without changes
|
body
CHANGED
@@ -9,9 +9,13 @@
|
|
9
9
|
|
10
10
|
[numthreads(32, 1, 1)]
|
11
11
|
void func(uint3 id: SV_GroupThreadID){
|
12
|
+
|
12
13
|
for(int i=0;i<100;i++){
|
13
|
-
if(two[id.x]<10){
|
14
|
+
if(two[id.x]<10){
|
15
|
+
ここでtwo[id.x]の値を書き換えるような操作
|
14
|
-
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
15
19
|
}
|
16
20
|
```
|
17
21
|
上記のような関数を実行した場合、平行処理される関数の中でid.xの値が変わっているようで if(two[id.x]<10)の処理が思ったように実行されません。
|
1
タグ追加
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|