master
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
11extern "C" {
12#endif
13
14#pragma mark - geometry
15#if SIMD_LIBRARY_VERSION >= 2
16extern float _simd_orient_vf2(simd_float2, simd_float2);
17extern float _simd_orient_pf2(simd_float2, simd_float2, simd_float2);
18extern float _simd_incircle_pf2(simd_float2, simd_float2, simd_float2, simd_float2);
19
20extern float _simd_orient_vf3(simd_float3, simd_float3, simd_float3);
21extern float _simd_orient_pf3(simd_float3, simd_float3, simd_float3, simd_float3);
22extern float _simd_insphere_pf3(simd_float3, simd_float3, simd_float3, simd_float3, simd_float3);
23
24extern double _simd_orient_vd2(simd_double2, simd_double2);
25extern double _simd_orient_pd2(simd_double2, simd_double2, simd_double2);
26extern 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. */
32extern double _simd_orient_vd3(const double *);
33extern double _simd_orient_pd3(const double *);
34extern double _simd_insphere_pd3(const double *);
35#endif /* SIMD_LIBRARY_VERSION */
36
37#if SIMD_LIBRARY_VERSION >= 6
38extern _Float16 _simd_orient_vh2(simd_half2, simd_half2);
39extern _Float16 _simd_orient_ph2(simd_half2, simd_half2, simd_half2);
40extern _Float16 _simd_incircle_ph2(simd_half2, simd_half2, simd_half2, simd_half2);
41
42extern _Float16 _simd_orient_vh3(simd_half3, simd_half3, simd_half3);
43extern _Float16 _simd_orient_ph3(simd_half3, simd_half3, simd_half3, simd_half3);
44extern _Float16 _simd_insphere_ph3(simd_half3, simd_half3, simd_half3, simd_half3, simd_half3);
45#endif /* SIMD_LIBRARY_VERSION */
46
47#pragma mark - matrix
48extern simd_float2x2 __invert_f2(simd_float2x2);
49extern simd_double2x2 __invert_d2(simd_double2x2);
50extern simd_float3x3 __invert_f3(simd_float3x3);
51extern simd_double3x3 __invert_d3(simd_double3x3);
52extern simd_float4x4 __invert_f4(simd_float4x4);
53extern simd_double4x4 __invert_d4(simd_double4x4);
54
55#if SIMD_LIBRARY_VERSION >= 6
56extern simd_half2x2 __invert_h2(simd_half2x2);
57extern simd_half3x3 __invert_h3(simd_half3x3);
58extern 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__ */