#include <metal_stdlib>

using namespace metal;
int3 subgroupInclusiveAdd_c816b2() {
  int3 res = simd_prefix_inclusive_sum(int3(1));
  return res;
}

fragment void fragment_main(device packed_int3* tint_symbol [[buffer(0)]]) {
  *(tint_symbol) = packed_int3(subgroupInclusiveAdd_c816b2());
  return;
}

kernel void compute_main(device packed_int3* tint_symbol_1 [[buffer(0)]]) {
  *(tint_symbol_1) = packed_int3(subgroupInclusiveAdd_c816b2());
  return;
}

