You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert!(CLUSTER_SIZE >= 1,"`ClusterSize` must be at least 1");
795
+
assert!(
796
+
CLUSTER_SIZE.is_power_of_two(),
797
+
"`ClusterSize` must be a power of 2"
798
+
);
799
+
// Cannot be verified with static assertions:
800
+
// `ClusterSize` must not be greater than the size of the group
801
+
}
802
+
795
803
letmut result = I::default();
796
804
797
805
unsafe{
@@ -843,6 +851,9 @@ The type of `value` must be the same as Result Type.
843
851
ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integer type, whose Signedness operand is 0. ClusterSize must come from a constant instruction. Behavior is undefined unless ClusterSize is at least 1 and a power of 2. If ClusterSize is greater than the size of the group, executing this instruction results in undefined behavior.
844
852
845
853
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
854
+
855
+
# Safety
856
+
* `ClusterSize` must not be greater than the size of the group
A floating point add group operation of all `value` operands contributed by active invocations in the group.
@@ -871,6 +882,9 @@ The type of `value` must be the same as Result Type. The method used to perform
871
882
ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integer type, whose Signedness operand is 0. ClusterSize must come from a constant instruction. Behavior is undefined unless ClusterSize is at least 1 and a power of 2. If ClusterSize is greater than the size of the group, executing this instruction results in undefined behavior.
872
883
873
884
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
885
+
886
+
# Safety
887
+
* `ClusterSize` must not be greater than the size of the group
874
888
");
875
889
876
890
// mul
@@ -901,6 +915,9 @@ The type of `value` must be the same as Result Type.
901
915
ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integer type, whose Signedness operand is 0. ClusterSize must come from a constant instruction. Behavior is undefined unless ClusterSize is at least 1 and a power of 2. If ClusterSize is greater than the size of the group, executing this instruction results in undefined behavior.
902
916
903
917
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
918
+
919
+
# Safety
920
+
* `ClusterSize` must not be greater than the size of the group
A floating point multiply group operation of all `value` operands contributed by active invocations in the group.
@@ -929,6 +946,9 @@ The type of `value` must be the same as Result Type. The method used to perform
929
946
ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integer type, whose Signedness operand is 0. ClusterSize must come from a constant instruction. Behavior is undefined unless ClusterSize is at least 1 and a power of 2. If ClusterSize is greater than the size of the group, executing this instruction results in undefined behavior.
930
947
931
948
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
949
+
950
+
# Safety
951
+
* `ClusterSize` must not be greater than the size of the group
932
952
");
933
953
934
954
// min
@@ -959,6 +979,9 @@ The type of `value` must be the same as Result Type.
959
979
ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integer type, whose Signedness operand is 0. ClusterSize must come from a constant instruction. Behavior is undefined unless ClusterSize is at least 1 and a power of 2. If ClusterSize is greater than the size of the group, executing this instruction results in undefined behavior.
960
980
961
981
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
982
+
983
+
# Safety
984
+
* `ClusterSize` must not be greater than the size of the group
An unsigned integer minimum group operation of all `value` operands contributed by active invocations in the group.
@@ -987,6 +1010,9 @@ The type of `value` must be the same as Result Type.
987
1010
ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integer type, whose Signedness operand is 0. ClusterSize must come from a constant instruction. Behavior is undefined unless ClusterSize is at least 1 and a power of 2. If ClusterSize is greater than the size of the group, executing this instruction results in undefined behavior.
988
1011
989
1012
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
1013
+
1014
+
# Safety
1015
+
* `ClusterSize` must not be greater than the size of the group
A floating point minimum group operation of all `value` operands contributed by active invocations in the group.
@@ -1015,6 +1041,9 @@ The type of `value` must be the same as Result Type. The method used to perform
1015
1041
ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integer type, whose Signedness operand is 0. ClusterSize must come from a constant instruction. Behavior is undefined unless ClusterSize is at least 1 and a power of 2. If ClusterSize is greater than the size of the group, executing this instruction results in undefined behavior.
1016
1042
1017
1043
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
1044
+
1045
+
# Safety
1046
+
* `ClusterSize` must not be greater than the size of the group
1018
1047
");
1019
1048
1020
1049
// max
@@ -1045,6 +1074,9 @@ The type of `value` must be the same as Result Type.
1045
1074
ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integer type, whose Signedness operand is 0. ClusterSize must come from a constant instruction. Behavior is undefined unless ClusterSize is at least 1 and a power of 2. If ClusterSize is greater than the size of the group, executing this instruction results in undefined behavior.
1046
1075
1047
1076
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
1077
+
1078
+
# Safety
1079
+
* `ClusterSize` must not be greater than the size of the group
An unsigned integer maximum group operation of all `value` operands contributed by active invocations in the group.
@@ -1073,6 +1105,9 @@ The type of `value` must be the same as Result Type.
1073
1105
ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integer type, whose Signedness operand is 0. ClusterSize must come from a constant instruction. Behavior is undefined unless ClusterSize is at least 1 and a power of 2. If ClusterSize is greater than the size of the group, executing this instruction results in undefined behavior.
1074
1106
1075
1107
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
1108
+
1109
+
# Safety
1110
+
* `ClusterSize` must not be greater than the size of the group
A floating point maximum group operation of all `value` operands contributed by active invocations in by group.
@@ -1099,6 +1134,9 @@ The identity I for Operation is -INF.
1099
1134
The type of `value` must be the same as Result Type. The method used to perform the group operation on the contributed Value(s) from active invocations is implementation defined. From the set of Value(s) provided by active invocations within a subgroup, if for any two Values one of them is a NaN, the other is chosen. If all Value(s) that are used by the current invocation are NaN, then the result is an undefined value.
1100
1135
1101
1136
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
1137
+
1138
+
# Safety
1139
+
* `ClusterSize` must not be greater than the size of the group
1102
1140
");
1103
1141
1104
1142
// and
@@ -1129,6 +1167,9 @@ The type of `value` must be the same as Result Type.
1129
1167
ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integer type, whose Signedness operand is 0. ClusterSize must come from a constant instruction. Behavior is undefined unless ClusterSize is at least 1 and a power of 2. If ClusterSize is greater than the size of the group, executing this instruction results in undefined behavior.
1130
1168
1131
1169
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
1170
+
1171
+
# Safety
1172
+
* `ClusterSize` must not be greater than the size of the group
1132
1173
");
1133
1174
1134
1175
// or
@@ -1159,6 +1200,9 @@ The type of `value` must be the same as Result Type.
1159
1200
ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integer type, whose Signedness operand is 0. ClusterSize must come from a constant instruction. Behavior is undefined unless ClusterSize is at least 1 and a power of 2. If ClusterSize is greater than the size of the group, executing this instruction results in undefined behavior.
1160
1201
1161
1202
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
1203
+
1204
+
# Safety
1205
+
* `ClusterSize` must not be greater than the size of the group
1162
1206
");
1163
1207
1164
1208
// xor
@@ -1189,6 +1233,9 @@ The type of `value` must be the same as Result Type.
1189
1233
ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integer type, whose Signedness operand is 0. ClusterSize must come from a constant instruction. Behavior is undefined unless ClusterSize is at least 1 and a power of 2. If ClusterSize is greater than the size of the group, executing this instruction results in undefined behavior.
1190
1234
1191
1235
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
1236
+
1237
+
# Safety
1238
+
* `ClusterSize` must not be greater than the size of the group
1192
1239
");
1193
1240
1194
1241
// logical and
@@ -1219,6 +1266,9 @@ The type of `value` must be the same as Result Type.
1219
1266
ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integer type, whose Signedness operand is 0. ClusterSize must come from a constant instruction. Behavior is undefined unless ClusterSize is at least 1 and a power of 2. If ClusterSize is greater than the size of the group, executing this instruction results in undefined behavior.
1220
1267
1221
1268
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
1269
+
1270
+
# Safety
1271
+
* `ClusterSize` must not be greater than the size of the group
1222
1272
");
1223
1273
1224
1274
// logical or
@@ -1249,6 +1299,9 @@ The type of `value` must be the same as Result Type.
1249
1299
ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integer type, whose Signedness operand is 0. ClusterSize must come from a constant instruction. Behavior is undefined unless ClusterSize is at least 1 and a power of 2. If ClusterSize is greater than the size of the group, executing this instruction results in undefined behavior.
1250
1300
1251
1301
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
1302
+
1303
+
# Safety
1304
+
* `ClusterSize` must not be greater than the size of the group
1252
1305
");
1253
1306
1254
1307
// logical xor
@@ -1279,6 +1332,9 @@ The type of `value` must be the same as Result Type.
1279
1332
ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integer type, whose Signedness operand is 0. ClusterSize must come from a constant instruction. Behavior is undefined unless ClusterSize is at least 1 and a power of 2. If ClusterSize is greater than the size of the group, executing this instruction results in undefined behavior.
1280
1333
1281
1334
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
1335
+
1336
+
# Safety
1337
+
* `ClusterSize` must not be greater than the size of the group
1282
1338
");
1283
1339
1284
1340
/// Result is the `value` of the invocation within the quad with a quad index equal to `index`.
841 | | An integer add group operation of all `value` operands contributed by active invocations in the group.
6
+
842 | |
7
+
843 | | Result Type must be a scalar or vector of integer type.
8
+
... |
9
+
856 | | * `ClusterSize` must not be greater than the size of the group
10
+
857 | | ");
11
+
| |__^ the evaluated program panicked at '`ClusterSize` must be at least 1', /home/firestar99/workspace/frameworks/rust-gpu/crates/spirv-std/src/arch/subgroup.rs:840:1
12
+
|
13
+
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `macro_subgroup_op_clustered` (in Nightly builds, run with -Z macro-backtrace for more info)
841 | | An integer add group operation of all `value` operands contributed by active invocations in the group.
6
+
842 | |
7
+
843 | | Result Type must be a scalar or vector of integer type.
8
+
... |
9
+
856 | | * `ClusterSize` must not be greater than the size of the group
10
+
857 | | ");
11
+
| |__^ the evaluated program panicked at '`ClusterSize` must be a power of 2', /home/firestar99/workspace/frameworks/rust-gpu/crates/spirv-std/src/arch/subgroup.rs:840:1
12
+
|
13
+
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `macro_subgroup_op_clustered` (in Nightly builds, run with -Z macro-backtrace for more info)
0 commit comments