Skip to content

Commit ccdbd67

Browse files
committed
remove Compat
1 parent b859c1d commit ccdbd67

File tree

6 files changed

+17
-19
lines changed

6 files changed

+17
-19
lines changed

src/GPUArrays.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
__precompile__(true)
22
module GPUArrays
3-
using IterTools
4-
using Compat, Sugar
53

6-
@compat abstract type Context end
4+
using IterTools, Sugar
5+
6+
abstract type Context end
77

88
include("abstractarray.jl")
99
export GPUArray, mapidx, linear_index, gpu_call

src/abstractarray.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
@compat abstract type AbstractAccArray{T, N} <: DenseArray{T, N} end
1+
abstract type AbstractAccArray{T, N} <: DenseArray{T, N} end
22
# Sampler type that acts like a texture/image and allows interpolated access
3-
@compat abstract type AbstractSampler{T, N} <: AbstractAccArray{T, N} end
3+
abstract type AbstractSampler{T, N} <: AbstractAccArray{T, N} end
44

5-
@compat const AccVector{T} = AbstractAccArray{T, 1}
6-
@compat const AccMatrix{T} = AbstractAccArray{T, 2}
7-
@compat const AccVecOrMat{T} = Union{AbstractAccArray{T, 1}, AbstractAccArray{T, 2}}
5+
const AccVector{T} = AbstractAccArray{T, 1}
6+
const AccMatrix{T} = AbstractAccArray{T, 2}
7+
const AccVecOrMat{T} = Union{AbstractAccArray{T, 1}, AbstractAccArray{T, 2}}
88

99

1010

src/backends/cudanative/cudanative.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module CUBackend
22

3-
using ..GPUArrays, CUDAnative, StaticArrays, Compat
3+
using ..GPUArrays, CUDAnative, StaticArrays
44

55
import CUDAdrv, CUDArt #, CUFFT
66

@@ -31,7 +31,7 @@ function any_context()
3131
CUContext(ctx, dev)
3232
end
3333

34-
#@compat const GLArrayImg{T, N} = GPUArray{T, N, gl.Texture{T, N}, GLContext}
34+
#const GLArrayImg{T, N} = GPUArray{T, N, gl.Texture{T, N}, GLContext}
3535
const CUArray{T, N, B} = GPUArray{T, N, B, CUContext} #, GLArrayImg{T, N}}
3636
const CUArrayBuff{T, N} = CUArray{T, N, CUDAdrv.CuArray{T, N}}
3737

src/backends/julia/julia.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module JLBackend
22

33
using ..GPUArrays
4-
using Compat
54
using StaticArrays, Interpolations
65

76
import GPUArrays: buffer, create_buffer, Context, context, mapidx, unpack_buffer
@@ -32,7 +31,7 @@ immutable Sampler{T, N, Buffer} <: AbstractSampler{T, N}
3231
buffer::Buffer
3332
size::SVector{N, Float32}
3433
end
35-
@compat Base.IndexStyle{T, N}(::Type{Sampler{T, N}}) = IndexLinear()
34+
Base.IndexStyle{T, N}(::Type{Sampler{T, N}}) = IndexLinear()
3635
(AT::Type{Array}){T, N, B}(s::Sampler{T, N, B}) = parent(parent(buffer(s)))
3736

3837
function Sampler{T, N}(A::Array{T, N}, interpolation = Linear(), edge = Flat())
@@ -53,7 +52,7 @@ Base.@propagate_inbounds function Base.setindex!(A::Sampler, val, indexes...)
5352
Array(A)[indexes...] = val
5453
end
5554

56-
@compat const JLArray{T, N} = GPUArray{T, N, Array{T, N}, JLContext}
55+
const JLArray{T, N} = GPUArray{T, N, Array{T, N}, JLContext}
5756

5857
default_buffer_type{T, N}(::Type, ::Type{Tuple{T, N}}, ::JLContext) = Array{T, N}
5958

@@ -96,7 +95,7 @@ nthreads{T, N}(a::JLArray{T, N}) = context(a).nthreads
9695

9796
Base.@propagate_inbounds Base.getindex{T, N}(A::JLArray{T, N}, i::Integer) = A.buffer[i]
9897
Base.@propagate_inbounds Base.setindex!{T, N}(A::JLArray{T, N}, val, i::Integer) = (A.buffer[i] = val)
99-
@compat Base.IndexStyle{T, N}(::Type{JLArray{T, N}}) = IndexLinear()
98+
Base.IndexStyle{T, N}(::Type{JLArray{T, N}}) = IndexLinear()
10099

101100
function Base.show(io::IO, ctx::JLContext)
102101
cpu = Sys.cpu_info()

src/backends/opencl/opencl.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
module CLBackend
22

3-
using Compat
43
using ..GPUArrays
54
using OpenCL
65
using OpenCL: cl

src/backends/opengl/opengl.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import GPUArrays: buffer, create_buffer, acc_broadcast!, synchronize, free
66
import GPUArrays: Context, GPUArray, context, broadcast_index, default_buffer_type
77

88
import GLAbstraction, GLWindow, GLFW
9-
using ModernGL, Compat, StaticArrays
9+
using ModernGL, StaticArrays
1010
using Transpiler, Sugar
1111
import Transpiler: gli, GLMethod, to_gl_types, glsl_gensym, GLIO
1212
import Base: copy!, convert
@@ -23,9 +23,9 @@ end
2323
GLContext(window) = GLContext(window, Dict{Any, Any}())
2424
Base.show(io::IO, ctx::GLContext) = print(io, "GLContext")
2525

26-
@compat const GLBuffer{T, N} = GPUArray{T, N, gl.GLBuffer{T}, GLContext}
27-
@compat const GLSampler{T, N} = GPUArray{T, N, gl.Texture{T, N}, GLContext}
28-
@compat const GLArray{T, N, Buffer} = GPUArray{T, N, Buffer, GLContext}
26+
const GLBuffer{T, N} = GPUArray{T, N, gl.GLBuffer{T}, GLContext}
27+
const GLSampler{T, N} = GPUArray{T, N, gl.Texture{T, N}, GLContext}
28+
const GLArray{T, N, Buffer} = GPUArray{T, N, Buffer, GLContext}
2929

3030

3131

0 commit comments

Comments
 (0)