Skip to content

Commit dc47220

Browse files
authored
Merge pull request #35 from arhik/main
Documentation deployment experiment
2 parents 6c80635 + ffe222d commit dc47220

File tree

4 files changed

+20
-9
lines changed

4 files changed

+20
-9
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# WGPUCompute
22

3-
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://arhik.github.io/WGPUCompute.jl/stable/)
4-
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://arhik.github.io/WGPUCompute.jl/dev/)
5-
[![Build Status](https://github.com/arhik/WGPUCompute.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/arhik/WGPUCompute.jl/actions/workflows/CI.yml?query=branch%3Amain)
6-
[![Coverage](https://codecov.io/gh/arhik/WGPUCompute.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/arhik/WGPUCompute.jl)
3+
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaWGPU.github.io/WGPUCompute.jl/stable/)
4+
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaWGPU.github.io/WGPUCompute.jl/dev/)
5+
[![Build Status](https://github.com/JuliaWGPU/WGPUCompute.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/JuliaWGPU/WGPUCompute.jl/actions/workflows/CI.yml?query=branch%3Amain)
6+
[![Coverage](https://codecov.io/gh/JuliaWGPU/WGPUCompute.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/JuliaWGPU/WGPUCompute.jl)
77

88
:warning: This repo is under heavy development.
99

docs/make.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ DocMeta.setdocmeta!(WGPUCompute, :DocTestSetup, :(using WGPUCompute); recursive=
66
makedocs(;
77
modules=[WGPUCompute],
88
authors="arhik <[email protected]>",
9-
repo="https://github.com/arhik/WGPUCompute.jl/blob/{commit}{path}#{line}",
9+
repo="https://github.com/JuliaWGPU/WGPUCompute.jl/blob/{commit}{path}#{line}",
1010
sitename="WGPUCompute.jl",
1111
format=Documenter.HTML(;
1212
prettyurls=get(ENV, "CI", "false") == "true",
13-
canonical="https://arhik.github.io/WGPUCompute.jl",
13+
canonical="https://JuliaWGPU.github.io/WGPUCompute.jl",
1414
edit_link="main",
1515
assets=String[],
1616
),
@@ -20,6 +20,6 @@ makedocs(;
2020
)
2121

2222
deploydocs(;
23-
repo="github.com/arhik/WGPUCompute.jl",
23+
repo="github.com/JuliaWGPU/WGPUCompute.jl",
2424
devbranch="main",
2525
)

docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CurrentModule = WGPUCompute
44

55
# WGPUCompute
66

7-
Documentation for [WGPUCompute](https://github.com/arhik/WGPUCompute.jl).
7+
Documentation for [WGPUCompute](https://github.com/JuliaWGPU/WGPUCompute.jl).
88

99
```@index
1010
```

src/ops/cast.jl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
export cast_kernel, cast
22

3+
"""
4+
cast_kernel(x::WgpuArray{T, N}, out::WgpuArray{S, N}) where {T, S, N}
5+
This is a compute kernel which casts the `x` array of eltype `T` to eltype `S`.
6+
Users are not supposed to use this function call from julia. This instead needs to
7+
be wrapped with an additional function which uses `@wgpukernel` macro call to
8+
convert the julia function definition to a equivalent `WGPU` kernel function.
9+
"""
310
function cast_kernel(x::WgpuArray{T, N}, out::WgpuArray{S, N}) where {T, S, N}
411
xdim = workgroupDims.x
512
ydim = workgroupDims.y
@@ -9,9 +16,13 @@ function cast_kernel(x::WgpuArray{T, N}, out::WgpuArray{S, N}) where {T, S, N}
916
out[gId] = S(ceil(x[gId]))
1017
end
1118

19+
"""
20+
cast(S::DataType, x::WgpuArray{T, N}) where {T, N}
21+
This is a wrapper function for `cast_kernel` kernel function. This is meant
22+
for users to `cast` from regular julia functions.
23+
"""
1224
function cast(S::DataType, x::WgpuArray{T, N}) where {T, N}
1325
y = WgpuArray{S}(undef, size(x))
1426
@wgpukernel launch=true workgroupSizes=(4, 4) workgroupCount=(2, 2) shmem=() cast_kernel(x, y)
1527
return y
1628
end
17-

0 commit comments

Comments
 (0)