Skip to content

Commit

Permalink
Merge pull request #11 from timholy/fbot/deps
Browse files Browse the repository at this point in the history
Fix deprecations
  • Loading branch information
timholy authored Sep 22, 2017
2 parents 19e299e + 06e76d5 commit ece06ed
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/ComputationalResources.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ filter(CPU1(), image, kernel)
filter(CPU1(TileSize(64,8)), image, kernel)
```
"""
immutable CPU1{T} <: AbstractCPU{T}
struct CPU1{T} <: AbstractCPU{T}
settings::T
end
CPU1() = CPU1(nothing)
Expand All @@ -67,7 +67,7 @@ filter(CPUThreads(), image, kernel)
filter(CPUThreads(TileSize(64,8)), image, kernel)
```
"""
immutable CPUThreads{T} <: AbstractCPU{T}
struct CPUThreads{T} <: AbstractCPU{T}
settings::T
end
CPUThreads() = CPUThreads(nothing)
Expand All @@ -88,7 +88,7 @@ filter(CPUProcesses(), image, kernel)
filter(CPUProcesses(TileSize(64,8)), image, kernel)
```
"""
immutable CPUProcesses{T} <: AbstractCPU{T}
struct CPUProcesses{T} <: AbstractCPU{T}
settings::T
end
CPUProcesses() = CPUProcesses(nothing)
Expand All @@ -107,7 +107,7 @@ filter(ArrayFireLibs(), image, kernel)
filter(ArrayFireLibs(backend), image, kernel)
```
"""
immutable ArrayFireLibs{T} <: AbstractResource{T}
struct ArrayFireLibs{T} <: AbstractResource{T}
settings::T
end
ArrayFireLibs() = ArrayFireLibs(nothing)
Expand All @@ -126,7 +126,7 @@ filter(CUDALibs(), image, kernel)
filter(CUDALibs(backend), image, kernel)
```
"""
immutable CUDALibs{T} <: AbstractResource{T}
struct CUDALibs{T} <: AbstractResource{T}
settings::T
end
CUDALibs() = CUDALibs(nothing)
Expand All @@ -145,7 +145,7 @@ filter(OpenCLLibs(), image, kernel)
filter(OpenCLLibs(backend), image, kernel)
```
"""
immutable OpenCLLibs{T} <: AbstractResource{T}
struct OpenCLLibs{T} <: AbstractResource{T}
settings::T
end
OpenCLLibs() = OpenCLLibs(nothing)
Expand All @@ -159,7 +159,7 @@ OpenCLLibs(r::AbstractResource) = OpenCLLibs(r.settings)
Request that an array computation be performed using tiles (blocks) of size `dims`.
"""
immutable TileSize{N}
struct TileSize{N}
dims::NTuple{N,Int}
end

Expand All @@ -173,7 +173,7 @@ Add `T` to the list of available resources. For example,
`addresource(OpenCLLibs)` would indicate that you have a GPU and the
OpenCL libraries installed.
"""
addresource{T<:AbstractResource}(::Type{T}) = push!(resources, T)
addresource(::Type{T}) where {T<:AbstractResource} = push!(resources, T)

"""
rmresource(T)
Expand All @@ -182,7 +182,7 @@ Remove `T` from the list of available resources. For example,
`rmresource(OpenCLLibs)` would indicate that any future package loads
should avoid loading their specializations for OpenCL.
"""
rmresource{T<:AbstractResource}(::Type{T}) = delete!(resources, T)
rmresource(::Type{T}) where {T<:AbstractResource} = delete!(resources, T)

"""
haveresource(T)
Expand All @@ -206,7 +206,7 @@ function __init__()
end
```
"""
haveresource{T<:AbstractResource}(::Type{T}) = T resources
haveresource(::Type{T}) where {T<:AbstractResource} = T resources

"""
ComputationalResources makes it possible to dispatch to different methods that employ different computational resources. The exported resources are:
Expand Down

0 comments on commit ece06ed

Please sign in to comment.