Skip to content

Commit 88fe13e

Browse files
committed
subgroup: move type designation to the end of the method name
1 parent c427766 commit 88fe13e

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
@@ -794,7 +794,7 @@ macro_rules! macro_subgroup_op_clustered {
794794
}
795795

796796
// add
797-
macro_subgroup_op!(impl Integer, "OpGroupNonUniformIAdd", subgroup_i_add, GroupOperation::Reduce, subgroup_inclusive_i_add, GroupOperation::InclusiveScan, subgroup_exclusive_i_add, GroupOperation::ExclusiveScan; r"
797+
macro_subgroup_op!(impl Integer, "OpGroupNonUniformIAdd", subgroup_add_i, GroupOperation::Reduce, subgroup_inclusive_add_i, GroupOperation::InclusiveScan, subgroup_exclusive_add_i, GroupOperation::ExclusiveScan; r"
798798
An integer add group operation of all Value operands contributed by active invocations in the group.
799799
800800
Result Type must be a scalar or vector of integer type.
@@ -807,7 +807,7 @@ The type of Value must be the same as Result Type.
807807
808808
Requires Capability `GroupNonUniformArithmetic`.
809809
");
810-
macro_subgroup_op_clustered!(impl Integer, "OpGroupNonUniformIAdd", subgroup_clustered_i_add; r"
810+
macro_subgroup_op_clustered!(impl Integer, "OpGroupNonUniformIAdd", subgroup_clustered_add_i; r"
811811
An integer add group operation of all Value operands contributed by active invocations in the group.
812812
813813
Result Type must be a scalar or vector of integer type.
@@ -822,7 +822,7 @@ ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integ
822822
823823
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
824824
");
825-
macro_subgroup_op!(impl Float, "OpGroupNonUniformFAdd", subgroup_f_add, GroupOperation::Reduce, subgroup_inclusive_f_add, GroupOperation::InclusiveScan, subgroup_exclusive_f_add, GroupOperation::ExclusiveScan; r"
825+
macro_subgroup_op!(impl Float, "OpGroupNonUniformFAdd", subgroup_add_f, GroupOperation::Reduce, subgroup_inclusive_add_f, GroupOperation::InclusiveScan, subgroup_exclusive_add_f, GroupOperation::ExclusiveScan; r"
826826
A floating point add group operation of all Value operands contributed by active invocations in the group.
827827
828828
Result Type must be a scalar or vector of floating-point type.
@@ -835,7 +835,7 @@ The type of Value must be the same as Result Type. The method used to perform th
835835
836836
Requires Capability `GroupNonUniformArithmetic`.
837837
");
838-
macro_subgroup_op_clustered!(impl Float, "OpGroupNonUniformFAdd", subgroup_clustered_f_add; r"
838+
macro_subgroup_op_clustered!(impl Float, "OpGroupNonUniformFAdd", subgroup_clustered_add_f; r"
839839
A floating point add group operation of all Value operands contributed by active invocations in the group.
840840
841841
Result Type must be a scalar or vector of floating-point type.
@@ -852,7 +852,7 @@ Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
852852
");
853853

854854
// mul
855-
macro_subgroup_op!(impl Integer, "OpGroupNonUniformIMul", subgroup_i_mul, GroupOperation::Reduce, subgroup_inclusive_i_mul, GroupOperation::InclusiveScan, subgroup_exclusive_i_mul, GroupOperation::ExclusiveScan; r"
855+
macro_subgroup_op!(impl Integer, "OpGroupNonUniformIMul", subgroup_mul_i, GroupOperation::Reduce, subgroup_inclusive_mul_i, GroupOperation::InclusiveScan, subgroup_exclusive_mul_i, GroupOperation::ExclusiveScan; r"
856856
An integer multiply group operation of all Value operands contributed by active invocations in the group.
857857
858858
Result Type must be a scalar or vector of integer type.
@@ -865,7 +865,7 @@ The type of Value must be the same as Result Type.
865865
866866
Requires Capability `GroupNonUniformArithmetic`.
867867
");
868-
macro_subgroup_op_clustered!(impl Integer, "OpGroupNonUniformIMul", subgroup_clustered_i_mul; r"
868+
macro_subgroup_op_clustered!(impl Integer, "OpGroupNonUniformIMul", subgroup_clustered_mul_i; r"
869869
An integer multiply group operation of all Value operands contributed by active invocations in the group.
870870
871871
Result Type must be a scalar or vector of integer type.
@@ -880,7 +880,7 @@ ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integ
880880
881881
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
882882
");
883-
macro_subgroup_op!(impl Float, "OpGroupNonUniformFMul", subgroup_f_mul, GroupOperation::Reduce, subgroup_inclusive_f_mul, GroupOperation::InclusiveScan, subgroup_exclusive_f_mul, GroupOperation::ExclusiveScan; r"
883+
macro_subgroup_op!(impl Float, "OpGroupNonUniformFMul", subgroup_mul_f, GroupOperation::Reduce, subgroup_inclusive_mul_f, GroupOperation::InclusiveScan, subgroup_exclusive_mul_f, GroupOperation::ExclusiveScan; r"
884884
A floating point multiply group operation of all Value operands contributed by active invocations in the group.
885885
886886
Result Type must be a scalar or vector of floating-point type.
@@ -893,7 +893,7 @@ The type of Value must be the same as Result Type. The method used to perform th
893893
894894
Requires Capability `GroupNonUniformArithmetic`.
895895
");
896-
macro_subgroup_op_clustered!(impl Float, "OpGroupNonUniformFMul", subgroup_clustered_f_mul; r"
896+
macro_subgroup_op_clustered!(impl Float, "OpGroupNonUniformFMul", subgroup_clustered_mul_f; r"
897897
A floating point multiply group operation of all Value operands contributed by active invocations in the group.
898898
899899
Result Type must be a scalar or vector of floating-point type.
@@ -910,7 +910,7 @@ Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
910910
");
911911

912912
// min
913-
macro_subgroup_op!(impl SignedInteger, "OpGroupNonUniformSMin", subgroup_s_min, GroupOperation::Reduce, subgroup_inclusive_s_min, GroupOperation::InclusiveScan, subgroup_exclusive_s_min, GroupOperation::ExclusiveScan; r"
913+
macro_subgroup_op!(impl SignedInteger, "OpGroupNonUniformSMin", subgroup_min_s, GroupOperation::Reduce, subgroup_inclusive_min_s, GroupOperation::InclusiveScan, subgroup_exclusive_min_s, GroupOperation::ExclusiveScan; r"
914914
A signed integer minimum group operation of all Value operands contributed by active invocations in the group.
915915
916916
Result Type must be a scalar or vector of integer type.
@@ -923,7 +923,7 @@ The type of Value must be the same as Result Type.
923923
924924
Requires Capability `GroupNonUniformArithmetic`.
925925
");
926-
macro_subgroup_op_clustered!(impl SignedInteger, "OpGroupNonUniformSMin", subgroup_clustered_s_min; r"
926+
macro_subgroup_op_clustered!(impl SignedInteger, "OpGroupNonUniformSMin", subgroup_clustered_min_s; r"
927927
A signed integer minimum group operation of all Value operands contributed by active invocations in the group.
928928
929929
Result Type must be a scalar or vector of integer type.
@@ -938,7 +938,7 @@ ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integ
938938
939939
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
940940
");
941-
macro_subgroup_op!(impl UnsignedInteger, "OpGroupNonUniformUMin", subgroup_u_min, GroupOperation::Reduce, subgroup_inclusive_u_min, GroupOperation::InclusiveScan, subgroup_exclusive_u_min, GroupOperation::ExclusiveScan; r"
941+
macro_subgroup_op!(impl UnsignedInteger, "OpGroupNonUniformUMin", subgroup_min_u, GroupOperation::Reduce, subgroup_inclusive_min_u, GroupOperation::InclusiveScan, subgroup_exclusive_min_u, GroupOperation::ExclusiveScan; r"
942942
An unsigned integer minimum group operation of all Value operands contributed by active invocations in the group.
943943
944944
Result Type must be a scalar or vector of integer type, whose Signedness operand is 0.
@@ -951,7 +951,7 @@ The type of Value must be the same as Result Type.
951951
952952
Requires Capability `GroupNonUniformArithmetic`.
953953
");
954-
macro_subgroup_op_clustered!(impl UnsignedInteger, "OpGroupNonUniformUMin", subgroup_clustered_u_min; r"
954+
macro_subgroup_op_clustered!(impl UnsignedInteger, "OpGroupNonUniformUMin", subgroup_clustered_min_u; r"
955955
An unsigned integer minimum group operation of all Value operands contributed by active invocations in the group.
956956
957957
Result Type must be a scalar or vector of integer type, whose Signedness operand is 0.
@@ -966,7 +966,7 @@ ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integ
966966
967967
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
968968
");
969-
macro_subgroup_op!(impl Float, "OpGroupNonUniformFMin", subgroup_f_min, GroupOperation::Reduce, subgroup_inclusive_f_min, GroupOperation::InclusiveScan, subgroup_exclusive_f_min, GroupOperation::ExclusiveScan; r"
969+
macro_subgroup_op!(impl Float, "OpGroupNonUniformFMin", subgroup_min_f, GroupOperation::Reduce, subgroup_inclusive_min_f, GroupOperation::InclusiveScan, subgroup_exclusive_min_f, GroupOperation::ExclusiveScan; r"
970970
A floating point minimum group operation of all Value operands contributed by active invocations in the group.
971971
972972
Result Type must be a scalar or vector of floating-point type.
@@ -979,7 +979,7 @@ The type of Value must be the same as Result Type. The method used to perform th
979979
980980
Requires Capability `GroupNonUniformArithmetic`.
981981
");
982-
macro_subgroup_op_clustered!(impl Float, "OpGroupNonUniformFMin", subgroup_clustered_f_min; r"
982+
macro_subgroup_op_clustered!(impl Float, "OpGroupNonUniformFMin", subgroup_clustered_min_f; r"
983983
A floating point minimum group operation of all Value operands contributed by active invocations in the group.
984984
985985
Result Type must be a scalar or vector of floating-point type.
@@ -996,7 +996,7 @@ Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
996996
");
997997

998998
// max
999-
macro_subgroup_op!(impl SignedInteger, "OpGroupNonUniformSMax", subgroup_s_max, GroupOperation::Reduce, subgroup_inclusive_s_max, GroupOperation::InclusiveScan, subgroup_exclusive_s_max, GroupOperation::ExclusiveScan; r"
999+
macro_subgroup_op!(impl SignedInteger, "OpGroupNonUniformSMax", subgroup_max_s, GroupOperation::Reduce, subgroup_inclusive_max_s, GroupOperation::InclusiveScan, subgroup_exclusive_max_s, GroupOperation::ExclusiveScan; r"
10001000
A signed integer maximum group operation of all Value operands contributed by active invocations in the group.
10011001
10021002
Result Type must be a scalar or vector of integer type.
@@ -1009,7 +1009,7 @@ The type of Value must be the same as Result Type.
10091009
10101010
Requires Capability `GroupNonUniformArithmetic`.
10111011
");
1012-
macro_subgroup_op_clustered!(impl SignedInteger, "OpGroupNonUniformSMax", subgroup_clustered_s_max; r"
1012+
macro_subgroup_op_clustered!(impl SignedInteger, "OpGroupNonUniformSMax", subgroup_clustered_max_s; r"
10131013
A signed integer maximum group operation of all Value operands contributed by active invocations in the group.
10141014
10151015
Result Type must be a scalar or vector of integer type.
@@ -1024,7 +1024,7 @@ ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integ
10241024
10251025
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
10261026
");
1027-
macro_subgroup_op!(impl UnsignedInteger, "OpGroupNonUniformUMax", subgroup_u_max, GroupOperation::Reduce, subgroup_inclusive_u_max, GroupOperation::InclusiveScan, subgroup_exclusive_u_max, GroupOperation::ExclusiveScan; r"
1027+
macro_subgroup_op!(impl UnsignedInteger, "OpGroupNonUniformUMax", subgroup_max_u, GroupOperation::Reduce, subgroup_inclusive_max_u, GroupOperation::InclusiveScan, subgroup_exclusive_max_u, GroupOperation::ExclusiveScan; r"
10281028
An unsigned integer maximum group operation of all Value operands contributed by active invocations in the group.
10291029
10301030
Result Type must be a scalar or vector of integer type, whose Signedness operand is 0.
@@ -1037,7 +1037,7 @@ The type of Value must be the same as Result Type.
10371037
10381038
Requires Capability `GroupNonUniformArithmetic`.
10391039
");
1040-
macro_subgroup_op_clustered!(impl UnsignedInteger, "OpGroupNonUniformUMax", subgroup_clustered_u_max; r"
1040+
macro_subgroup_op_clustered!(impl UnsignedInteger, "OpGroupNonUniformUMax", subgroup_clustered_max_u; r"
10411041
An unsigned integer maximum group operation of all Value operands contributed by active invocations in the group.
10421042
10431043
Result Type must be a scalar or vector of integer type, whose Signedness operand is 0.
@@ -1052,7 +1052,7 @@ ClusterSize is the size of cluster to use. ClusterSize must be a scalar of integ
10521052
10531053
Requires Capability `GroupNonUniformArithmetic` and `GroupNonUniformClustered`.
10541054
");
1055-
macro_subgroup_op!(impl Float, "OpGroupNonUniformFMax", subgroup_f_max, GroupOperation::Reduce, subgroup_inclusive_f_max, GroupOperation::InclusiveScan, subgroup_exclusive_f_max, GroupOperation::ExclusiveScan; r"
1055+
macro_subgroup_op!(impl Float, "OpGroupNonUniformFMax", subgroup_max_f, GroupOperation::Reduce, subgroup_inclusive_max_f, GroupOperation::InclusiveScan, subgroup_exclusive_max_f, GroupOperation::ExclusiveScan; r"
10561056
A floating point maximum group operation of all Value operands contributed by active invocations in by group.
10571057
10581058
Result Type must be a scalar or vector of floating-point type.
@@ -1065,7 +1065,7 @@ The type of Value must be the same as Result Type. The method used to perform th
10651065
10661066
Requires Capability `GroupNonUniformArithmetic`.
10671067
");
1068-
macro_subgroup_op_clustered!(impl Float, "OpGroupNonUniformFMax", subgroup_clustered_f_max; r"
1068+
macro_subgroup_op_clustered!(impl Float, "OpGroupNonUniformFMax", subgroup_clustered_max_f; r"
10691069
A floating point maximum group operation of all Value operands contributed by active invocations in by group.
10701070
10711071
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)