Skip to content

Commit

Permalink
Add CPUProcesses (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfairbanks authored and timholy committed Sep 7, 2017
1 parent bbfd45f commit 99bfd1e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/ComputationalResources.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,27 @@ end
CPUThreads() = CPUThreads(nothing)
CPUThreads(r::AbstractResource) = CPUThreads(r.settings)

"""
CPUProcesses()
CPUProcesses(settings)
Indicate that a computation should be performed using the CPU in multi-process mode.
Processes should be added with addprocs() or julia started with `julia -p N`.
Processes must communicate using distributed memory operations such as remote refrences.
Optionally pass in an object specifying algorithmic settings.
# Examples:
```julia
filter(CPUProcesses(), image, kernel)
filter(CPUProcesses(TileSize(64,8)), image, kernel)
```
"""
immutable CPUProcesses{T} <: AbstractCPU{T}
settings::T
end
CPUProcesses() = CPUProcesses(nothing)
CPUProcesses(r::AbstractResource) = CPUProcesses(r.settings)

"""
ArrayFireLibs()
ArrayFireLibs(settings)
Expand Down

0 comments on commit 99bfd1e

Please sign in to comment.