@@ -65,6 +65,9 @@ This allows for two different configurations:
65
65
66
66
!!! warn
67
67
This is an experimental feature.
68
+
69
+ !!! note
70
+ `cpu={true, false}` is deprecated for KernelAbstractions 1.0
68
71
"""
69
72
macro kernel (ex... )
70
73
if length (ex) == 1
@@ -248,6 +251,9 @@ For storage that only persists between `@synchronize` statements, an `MArray` ca
248
251
instead.
249
252
250
253
See also [`@uniform`](@ref).
254
+
255
+ !!! note
256
+ `@private` is deprecated for KernelAbstractions 1.0
251
257
"""
252
258
macro private (T, dims)
253
259
if dims isa Integer
263
269
264
270
Creates a private local of `mem` per item in the workgroup. This can be safely used
265
271
across [`@synchronize`](@ref) statements.
272
+
273
+ !!! note
274
+ `@private` is deprecated for KernelAbstractions 1.0
266
275
"""
267
276
macro private (expr)
268
277
return esc (expr)
273
282
274
283
`expr` is evaluated outside the workitem scope. This is useful for variable declarations
275
284
that span workitems, or are reused across `@synchronize` statements.
285
+
286
+ !!! note
287
+ `@uniform` is deprecated for KernelAbstractions 1.0
276
288
"""
277
289
macro uniform (value)
278
290
return esc (value)
@@ -324,6 +336,8 @@ Access the hidden context object used by KernelAbstractions.
324
336
!!! warn
325
337
Only valid to be used from a kernel with `cpu=false`.
326
338
339
+ !!! note
340
+ `@context` will be supported on all backends in KernelAbstractions 1.0
327
341
```
328
342
function f(@context, a)
329
343
I = @index(Global, Linear)
@@ -472,6 +486,9 @@ Abstract type for all GPU based KernelAbstractions backends.
472
486
473
487
!!! note
474
488
New backend implementations **must** sub-type this abstract type.
489
+
490
+ !!! note
491
+ `GPU` will be removed in KernelAbstractions v1.0
475
492
"""
476
493
abstract type GPU <: Backend end
477
494
@@ -483,6 +500,9 @@ Instantiate a CPU (multi-threaded) backend.
483
500
## Options:
484
501
- `static`: Uses a static thread assignment, this can be beneficial for NUMA aware code.
485
502
Defaults to false.
503
+
504
+ !!! note
505
+ `CPU` will be aliased to `POCLBackend()` on KernelAbstractions v1.0
486
506
"""
487
507
struct CPU <: Backend
488
508
static:: Bool
493
513
isgpu(::Backend)::Bool
494
514
495
515
Returns true for all [`GPU`](@ref) backends.
516
+
517
+ !!! note
518
+ `isgpu` will be removed in KernelAbstractions v1.0
496
519
"""
497
520
isgpu (:: GPU ) = true
498
521
isgpu (:: CPU ) = false
@@ -512,8 +535,6 @@ function get_backend end
512
535
# Should cover SubArray, ReshapedArray, ReinterpretArray, Hermitian, AbstractTriangular, etc.:
513
536
get_backend (A:: AbstractArray ) = get_backend (parent (A))
514
537
515
- get_backend (:: Array ) = CPU ()
516
-
517
538
# Define:
518
539
# adapt_storage(::Backend, a::Array) = adapt(BackendArray, a)
519
540
# adapt_storage(::Backend, a::BackendArray) = a
0 commit comments