diff --git a/Project.toml b/Project.toml index 47a5f9ef..4f061e10 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "KernelAbstractions" uuid = "63c18a36-062a-441e-b654-da1e3ab1ce7c" authors = ["Valentin Churavy and contributors"] -version = "0.9.9" +version = "0.10.0" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" diff --git a/src/KernelAbstractions.jl b/src/KernelAbstractions.jl index dbae4da3..026fb2bc 100644 --- a/src/KernelAbstractions.jl +++ b/src/KernelAbstractions.jl @@ -372,6 +372,13 @@ macro index(locale, args...) Expr(:call, GlobalRef(KernelAbstractions, index_function), esc(:__ctx__), map(esc, args)...) end +""" + isongpu() + +Returns if this kernel is currently executing on a GPU. +""" +function isongpu end + ### # Internal kernel functions ### diff --git a/src/cpu.jl b/src/cpu.jl index 8c3e8afd..7ccc4cd5 100644 --- a/src/cpu.jl +++ b/src/cpu.jl @@ -158,6 +158,8 @@ end end end +isongpu() = false + ### # CPU implementation of shared memory ###