2023-09-18 18:11:07 +00:00
|
|
|
// language: metal1.0
|
2022-06-16 21:45:21 +00:00
|
|
|
#include <metal_stdlib>
|
|
|
|
#include <simd/simd.h>
|
|
|
|
|
|
|
|
using metal::uint;
|
|
|
|
|
|
|
|
|
|
|
|
void breakIfEmpty(
|
|
|
|
) {
|
|
|
|
bool loop_init = true;
|
|
|
|
while(true) {
|
|
|
|
if (!loop_init) {
|
|
|
|
if (true) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
loop_init = false;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
void breakIfEmptyBody(
|
|
|
|
bool a
|
|
|
|
) {
|
|
|
|
bool b = {};
|
|
|
|
bool c = {};
|
|
|
|
bool loop_init_1 = true;
|
|
|
|
while(true) {
|
|
|
|
if (!loop_init_1) {
|
|
|
|
b = a;
|
|
|
|
bool _e2 = b;
|
|
|
|
c = a != _e2;
|
|
|
|
bool _e5 = c;
|
|
|
|
if (a == c) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
loop_init_1 = false;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
void breakIf(
|
|
|
|
bool a_1
|
|
|
|
) {
|
|
|
|
bool d = {};
|
|
|
|
bool e = {};
|
|
|
|
bool loop_init_2 = true;
|
|
|
|
while(true) {
|
|
|
|
if (!loop_init_2) {
|
|
|
|
bool _e5 = e;
|
|
|
|
if (a_1 == e) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
loop_init_2 = false;
|
|
|
|
d = a_1;
|
|
|
|
bool _e2 = d;
|
|
|
|
e = a_1 != _e2;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2024-01-05 18:06:55 +00:00
|
|
|
void breakIfSeparateVariable(
|
|
|
|
) {
|
|
|
|
uint counter = 0u;
|
|
|
|
bool loop_init_3 = true;
|
|
|
|
while(true) {
|
|
|
|
if (!loop_init_3) {
|
|
|
|
uint _e5 = counter;
|
|
|
|
if (counter == 5u) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
loop_init_3 = false;
|
|
|
|
uint _e3 = counter;
|
|
|
|
counter = _e3 + 1u;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2022-06-16 21:45:21 +00:00
|
|
|
kernel void main_(
|
|
|
|
) {
|
|
|
|
return;
|
|
|
|
}
|