Skip to content

Commit 69d06bd

Browse files
committed
rambo wip
1 parent e501dc7 commit 69d06bd

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

examples/rambo.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import numpy as np
33

44
def sp_rambo(sp_C1, sp_F1, sp_Q1, sp_output, C1, F1, Q1, output):
5+
56
sp_C = 2.0 * sp_C1 - 1.0
67
sp_S = sp.sqrt(1 - sp.square(sp_C))
78
sp_F = 2.0 * sp.pi * sp_F1
@@ -22,11 +23,7 @@ def sp_rambo(sp_C1, sp_F1, sp_Q1, sp_output, C1, F1, Q1, output):
2223
output[:, :, 2] = Q * S * np.cos(F)
2324
output[:, :, 3] = Q * C
2425

25-
# assert np.allclose(sp.to_numpy(sp_C), C)
26-
# assert np.allclose(sp.to_numpy(sp_S), S)
27-
# assert np.allclose(sp.to_numpy(sp_F), F)
28-
# assert np.allclose(sp.to_numpy(sp_Q), Q)
29-
# print(sp_C, sp_S, sp_F, sp_Q)
26+
sp.sync()
3027

3128

3229
def sp_initialize(nevts, nout, seed, types_dict):
@@ -37,6 +34,8 @@ def sp_initialize(nevts, nout, seed, types_dict):
3734
F1 = sp.random.rand(nevts, nout)
3835
Q1 = sp.random.rand(nevts, nout) * sp.random.rand(nevts, nout)
3936

37+
sp.sync()
38+
4039
return (C1, F1, Q1, sp.zeros((nevts, nout, 4), dtype))
4140

4241
def np_rambo(nevts, nout, C1, F1, Q1, output):

0 commit comments

Comments
 (0)