| 1 | /* Copyright (c) 2014 Apple, Inc. All rights reserved. */ |
| 2 | |
| 3 | #ifndef __SIMD_EXTERN_HEADER__ |
| 4 | #define __SIMD_EXTERN_HEADER__ |
| 5 | |
| 6 | #include <simd/base.h> |
| 7 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES |
| 8 | #include <simd/types.h> |
| 9 | |
| 10 | #ifdef __cplusplus |
| 11 | extern "C" { |
| 12 | #endif |
| 13 | |
| 14 | #pragma mark - geometry |
| 15 | #if SIMD_LIBRARY_VERSION >= 2 |
| 16 | extern float _simd_orient_vf2(simd_float2, simd_float2); |
| 17 | extern float _simd_orient_pf2(simd_float2, simd_float2, simd_float2); |
| 18 | extern float _simd_incircle_pf2(simd_float2, simd_float2, simd_float2, simd_float2); |
| 19 | |
| 20 | extern float _simd_orient_vf3(simd_float3, simd_float3, simd_float3); |
| 21 | extern float _simd_orient_pf3(simd_float3, simd_float3, simd_float3, simd_float3); |
| 22 | extern float _simd_insphere_pf3(simd_float3, simd_float3, simd_float3, simd_float3, simd_float3); |
| 23 | |
| 24 | extern double _simd_orient_vd2(simd_double2, simd_double2); |
| 25 | extern double _simd_orient_pd2(simd_double2, simd_double2, simd_double2); |
| 26 | extern double _simd_incircle_pd2(simd_double2, simd_double2, simd_double2, simd_double2); |
| 27 | |
| 28 | /* The double3 variants of these functions take their arguments in a buffer |
| 29 | * to workaround the fact that double3 calling conventions are different |
| 30 | * depending on whether or not the executable has been compiled with AVX |
| 31 | * enabled. */ |
| 32 | extern double _simd_orient_vd3(const double *); |
| 33 | extern double _simd_orient_pd3(const double *); |
| 34 | extern double _simd_insphere_pd3(const double *); |
| 35 | #endif /* SIMD_LIBRARY_VERSION */ |
| 36 | |
| 37 | #if SIMD_LIBRARY_VERSION >= 6 |
| 38 | extern _Float16 _simd_orient_vh2(simd_half2, simd_half2); |
| 39 | extern _Float16 _simd_orient_ph2(simd_half2, simd_half2, simd_half2); |
| 40 | extern _Float16 _simd_incircle_ph2(simd_half2, simd_half2, simd_half2, simd_half2); |
| 41 | |
| 42 | extern _Float16 _simd_orient_vh3(simd_half3, simd_half3, simd_half3); |
| 43 | extern _Float16 _simd_orient_ph3(simd_half3, simd_half3, simd_half3, simd_half3); |
| 44 | extern _Float16 _simd_insphere_ph3(simd_half3, simd_half3, simd_half3, simd_half3, simd_half3); |
| 45 | #endif /* SIMD_LIBRARY_VERSION */ |
| 46 | |
| 47 | #pragma mark - matrix |
| 48 | extern simd_float2x2 __invert_f2(simd_float2x2); |
| 49 | extern simd_double2x2 __invert_d2(simd_double2x2); |
| 50 | extern simd_float3x3 __invert_f3(simd_float3x3); |
| 51 | extern simd_double3x3 __invert_d3(simd_double3x3); |
| 52 | extern simd_float4x4 __invert_f4(simd_float4x4); |
| 53 | extern simd_double4x4 __invert_d4(simd_double4x4); |
| 54 | |
| 55 | #if SIMD_LIBRARY_VERSION >= 6 |
| 56 | extern simd_half2x2 __invert_h2(simd_half2x2); |
| 57 | extern simd_half3x3 __invert_h3(simd_half3x3); |
| 58 | extern simd_half4x4 __invert_h4(simd_half4x4); |
| 59 | #endif /* SIMD_LIBRARY_VERSION */ |
| 60 | |
| 61 | #ifdef __cplusplus |
| 62 | } |
| 63 | #endif |
| 64 | #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ |
| 65 | #endif /* __SIMD_EXTERN_HEADER__ */ |