Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
Adapt = "2.0, 3.0"
GPUArraysCore = "= 0.1.1"
GPUArraysCore = "= 0.1.2"
LLVM = "3.9, 4"
Reexport = "1"
julia = "1.6"
2 changes: 1 addition & 1 deletion lib/GPUArraysCore/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "GPUArraysCore"
uuid = "46192b85-c4d5-4398-a991-12ede77f4527"
authors = ["Tim Besard <[email protected]>"]
version = "0.1.1"
version = "0.1.2"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
8 changes: 8 additions & 0 deletions lib/GPUArraysCore/src/GPUArraysCore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,13 @@ macro allowscalar(ex)
end
end

"""
backend(T::Type)
backend(x)

Gets the GPUArrays back-end responsible for managing arrays of type `T`.
"""
backend(::Type) = error("This object is not a GPU array") # COV_EXCL_LINE
backend(x) = backend(typeof(x))

end # module GPUArraysCore
9 changes: 1 addition & 8 deletions src/device/execution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,7 @@ abstract type AbstractGPUBackend end

abstract type AbstractKernelContext end

"""
backend(T::Type)
backend(x)

Gets the GPUArrays back-end responsible for managing arrays of type `T`.
"""
backend(::Type) = error("This object is not a GPU array") # COV_EXCL_LINE
backend(x) = backend(typeof(x))
import GPUArraysCore: backend

"""
gpu_call(kernel::Function, arg0, args...; kwargs...)
Expand Down