1 /*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17
18 #if defined(TARGET_LINUX_ARM64)
19
20 #include "mth_intrinsics.h"
21
22 vrd2_t
__gd_tan_2(vrd2_t x)23 __gd_tan_2(vrd2_t x)
24 {
25 return (__ZGVxN2v__mth_i_vr8(x, __mth_i_dtan));
26 }
27
28 vrd2_t
__gd_tan_2m(vrd2_t x,vid2_t mask)29 __gd_tan_2m(vrd2_t x, vid2_t mask)
30 {
31 return (__ZGVxM2v__mth_i_vr8(x, mask, __mth_i_dtan));
32 }
33
34 double complex
__gz_tan_1(double complex x)35 __gz_tan_1(double complex x)
36 {
37 return (ctan(x));
38 }
39
40 vcd1_t
__gz_tan_1v(vcd1_t x)41 __gz_tan_1v(vcd1_t x)
42 {
43 return (__ZGVxN1v__mth_i_vc8(x, ctan));
44 }
45
46 #endif
47
48