Skip to content

Commit

Permalink
fixup! define basic intrinsics
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Feb 5, 2025
1 parent 33de8ac commit 1298a56
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/KernelAbstractions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ function unsafe_free! end

unsafe_free!(::AbstractArray) = return

include("intrinsics.jl")
import .KernelIntrinsics
export KernelIntrinsics

###
# Kernel language
# - @localmem
Expand Down Expand Up @@ -447,7 +451,10 @@ end
# Internal kernel functions
###

function __index_Local_Linear end
function __index_Local_Linear(ctx)
KernelIntrinsics.get_local_id().x

Check warning on line 455 in src/KernelAbstractions.jl

View check run for this annotation

Codecov / codecov/patch

src/KernelAbstractions.jl#L454-L455

Added lines #L454 - L455 were not covered by tests
end

function __index_Group_Linear end
function __index_Global_Linear end

Expand Down
3 changes: 3 additions & 0 deletions src/intrinsics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ module KernelIntrinsics
get_global_size()::@NamedTuple{x::Int32, y::Int32, z::Int32}
Return the number of global work-items specified.
!!! note
1-based.
"""
function get_global_size end

Expand Down

0 comments on commit 1298a56

Please sign in to comment.