c7eda1bce9
Make sure to test everything with scalar as well to catch any weird edge cases. Not all opcodes are covered here, just the arithmetic ones. FP64 packing is also ignored.
36 lines
443 B
Plaintext
36 lines
443 B
Plaintext
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct _8
|
|
{
|
|
float _m0;
|
|
float _m1;
|
|
};
|
|
|
|
struct _15
|
|
{
|
|
float _m0;
|
|
int _m1;
|
|
};
|
|
|
|
struct _3
|
|
{
|
|
float _m0;
|
|
int _m1;
|
|
};
|
|
|
|
kernel void main0(device _3& _4 [[buffer(0)]])
|
|
{
|
|
_8 _23;
|
|
_23._m0 = modf(20.0, _23._m1);
|
|
_15 _24;
|
|
_24._m0 = frexp(40.0, _24._m1);
|
|
_4._m0 = _23._m0;
|
|
_4._m0 = _23._m1;
|
|
_4._m0 = _24._m0;
|
|
_4._m1 = _24._m1;
|
|
}
|
|
|