Skip to content
This repository was archived by the owner on Sep 27, 2021. It is now read-only.

Commit d97e572

Browse files
committed
checkout untagged out dependencies
1 parent 5ca9ad3 commit d97e572

File tree

3 files changed

+11
-130
lines changed

3 files changed

+11
-130
lines changed

REQUIRE

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
julia 0.6
2-
CLFFT
3-
CLBLAS
4-
OpenCL
5-
Transpiler
6-
Sugar
7-
GPUArrays
82

3+
GPUArrays
94

10-
julia 0.6
115
StaticArrays
126
ColorTypes
137

@@ -18,6 +12,3 @@ Matcha 0.0.2
1812
OpenCL 0.6.0 #proper packed conversion
1913
CLBLAS 1.1.0
2014
CLFFT 0.4.0 # 0.5.0
21-
22-
Interpolations
23-
IterTools

appveyor.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

test/runtests.jl

Lines changed: 10 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,15 @@
1-
using CLArrays
2-
using GPUArrays.TestSuite, Base.Test
3-
using GPUArrays: global_size
4-
using CUDAnative, CUDAdrv
5-
TestSuite.run_tests(CLArray)
6-
7-
using CLArrays
8-
9-
x = CLArray(rand(Float32, 10))
1+
if (
2+
get(ENV, "TRAVIS", "") == "true" ||
3+
get(ENV, "APPVEYOR", "") == "true" ||
4+
get(ENV, "CI", "") == "true"
5+
)
106

11-
GPUArrays.gpu_call(x, (x,)) do state, l
12-
l[1] = 1f0 ^ 1.0
13-
return
7+
Pkg.checkout("Transpiler", "sd/struct_buffer")
8+
Pkg.checkout("Sugar", "sd/struct_buffer")
9+
Pkg.checkout("GPUArrays", "sd/abstractgpu")
1410
end
1511

16-
17-
using ArrayFire
18-
19-
ArrayFire.set_backend(AF_BACKEND_OPENCL)
20-
2112
using CLArrays
22-
TY=Float32
23-
N = 2^9
24-
h = TY(2*π/N)
25-
epsn = TY(h * .5)
26-
C = TY(2/epsn)
27-
tau = TY(epsn * h)
28-
Tfinal = 50.
29-
30-
S(x,y) = exp(-x^2/0.1f0)*exp(-y^2/0.1f0)
31-
32-
# real-space and reciprocal-space grids
33-
# the real-space grid is just used for plotting!
34-
X_cpu = convert.(TY,collect(linspace(-pi+h, pi, N)) .* ones(1,N))
35-
X = CLArray(X_cpu);
36-
k = collect([0:N/2; -N/2+1:-1]);
37-
 = CLArray(convert.(TY,kron(k.^2, ones(1,N)) + kron(ones(N), k'.^2)));
38-
39-
# initial condition
40-
uc = TY(2.0)*(CLArray{TY}(rand(TY, (N, N)))-TY(0.5));
41-
42-
#################################################################
43-
#################################################################
44-
function take_step!(u, t_plot)
45-
uff = fft(u)
46-
uff1 = fft(u.^3f0-u)
47-
@. tmp1 = ((1f0+C*tau*Â) .* uff .- tau/epsn *.* uff1)) ./ (1f0+(epsn*tau)*Â.^2f0+C*tau*Â)
48-
u .= real.(ifft(tmp1))
49-
nothing
50-
end
51-
function normalise_af!(u,out)
52-
out .= u-minimum(u)
53-
out .= out / maximum(out)
54-
nothing
55-
end
56-
#################################################################
57-
#################################################################
58-
59-
T_plot = 0.01; t_plot = 0.0
60-
61-
62-
up = copy(uc)
63-
@time for n = 1:ceil(Tfinal / tau)
64-
@show n
65-
take_step!(uc, t_plot)
66-
t_plot += tau
67-
# f t_plot >= T_plot
68-
# # @show n
69-
# normalise_af!(uc,up)
70-
# draw_image(window_, up, Ref(ArrayFire.af_cell(0, 0, pointer(""), ArrayFire.AF_COLORMAP_HEAT)))
71-
# set_title(window_,"N = $N, n = $n, t = $(round(n*tau,4)), max = $(maximum(uc)) - min = $(minimum(uc))")
72-
# # set_axes_limits_3d(window_,-3.2f0,3.2f0,-3.2f0,-3.2f0,-2.3f0,2.0f0,true,Ref(ArrayFire.af_cell(0, 0, pointer(""), ArrayFire.AF_COLORMAP_HEAT)))
73-
# show(window_)
74-
# t_plot = 0.0
75-
# end
76-
end
13+
using GPUArrays.TestSuite, Base.Test
7714

78-
print_mem_info("GPU-Mem apres loop", 0)
15+
TestSuite.run_tests(CLArray)

0 commit comments

Comments
 (0)