Lines Matching refs:fn

1580 #define THUNK_NATIVE_F(fn) \  argument
1581 float __attribute__((overloadable)) native_##fn(float v) { return fn(v);} \
1582 float2 __attribute__((overloadable)) native_##fn(float2 v) { return fn(v);} \
1583 float3 __attribute__((overloadable)) native_##fn(float3 v) { return fn(v);} \
1584 float4 __attribute__((overloadable)) native_##fn(float4 v) { return fn(v);}
1586 #define THUNK_NATIVE_F_F(fn) \ argument
1587 float __attribute__((overloadable)) native_##fn(float v1, float v2) { return fn(v1, v2);} \
1588 float2 __attribute__((overloadable)) native_##fn(float2 v1, float2 v2) { return fn(v1, v2);} \
1589 float3 __attribute__((overloadable)) native_##fn(float3 v1, float3 v2) { return fn(v1, v2);} \
1590 float4 __attribute__((overloadable)) native_##fn(float4 v1, float4 v2) { return fn(v1, v2);}
1592 #define THUNK_NATIVE_F_FP(fn) \ argument
1593 float __attribute__((overloadable)) native_##fn(float v1, float *v2) { return fn(v1, v2);} \
1594 float2 __attribute__((overloadable)) native_##fn(float2 v1, float2 *v2) { return fn(v1, v2);} \
1595 float3 __attribute__((overloadable)) native_##fn(float3 v1, float3 *v2) { return fn(v1, v2);} \
1596 float4 __attribute__((overloadable)) native_##fn(float4 v1, float4 *v2) { return fn(v1, v2);}
1598 #define THUNK_NATIVE_F_I(fn) \ argument
1599 float __attribute__((overloadable)) native_##fn(float v1, int v2) { return fn(v1, v2);} \
1600 float2 __attribute__((overloadable)) native_##fn(float2 v1, int2 v2) { return fn(v1, v2);} \
1601 float3 __attribute__((overloadable)) native_##fn(float3 v1, int3 v2) { return fn(v1, v2);} \
1602 float4 __attribute__((overloadable)) native_##fn(float4 v1, int4 v2) { return fn(v1, v2);}
1689 #define HN_FUNC_HN(fn) \ argument
1690 extern half __attribute__((overloadable)) fn(half h) { \
1691 return (half) fn((float) h); \
1693 extern half2 __attribute__((overloadable)) fn(half2 v) { \
1694 return convert_half2(fn(convert_float2(v))); \
1696 extern half3 __attribute__((overloadable)) fn(half3 v) { \
1697 return convert_half3(fn(convert_float3(v))); \
1699 extern half4 __attribute__((overloadable)) fn(half4 v) { \
1700 return convert_half4(fn(convert_float4(v))); \
1707 #define HN_FUNC_HN_HN(fn) \ argument
1708 extern half __attribute__((overloadable)) fn(half h1, half h2) { \
1709 return (half) fn((float) h1, (float) h2); \
1711 extern half2 __attribute__((overloadable)) fn(half2 v1, half2 v2) { \
1712 return convert_half2(fn(convert_float2(v1), \
1715 extern half3 __attribute__((overloadable)) fn(half3 v1, half3 v2) { \
1716 return convert_half3(fn(convert_float3(v1), \
1719 extern half4 __attribute__((overloadable)) fn(half4 v1, half4 v2) { \
1720 return convert_half4(fn(convert_float4(v1), \
1728 #define HN_FUNC_HN_H(fn) \ argument
1729 extern half2 __attribute__((overloadable)) fn(half2 v1, half v2) { \
1730 return convert_half2(fn(convert_float2(v1), (float) v2)); \
1732 extern half3 __attribute__((overloadable)) fn(half3 v1, half v2) { \
1733 return convert_half3(fn(convert_float3(v1), (float) v2)); \
1735 extern half4 __attribute__((overloadable)) fn(half4 v1, half v2) { \
1736 return convert_half4(fn(convert_float4(v1), (float) v2)); \
1743 #define HN_FUNC_HN_HN_HN(fn) \ argument
1744 extern half __attribute__((overloadable)) fn(half h1, half h2, half h3) { \
1745 return (half) fn((float) h1, (float) h2, (float) h3); \
1747 extern half2 __attribute__((overloadable)) fn(half2 v1, half2 v2, half2 v3) { \
1748 return convert_half2(fn(convert_float2(v1), \
1752 extern half3 __attribute__((overloadable)) fn(half3 v1, half3 v2, half3 v3) { \
1753 return convert_half3(fn(convert_float3(v1), \
1757 extern half4 __attribute__((overloadable)) fn(half4 v1, half4 v2, half4 v3) { \
1758 return convert_half4(fn(convert_float4(v1), \
1768 #define HN_FUNC_HN_IN(fn) \ argument
1769 extern half __attribute__((overloadable)) fn(half h1, int v) { \
1770 return (half) fn((float) h1, v); \
1772 extern half2 __attribute__((overloadable)) fn(half2 v1, int2 v2) { \
1773 return convert_half2(fn(convert_float2(v1), v2)); \
1775 extern half3 __attribute__((overloadable)) fn(half3 v1, int3 v2) { \
1776 return convert_half3(fn(convert_float3(v1), v2)); \
1778 extern half4 __attribute__((overloadable)) fn(half4 v1, int4 v2) { \
1779 return convert_half4(fn(convert_float4(v1), v2)); \
1786 #define H_FUNC_HN(fn) \ argument
1787 extern half __attribute__((overloadable)) fn(half h) { \
1788 return (half) fn((float) h); \
1790 extern half __attribute__((overloadable)) fn(half2 v) { \
1791 return fn(convert_float2(v)); \
1793 extern half __attribute__((overloadable)) fn(half3 v) { \
1794 return fn(convert_float3(v)); \
1796 extern half __attribute__((overloadable)) fn(half4 v) { \
1797 return fn(convert_float4(v)); \
1804 #define H_FUNC_HN_HN(fn) \ argument
1805 extern half __attribute__((overloadable)) fn(half h1, half h2) { \
1806 return (half) fn((float) h1, (float) h2); \
1808 extern half __attribute__((overloadable)) fn(half2 v1, half2 v2) { \
1809 return fn(convert_float2(v1), convert_float2(v2)); \
1811 extern half __attribute__((overloadable)) fn(half3 v1, half3 v2) { \
1812 return fn(convert_float3(v1), convert_float3(v2)); \
1814 extern half __attribute__((overloadable)) fn(half4 v1, half4 v2) { \
1815 return fn(convert_float4(v1), convert_float4(v2)); \
1858 #define SCALARIZE_HN_FUNC_HN_HN(fn) \ argument
1859 extern half2 __attribute__((overloadable)) fn(half2 v1, half2 v2) { \
1861 ret.x = fn(v1.x, v2.x); \
1862 ret.y = fn(v1.y, v2.y); \
1865 extern half3 __attribute__((overloadable)) fn(half3 v1, half3 v2) { \
1867 ret.x = fn(v1.x, v2.x); \
1868 ret.y = fn(v1.y, v2.y); \
1869 ret.z = fn(v1.z, v2.z); \
1872 extern half4 __attribute__((overloadable)) fn(half4 v1, half4 v2) { \
1874 ret.x = fn(v1.x, v2.x); \
1875 ret.y = fn(v1.y, v2.y); \
1876 ret.z = fn(v1.z, v2.z); \
1877 ret.w = fn(v1.w, v2.w); \