| // |
| // fragment_main |
| // |
| #include <metal_stdlib> |
| |
| using namespace metal; |
| uint3 subgroupInclusiveAdd_f43b30() { |
| uint3 res = simd_prefix_inclusive_sum(uint3(1u)); |
| return res; |
| } |
| |
| fragment void fragment_main(device packed_uint3* tint_symbol [[buffer(0)]]) { |
| *(tint_symbol) = packed_uint3(subgroupInclusiveAdd_f43b30()); |
| return; |
| } |
| |
| // |
| // compute_main |
| // |
| #include <metal_stdlib> |
| |
| using namespace metal; |
| uint3 subgroupInclusiveAdd_f43b30() { |
| uint3 res = simd_prefix_inclusive_sum(uint3(1u)); |
| return res; |
| } |
| |
| kernel void compute_main(device packed_uint3* tint_symbol [[buffer(0)]]) { |
| *(tint_symbol) = packed_uint3(subgroupInclusiveAdd_f43b30()); |
| return; |
| } |
| |