Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1140bbf

Browse files
committed
refernce tests
1 parent c61df37 commit 1140bbf

16 files changed

+99
-16
lines changed

integration_tests/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ RUN(NAME elemental_01 LABELS cpython llvm)
171171
RUN(NAME elemental_02 LABELS cpython llvm)
172172
RUN(NAME elemental_03 LABELS cpython llvm)
173173
RUN(NAME elemental_04 LABELS cpython llvm)
174-
175174
RUN(NAME elemental_07 LABELS cpython llvm)
176175
RUN(NAME elemental_08 LABELS cpython llvm)
177176
RUN(NAME test_random LABELS cpython llvm)

src/runtime/lpython_intrinsic_numpy.py

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,48 @@ def _lfortran_stan(x: f32) -> f32:
7474
def tan(x: f32) -> f32:
7575
return _lfortran_stan(x)
7676

77+
78+
########## sinh ##########
79+
80+
@ccall
81+
def _lfortran_dsinh(x: f64) -> f64:
82+
pass
83+
84+
@overload
85+
@vectorize
86+
def sinh(x: f64) -> f64:
87+
return _lfortran_dsinh(x)
88+
89+
@ccall
90+
def _lfortran_ssinh(x: f32) -> f32:
91+
pass
92+
93+
@overload
94+
@vectorize
95+
def sinh(x: f32) -> f32:
96+
return _lfortran_ssinh(x)
97+
98+
########## cosh ##########
99+
100+
@ccall
101+
def _lfortran_dcosh(x: f64) -> f64:
102+
pass
103+
104+
@overload
105+
@vectorize
106+
def cosh(x: f64) -> f64:
107+
return _lfortran_dcosh(x)
108+
109+
@ccall
110+
def _lfortran_scosh(x: f32) -> f32:
111+
pass
112+
113+
@overload
114+
@vectorize
115+
def cosh(x: f32) -> f32:
116+
return _lfortran_scosh(x)
117+
118+
77119
########## log ##########
78120

79121
@ccall
@@ -126,6 +168,47 @@ def log2(x: f64) -> f64:
126168
def log2(x: f32) -> f32:
127169
return _lfortran_slog(x)/_lfortran_slog(2.0)
128170

171+
########## arcsin ##########
172+
173+
@ccall
174+
def _lfortran_dasin(x: f64) -> f64:
175+
pass
176+
177+
@overload
178+
@vectorize
179+
def arcsin(x: f64) -> f64:
180+
return _lfortran_dasin(x)
181+
182+
@ccall
183+
def _lfortran_sasin(x: f32) -> f32:
184+
pass
185+
186+
@overload
187+
@vectorize
188+
def arcsin(x: f32) -> f32:
189+
return _lfortran_sasin(x)
190+
191+
########## arccos ##########
192+
193+
@ccall
194+
def _lfortran_dacos(x: f64) -> f64:
195+
pass
196+
197+
@overload
198+
@vectorize
199+
def arccos(x: f64) -> f64:
200+
return _lfortran_dacos(x)
201+
202+
@ccall
203+
def _lfortran_sacos(x: f32) -> f32:
204+
pass
205+
206+
@overload
207+
@vectorize
208+
def arccos(x: f32) -> f32:
209+
return _lfortran_sacos(x)
210+
211+
129212
########## tanh ##########
130213

131214
@ccall
@@ -164,4 +247,5 @@ def _lfortran_sexp(x: f32) -> f32:
164247
@overload
165248
@vectorize
166249
def exp(x: f32) -> f32:
167-
return _lfortran_sexp(x)
250+
return _lfortran_sexp(x)
251+

tests/reference/asr-array_01_decl-39cf894.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "asr-array_01_decl-39cf894.stdout",
9-
"stdout_hash": "f562643bfd2a4b26e3e7f6bb69beea0c35f6a74660212f44f07e0f05",
9+
"stdout_hash": "581cac2fa1b5469cf1d1ccb3a91fb97ce22413a9b7a3bcb25b5e634c",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-array_01_decl-39cf894.stdout

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/reference/asr-array_02_decl-e8f6874.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "asr-array_02_decl-e8f6874.stdout",
9-
"stdout_hash": "56c4bc7fd4163f840945ed26ca9448aad4f9ba1b45f271c69d6180e9",
9+
"stdout_hash": "8086f9d4d75d8ac5b7819ddc6fa3f7066865eadffe0ad0a77bb3472b",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-array_02_decl-e8f6874.stdout

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/reference/asr-elemental_01-b58df26.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "asr-elemental_01-b58df26.stdout",
9-
"stdout_hash": "d1d0729f3703cfca257da200699e3d8d7f6df7176b12857f9b645722",
9+
"stdout_hash": "b284e294d24025b833fbeaa4b0b24757a4e52d1e8ded3e7e0b74c21d",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-elemental_01-b58df26.stdout

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/reference/asr-test_numpy_03-e600a49.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "asr-test_numpy_03-e600a49.stdout",
9-
"stdout_hash": "8f206770b04d1d779a8f7c0d83ff531965134884b3d21cce6722adb7",
9+
"stdout_hash": "a03bf9f68ef4c8b799a17c8f70bae8af82790ea6db454b8f40a72db6",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-test_numpy_03-e600a49.stdout

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/reference/asr-test_numpy_04-ecbb614.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "asr-test_numpy_04-ecbb614.stdout",
9-
"stdout_hash": "e7f235a587c8ee5c901be38d9315fe321dbd2d781d9eeae6498fd92f",
9+
"stdout_hash": "3a6ad0a1a6fae01ea73b472aaacd3e31446a4bfea8fc1aa6238f885f",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-test_numpy_04-ecbb614.stdout

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/reference/asr-vec_01-66ac423.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "asr-vec_01-66ac423.stdout",
9-
"stdout_hash": "c0cba4b876e914b82241149b6ff31a8c207dbeb44b1087e18876be51",
9+
"stdout_hash": "4210bc49a30dcc6f81bce09c613c5a6515f2d9bcd311ccba2d8cc895",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/asr-vec_01-66ac423.stdout

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/reference/pass_loop_vectorise-vec_01-be9985e.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "pass_loop_vectorise-vec_01-be9985e.stdout",
9-
"stdout_hash": "357598ea1343ea724d1c5d1c5020eab0652d6d12b341f5fa49911925",
9+
"stdout_hash": "90114a0b77cfbb8d9d18385e27a6393ca56659a19440dacf7d0cddca",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0

tests/reference/pass_loop_vectorise-vec_01-be9985e.stdout

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)