Skip to content

Commit 6ba503f

Browse files
committed
fix warnings in documentation build
1 parent e28a586 commit 6ba503f

File tree

8 files changed

+44
-24
lines changed

8 files changed

+44
-24
lines changed

docs/make.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@ makedocs(
77
prettyurls = get(ENV, "CI", nothing) == "true"
88
),
99
pages = [
10-
"Home" => "index.md",
10+
"Home" => "index.md",
1111
"Writing kernels" => "kernels.md",
12-
"Examples" => [
12+
"Examples" => [
1313
"examples/memcopy.md"
1414
],
1515
"API" => "api.md",
16+
"Extras" => [
17+
"extras/unrolling.md"
18+
]
1619
],
1720
doctest = true
1821
)

docs/src/api.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,11 @@
1111
@synchronize
1212
```
1313

14-
## Host interface
14+
## Host interface
15+
16+
## Internal
17+
18+
```@docs
19+
KernelAbstractions.Kernel
20+
KernelAbstractions.partition
21+
```

docs/src/examples/memcopy.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
The first example simple copies memory from `A` to `B`
1+
# Memcopy
22

3+
The first example simple copies memory from `A` to `B`
34

45
````@eval
56
using Markdown
7+
using KernelAbstractions
8+
path = joinpath(dirname(pathof(KernelAbstractions)), "..", "examples/memcopy.jl")
69
Markdown.parse("""
710
```julia
8-
$(read("../../examples/memcopy.jl", String))
11+
$(read(path, String))
912
```
1013
""")
11-
````
14+
````

docs/src/extras/unrolling.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Unroll macro
2+
3+
```@meta
4+
CurrentModule = KernelAbstractions.Extras
5+
```
6+
7+
```@docs
8+
@unroll
9+
```

docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ all(A .== 2.0)
4747
!!! danger
4848
All kernel launches are asynchronous, each kernel produces an event token that
4949
has to be waited upon, before reading or writing memory that was passed as an
50-
argument to the kernel. See [dependencies](@id dependencies) for a full
50+
argument to the kernel. See [dependencies](@ref dependencies) for a full
5151
explanation.
5252

5353
## Important difference to Julia

docs/src/kernels.md

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,18 @@
33
These kernel language constructs are intended to be used as part
44
of [`@kernel`](@ref) functions and not outside that context.
55

6-
```@docs
7-
@kernel
8-
```
9-
106
## Constant arguments
117

12-
```@docs
13-
@const
14-
```
8+
[`@Const`](@ref)
159

1610
## Indexing
1711

18-
```@docs
19-
@index
20-
```
21-
12+
There are several [`@index`](@ref) variants.
2213

2314
## Local memory, variable lifetime and private memory
2415

25-
```@docs
26-
@localmem
27-
@synchronize
28-
@private
29-
```
16+
[`@localmem`](@ref), [`@synchronize`](@ref), [`@private`](@ref)
17+
18+
# Launching kernels
19+
20+
## [Kernel dependencies](@id dependencies)

src/KernelAbstractions.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module KernelAbstractions
22

33
export @kernel
4-
export @Const, @local, @private, @synchronize, @index
4+
export @Const, @localmem, @private, @synchronize, @index
55
export Device, GPU, CPU, CUDA
66

77
using StaticArrays
@@ -13,6 +13,11 @@ using Requires
1313
"""
1414
macro kernel end
1515

16+
"""
17+
@Const(A)
18+
"""
19+
macro Const end
20+
1621
abstract type Event end
1722
import Base.wait
1823

src/extras/extras.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module Extras
22

33
include("loopinfo.jl")
4+
using .LoopInfo
5+
export @unroll
46

57
end # module

0 commit comments

Comments
 (0)