Skip to content

Commit 64e2c79

Browse files
committed
subgroup: move type designation to the end of the method name
1 parent d389067 commit 64e2c79

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

crates/spirv-std/src/arch/subgroup.rs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ macro_rules! macro_subgroup_op_clustered {
792792
}
793793

794794
// add
795-
macro_subgroup_op!(impl Integer, "OpGroupNonUniformIAdd", subgroup_i_add, GroupOperation::Reduce, subgroup_inclusive_i_add, GroupOperation::InclusiveScan, subgroup_exclusive_i_add, GroupOperation::ExclusiveScan; r"
795+
macro_subgroup_op!(impl Integer, "OpGroupNonUniformIAdd", subgroup_add_i, GroupOperation::Reduce, subgroup_inclusive_add_i, GroupOperation::InclusiveScan, subgroup_exclusive_add_i, GroupOperation::ExclusiveScan; r"
796796
An integer add group operation of all Value operands contributed by active invocations in the group.
797797
798798
Result Type must be a scalar or vector of integer type.
@@ -805,7 +805,7 @@ The type of Value must be the same as Result Type.
805805
806806
Requires Capability `GroupNonUniformArithmetic`.
807807
");
808-
macro_subgroup_op_clustered!(impl Integer, "OpGroupNonUniformIAdd", subgroup_clustered_i_add; r"
808+
macro_subgroup_op_clustered!(impl Integer, "OpGroupNonUniformIAdd", subgroup_clustered_add_i; r"
809809
An integer add group operation of all Value operands contributed by active invocations in the group.
810810
811811
Result Type must be a scalar or vector of integer type.
@@ -820,7 +820,7 @@ ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integ
820820
821821
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
822822
");
823-
macro_subgroup_op!(impl Float, "OpGroupNonUniformFAdd", subgroup_f_add, GroupOperation::Reduce, subgroup_inclusive_f_add, GroupOperation::InclusiveScan, subgroup_exclusive_f_add, GroupOperation::ExclusiveScan; r"
823+
macro_subgroup_op!(impl Float, "OpGroupNonUniformFAdd", subgroup_add_f, GroupOperation::Reduce, subgroup_inclusive_add_f, GroupOperation::InclusiveScan, subgroup_exclusive_add_f, GroupOperation::ExclusiveScan; r"
824824
A floating point add group operation of all Value operands contributed by active invocations in the group.
825825
826826
Result Type must be a scalar or vector of floating-point type.
@@ -833,7 +833,7 @@ The type of Value must be the same as Result Type. The method used to perform th
833833
834834
Requires Capability `GroupNonUniformArithmetic`.
835835
");
836-
macro_subgroup_op_clustered!(impl Float, "OpGroupNonUniformFAdd", subgroup_clustered_f_add; r"
836+
macro_subgroup_op_clustered!(impl Float, "OpGroupNonUniformFAdd", subgroup_clustered_add_f; r"
837837
A floating point add group operation of all Value operands contributed by active invocations in the group.
838838
839839
Result Type must be a scalar or vector of floating-point type.
@@ -850,7 +850,7 @@ Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
850850
");
851851

852852
// mul
853-
macro_subgroup_op!(impl Integer, "OpGroupNonUniformIMul", subgroup_i_mul, GroupOperation::Reduce, subgroup_inclusive_i_mul, GroupOperation::InclusiveScan, subgroup_exclusive_i_mul, GroupOperation::ExclusiveScan; r"
853+
macro_subgroup_op!(impl Integer, "OpGroupNonUniformIMul", subgroup_mul_i, GroupOperation::Reduce, subgroup_inclusive_mul_i, GroupOperation::InclusiveScan, subgroup_exclusive_mul_i, GroupOperation::ExclusiveScan; r"
854854
An integer multiply group operation of all Value operands contributed by active invocations in the group.
855855
856856
Result Type must be a scalar or vector of integer type.
@@ -863,7 +863,7 @@ The type of Value must be the same as Result Type.
863863
864864
Requires Capability `GroupNonUniformArithmetic`.
865865
");
866-
macro_subgroup_op_clustered!(impl Integer, "OpGroupNonUniformIMul", subgroup_clustered_i_mul; r"
866+
macro_subgroup_op_clustered!(impl Integer, "OpGroupNonUniformIMul", subgroup_clustered_mul_i; r"
867867
An integer multiply group operation of all Value operands contributed by active invocations in the group.
868868
869869
Result Type must be a scalar or vector of integer type.
@@ -878,7 +878,7 @@ ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integ
878878
879879
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
880880
");
881-
macro_subgroup_op!(impl Float, "OpGroupNonUniformFMul", subgroup_f_mul, GroupOperation::Reduce, subgroup_inclusive_f_mul, GroupOperation::InclusiveScan, subgroup_exclusive_f_mul, GroupOperation::ExclusiveScan; r"
881+
macro_subgroup_op!(impl Float, "OpGroupNonUniformFMul", subgroup_mul_f, GroupOperation::Reduce, subgroup_inclusive_mul_f, GroupOperation::InclusiveScan, subgroup_exclusive_mul_f, GroupOperation::ExclusiveScan; r"
882882
A floating point multiply group operation of all Value operands contributed by active invocations in the group.
883883
884884
Result Type must be a scalar or vector of floating-point type.
@@ -891,7 +891,7 @@ The type of Value must be the same as Result Type. The method used to perform th
891891
892892
Requires Capability `GroupNonUniformArithmetic`.
893893
");
894-
macro_subgroup_op_clustered!(impl Float, "OpGroupNonUniformFMul", subgroup_clustered_f_mul; r"
894+
macro_subgroup_op_clustered!(impl Float, "OpGroupNonUniformFMul", subgroup_clustered_mul_f; r"
895895
A floating point multiply group operation of all Value operands contributed by active invocations in the group.
896896
897897
Result Type must be a scalar or vector of floating-point type.
@@ -908,7 +908,7 @@ Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
908908
");
909909

910910
// min
911-
macro_subgroup_op!(impl SignedInteger, "OpGroupNonUniformSMin", subgroup_s_min, GroupOperation::Reduce, subgroup_inclusive_s_min, GroupOperation::InclusiveScan, subgroup_exclusive_s_min, GroupOperation::ExclusiveScan; r"
911+
macro_subgroup_op!(impl SignedInteger, "OpGroupNonUniformSMin", subgroup_min_s, GroupOperation::Reduce, subgroup_inclusive_min_s, GroupOperation::InclusiveScan, subgroup_exclusive_min_s, GroupOperation::ExclusiveScan; r"
912912
A signed integer minimum group operation of all Value operands contributed by active invocations in the group.
913913
914914
Result Type must be a scalar or vector of integer type.
@@ -921,7 +921,7 @@ The type of Value must be the same as Result Type.
921921
922922
Requires Capability `GroupNonUniformArithmetic`.
923923
");
924-
macro_subgroup_op_clustered!(impl SignedInteger, "OpGroupNonUniformSMin", subgroup_clustered_s_min; r"
924+
macro_subgroup_op_clustered!(impl SignedInteger, "OpGroupNonUniformSMin", subgroup_clustered_min_s; r"
925925
A signed integer minimum group operation of all Value operands contributed by active invocations in the group.
926926
927927
Result Type must be a scalar or vector of integer type.
@@ -936,7 +936,7 @@ ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integ
936936
937937
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
938938
");
939-
macro_subgroup_op!(impl UnsignedInteger, "OpGroupNonUniformUMin", subgroup_u_min, GroupOperation::Reduce, subgroup_inclusive_u_min, GroupOperation::InclusiveScan, subgroup_exclusive_u_min, GroupOperation::ExclusiveScan; r"
939+
macro_subgroup_op!(impl UnsignedInteger, "OpGroupNonUniformUMin", subgroup_min_u, GroupOperation::Reduce, subgroup_inclusive_min_u, GroupOperation::InclusiveScan, subgroup_exclusive_min_u, GroupOperation::ExclusiveScan; r"
940940
An unsigned integer minimum group operation of all Value operands contributed by active invocations in the group.
941941
942942
Result Type must be a scalar or vector of integer type, whose Signedness operand is 0.
@@ -949,7 +949,7 @@ The type of Value must be the same as Result Type.
949949
950950
Requires Capability `GroupNonUniformArithmetic`.
951951
");
952-
macro_subgroup_op_clustered!(impl UnsignedInteger, "OpGroupNonUniformUMin", subgroup_clustered_u_min; r"
952+
macro_subgroup_op_clustered!(impl UnsignedInteger, "OpGroupNonUniformUMin", subgroup_clustered_min_u; r"
953953
An unsigned integer minimum group operation of all Value operands contributed by active invocations in the group.
954954
955955
Result Type must be a scalar or vector of integer type, whose Signedness operand is 0.
@@ -964,7 +964,7 @@ ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integ
964964
965965
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
966966
");
967-
macro_subgroup_op!(impl Float, "OpGroupNonUniformFMin", subgroup_f_min, GroupOperation::Reduce, subgroup_inclusive_f_min, GroupOperation::InclusiveScan, subgroup_exclusive_f_min, GroupOperation::ExclusiveScan; r"
967+
macro_subgroup_op!(impl Float, "OpGroupNonUniformFMin", subgroup_min_f, GroupOperation::Reduce, subgroup_inclusive_min_f, GroupOperation::InclusiveScan, subgroup_exclusive_min_f, GroupOperation::ExclusiveScan; r"
968968
A floating point minimum group operation of all Value operands contributed by active invocations in the group.
969969
970970
Result Type must be a scalar or vector of floating-point type.
@@ -977,7 +977,7 @@ The type of Value must be the same as Result Type. The method used to perform th
977977
978978
Requires Capability `GroupNonUniformArithmetic`.
979979
");
980-
macro_subgroup_op_clustered!(impl Float, "OpGroupNonUniformFMin", subgroup_clustered_f_min; r"
980+
macro_subgroup_op_clustered!(impl Float, "OpGroupNonUniformFMin", subgroup_clustered_min_f; r"
981981
A floating point minimum group operation of all Value operands contributed by active invocations in the group.
982982
983983
Result Type must be a scalar or vector of floating-point type.
@@ -994,7 +994,7 @@ Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
994994
");
995995

996996
// max
997-
macro_subgroup_op!(impl SignedInteger, "OpGroupNonUniformSMax", subgroup_s_max, GroupOperation::Reduce, subgroup_inclusive_s_max, GroupOperation::InclusiveScan, subgroup_exclusive_s_max, GroupOperation::ExclusiveScan; r"
997+
macro_subgroup_op!(impl SignedInteger, "OpGroupNonUniformSMax", subgroup_max_s, GroupOperation::Reduce, subgroup_inclusive_max_s, GroupOperation::InclusiveScan, subgroup_exclusive_max_s, GroupOperation::ExclusiveScan; r"
998998
A signed integer maximum group operation of all Value operands contributed by active invocations in the group.
999999
10001000
Result Type must be a scalar or vector of integer type.
@@ -1007,7 +1007,7 @@ The type of Value must be the same as Result Type.
10071007
10081008
Requires Capability `GroupNonUniformArithmetic`.
10091009
");
1010-
macro_subgroup_op_clustered!(impl SignedInteger, "OpGroupNonUniformSMax", subgroup_clustered_s_max; r"
1010+
macro_subgroup_op_clustered!(impl SignedInteger, "OpGroupNonUniformSMax", subgroup_clustered_max_s; r"
10111011
A signed integer maximum group operation of all Value operands contributed by active invocations in the group.
10121012
10131013
Result Type must be a scalar or vector of integer type.
@@ -1022,7 +1022,7 @@ ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integ
10221022
10231023
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
10241024
");
1025-
macro_subgroup_op!(impl UnsignedInteger, "OpGroupNonUniformUMax", subgroup_u_max, GroupOperation::Reduce, subgroup_inclusive_u_max, GroupOperation::InclusiveScan, subgroup_exclusive_u_max, GroupOperation::ExclusiveScan; r"
1025+
macro_subgroup_op!(impl UnsignedInteger, "OpGroupNonUniformUMax", subgroup_max_u, GroupOperation::Reduce, subgroup_inclusive_max_u, GroupOperation::InclusiveScan, subgroup_exclusive_max_u, GroupOperation::ExclusiveScan; r"
10261026
An unsigned integer maximum group operation of all Value operands contributed by active invocations in the group.
10271027
10281028
Result Type must be a scalar or vector of integer type, whose Signedness operand is 0.
@@ -1035,7 +1035,7 @@ The type of Value must be the same as Result Type.
10351035
10361036
Requires Capability `GroupNonUniformArithmetic`.
10371037
");
1038-
macro_subgroup_op_clustered!(impl UnsignedInteger, "OpGroupNonUniformUMax", subgroup_clustered_u_max; r"
1038+
macro_subgroup_op_clustered!(impl UnsignedInteger, "OpGroupNonUniformUMax", subgroup_clustered_max_u; r"
10391039
An unsigned integer maximum group operation of all Value operands contributed by active invocations in the group.
10401040
10411041
Result Type must be a scalar or vector of integer type, whose Signedness operand is 0.
@@ -1050,7 +1050,7 @@ ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integ
10501050
10511051
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
10521052
");
1053-
macro_subgroup_op!(impl Float, "OpGroupNonUniformFMax", subgroup_f_max, GroupOperation::Reduce, subgroup_inclusive_f_max, GroupOperation::InclusiveScan, subgroup_exclusive_f_max, GroupOperation::ExclusiveScan; r"
1053+
macro_subgroup_op!(impl Float, "OpGroupNonUniformFMax", subgroup_max_f, GroupOperation::Reduce, subgroup_inclusive_max_f, GroupOperation::InclusiveScan, subgroup_exclusive_max_f, GroupOperation::ExclusiveScan; r"
10541054
A floating point maximum group operation of all Value operands contributed by active invocations in by group.
10551055
10561056
Result Type must be a scalar or vector of floating-point type.
@@ -1063,7 +1063,7 @@ The type of Value must be the same as Result Type. The method used to perform th
10631063
10641064
Requires Capability `GroupNonUniformArithmetic`.
10651065
");
1066-
macro_subgroup_op_clustered!(impl Float, "OpGroupNonUniformFMax", subgroup_clustered_f_max; r"
1066+
macro_subgroup_op_clustered!(impl Float, "OpGroupNonUniformFMax", subgroup_clustered_max_f; r"
10671067
A floating point maximum group operation of all Value operands contributed by active invocations in by group.
10681068
10691069
Result Type must be a scalar or vector of floating-point type.

tests/ui/arch/subgroup/subgroup_i_add_clustered.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use spirv_std::arch::{GroupOperation, SubgroupMask};
77
use spirv_std::spirv;
88

99
unsafe fn subgroup_i_add_clustered(value: u32) -> u32 {
10-
spirv_std::arch::subgroup_clustered_i_add::<8, _>(value)
10+
spirv_std::arch::subgroup_clustered_add_i::<8, _>(value)
1111
}
1212

1313
#[spirv(compute(threads(32, 1, 1)))]

tests/ui/arch/subgroup/subgroup_i_add_exclusive_scan.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use spirv_std::arch::{GroupOperation, SubgroupMask};
77
use spirv_std::spirv;
88

99
unsafe fn subgroup_i_add_exclusive_scan(value: u32) -> u32 {
10-
spirv_std::arch::subgroup_exclusive_i_add(value)
10+
spirv_std::arch::subgroup_exclusive_add_i(value)
1111
}
1212

1313
#[spirv(compute(threads(32, 1, 1)))]

tests/ui/arch/subgroup/subgroup_i_add_inclusive_scan.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use spirv_std::arch::{GroupOperation, SubgroupMask};
77
use spirv_std::spirv;
88

99
unsafe fn subgroup_i_add_inclusive_scan(value: u32) -> u32 {
10-
spirv_std::arch::subgroup_inclusive_i_add(value)
10+
spirv_std::arch::subgroup_inclusive_add_i(value)
1111
}
1212

1313
#[spirv(compute(threads(32, 1, 1)))]

tests/ui/arch/subgroup/subgroup_i_add_reduce.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use spirv_std::arch::{GroupOperation, SubgroupMask};
77
use spirv_std::spirv;
88

99
unsafe fn subgroup_i_add_reduce(value: u32) -> u32 {
10-
spirv_std::arch::subgroup_i_add(value)
10+
spirv_std::arch::subgroup_add_i(value)
1111
}
1212

1313
#[spirv(compute(threads(32, 1, 1)))]

0 commit comments

Comments
 (0)