Skip to content

Commit fce9046

Browse files
committed
Reduce imports.
1 parent bc0095e commit fce9046

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

src/GPUArrays.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
module GPUArrays
22

3+
export GPUArray, gpu_call, thread_blocks_heuristic, global_size, synchronize_threads
4+
export linear_index, @linearidx, @cartesianidx, convolution!, device, synchronize
5+
export JLArray
6+
37
using Serialization
48
using Random
59
using LinearAlgebra
@@ -34,8 +38,4 @@ include("array.jl")
3438

3539
include("testsuite.jl")
3640

37-
export GPUArray, gpu_call, thread_blocks_heuristic, global_size, synchronize_threads
38-
export linear_index, @linearidx, @cartesianidx, convolution!, device, synchronize
39-
export JLArray
40-
4141
end # module

src/testsuite.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
module TestSuite
44

5+
export supported_eltypes
6+
57
using GPUArrays
6-
using GPUArrays: mapidx, gpu_sub2ind
78

89
using LinearAlgebra
910
using Random
@@ -24,6 +25,9 @@ function compare(f, Typ, xs...)
2425
cpu_out Array(gpu_out)
2526
end
2627

28+
function supported_eltypes()
29+
(Float32, Float64, Int32, Int64, ComplexF32, ComplexF64)
30+
end
2731

2832
include("testsuite/construction.jl")
2933
include("testsuite/gpuinterface.jl")

src/testsuite/base.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function cartesian_iter(state, A, res, Asize)
22
for i in CartesianIndices(Asize)
3-
idx = gpu_sub2ind(Asize, i.I)
3+
idx = GPUArrays.gpu_sub2ind(Asize, i.I)
44
res[idx] = A[idx]
55
end
66
return
@@ -34,7 +34,7 @@ function test_base(Typ)
3434
A = Typ(a)
3535
B = Typ(b)
3636
off = 1
37-
mapidx(A, (B, off, length(A))) do i, a, b, off, len
37+
GPUArrays.mapidx(A, (B, off, length(A))) do i, a, b, off, len
3838
x = b[i]
3939
x2 = b[min(i+off, len)]
4040
a[i] = x * x2

0 commit comments

Comments
 (0)