blob: aab38411a17dc4f272eaed4ceb346e0591983052 [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
void deref() {
int3 a = 0;
thread int3* const p = (&a);
(*p).x = as_type<int>((as_type<uint>((*p).x) + as_type<uint>(42)));
}
void no_deref() {
int3 a = 0;
thread int3* const p = (&a);
(*p).x = as_type<int>((as_type<uint>((*p).x) + as_type<uint>(42)));
}
void deref_inc() {
int3 a = 0;
thread int3* const p = (&a);
(*p).x = as_type<int>((as_type<uint>((*p).x) + as_type<uint>(1)));
}
void no_deref_inc() {
int3 a = 0;
thread int3* const p = (&a);
(*p).x = as_type<int>((as_type<uint>((*p).x) + as_type<uint>(1)));
}
kernel void v() {
deref();
no_deref();
deref_inc();
no_deref_inc();
}