blob: b147a04ebd35431781de100b1071829bfa761566 [file] [log] [blame]
SKIP: FAILED
#include <metal_stdlib>
using namespace metal;
struct MyStruct {
float f1;
};
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];
};
thread int v1 = 1;
thread uint v2 = 1u;
thread float v3 = 1.0f;
thread int3 v4 = int3(1);
thread uint3 v5 = uint3(1u, 2u, 3u);
thread float3 v6 = float3(1.0f, 2.0f, 3.0f);
thread MyStruct v7 = MyStruct{.f1=1.0f};
thread tint_array<float, 10> v8 = tint_array<float, 10>{};
thread int v9 = 0;
thread uint v10 = 0u;
thread float v11 = 0.0f;
thread MyStruct v12 = MyStruct{};
thread MyStruct v13 = MyStruct{};
thread tint_array<float, 10> v14 = tint_array<float, 10>{};
thread int3 v15 = int3(1, 2, 3);
thread float3 v16 = float3(1.0f, 2.0f, 3.0f);
void f() {
}