blob: df36244184695cf67c84039e25e293ccab7aec15 [file] [log] [blame] [edit]
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
struct tint_array {
const constant T& operator[](size_t i) const constant { return elements[i]; }
device T& operator[](size_t i) device { return elements[i]; }
const device T& operator[](size_t i) const device { return elements[i]; }
thread T& operator[](size_t i) thread { return elements[i]; }
const thread T& operator[](size_t i) const thread { return elements[i]; }
threadgroup T& operator[](size_t i) threadgroup { return elements[i]; }
const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; }
T elements[N];
};
struct MyStruct {
float f1;
};
struct tint_private_vars_struct {
int v1;
uint v2;
float v3;
int3 v4;
uint3 v5;
float3 v6;
MyStruct v7;
tint_array<float, 10> v8;
int v9;
uint v10;
float v11;
MyStruct v12;
MyStruct v13;
tint_array<float, 10> v14;
int3 v15;
float3 v16;
};
kernel void f() {
thread tint_private_vars_struct tint_private_vars = {};
tint_private_vars.v1 = 1;
tint_private_vars.v2 = 1u;
tint_private_vars.v3 = 1.0f;
tint_private_vars.v4 = int3(1);
tint_private_vars.v5 = uint3(1u, 2u, 3u);
tint_private_vars.v6 = float3(1.0f, 2.0f, 3.0f);
tint_private_vars.v7 = MyStruct{.f1=1.0f};
tint_private_vars.v8 = tint_array<float, 10>{};
tint_private_vars.v9 = 0;
tint_private_vars.v10 = 0u;
tint_private_vars.v11 = 0.0f;
tint_private_vars.v12 = MyStruct{};
tint_private_vars.v13 = MyStruct{};
tint_private_vars.v14 = tint_array<float, 10>{};
tint_private_vars.v15 = int3(1, 2, 3);
tint_private_vars.v16 = float3(1.0f, 2.0f, 3.0f);
int const l1 = tint_private_vars.v1;
uint const l2 = tint_private_vars.v2;
float const l3 = tint_private_vars.v3;
int3 const l4 = tint_private_vars.v4;
uint3 const l5 = tint_private_vars.v5;
float3 const l6 = tint_private_vars.v6;
MyStruct const l7 = tint_private_vars.v7;
tint_array<float, 10> const l8 = tint_private_vars.v8;
int const l9 = tint_private_vars.v9;
uint const l10 = tint_private_vars.v10;
float const l11 = tint_private_vars.v11;
MyStruct const l12 = tint_private_vars.v12;
MyStruct const l13 = tint_private_vars.v13;
tint_array<float, 10> const l14 = tint_private_vars.v14;
int3 const l15 = tint_private_vars.v15;
float3 const l16 = tint_private_vars.v16;
return;
}