Non-owning view of size() contiguous elements of type T.
The 1-D argument type of the entry points: eigenvalues, singular values, pivots, tau vectors, info arrays and caller-supplied workspace. A Span does not own or free its memory, and copying one copies the pointer. The memory must be USM that the device of the Queue it is used with can access; the entry points check this at the call.
Element access asserts the bounds in a debug build only.
| T | element type |
Definition at line 38 of file sycl-span.hh.
#include <batchlas/util/sycl-span.hh>
| using batchlas::Span< T >::value_type = T |
Element type.
Definition at line 40 of file sycl-span.hh.
| using batchlas::Span< T >::pointer = T* |
Pointer to an element.
Definition at line 41 of file sycl-span.hh.
| using batchlas::Span< T >::size_t = std::size_t |
Size and index type.
Definition at line 42 of file sycl-span.hh.
|
inlineconstexpr |
An empty span (null data, size 0).
Definition at line 44 of file sycl-span.hh.
|
inlineconstexpr |
Views size elements starting at data.
Definition at line 46 of file sycl-span.hh.
|
inlineconstexpr |
Views the range [begin, end).
Definition at line 48 of file sycl-span.hh.
|
inlineconstexprdefault |
Copies the pointer and size; the elements are not copied.
|
inlineconstexprdefault |
Same as the copy constructor.
|
inlineconstexpr |
Views other with its first offset elements dropped.
Definition at line 55 of file sycl-span.hh.
|
inlineconstexpr |
Views other with its first offset elements dropped.
Definition at line 58 of file sycl-span.hh.
|
inlineexplicitconstexpr |
A one-element span over value.
Explicit on purpose: implicitly, a scalar lvalue became a length-1 buffer wherever a Span parameter's element type is not deduced from the argument, so syev(q, A, W[i * n], ...) (the LAPACK idiom minus the &) compiled and overran the caller's array. Write Span(x) when one element is meant.
Definition at line 66 of file sycl-span.hh.
| Event batchlas::Span< T >::set_preferred_location | ( | const Queue & | ctx = Queue() | ) | const |
Prefer residence on the device of ctx.
| Event batchlas::Span< T >::set_access_device | ( | const Queue & | ctx = Queue() | ) | const |
Map for access by the device of ctx.
| Event batchlas::Span< T >::prefetch | ( | const Queue & | ctx = Queue() | ) | const |
Migrate to the device of ctx.
|
inlineconstexpr |
Reinterprets the bytes as elements of type U; the size is size_bytes() / sizeof(U).
Definition at line 81 of file sycl-span.hh.
|
inlineconstexpr |
Elements [offset, size()).
Definition at line 86 of file sycl-span.hh.
|
inlineconstexpr |
Elements [offset, offset + count).
Definition at line 88 of file sycl-span.hh.
|
inlineconstexpr |
Rebinds this span to other's pointer and size; no elements are copied.
Definition at line 90 of file sycl-span.hh.
|
inlineconstexpr |
Same as the copy assignment.
Definition at line 92 of file sycl-span.hh.
| bool batchlas::Span< T >::operator== | ( | const Span< T > | other | ) | const |
Element-wise comparison on the host.
Spans of different sizes compare unequal. Real floating-point elements compare with a relative tolerance of 20 epsilon; every other type, complex included, compares exactly. Two spans over the same pointer are equal without reading the data.
|
inlineconstexpr |
|
inlineconstexpr |
Element index.
Definition at line 104 of file sycl-span.hh.
|
inlineconstexpr |
Pointer to the first element (may be null).
Definition at line 105 of file sycl-span.hh.
|
inlineconstexpr |
Number of elements.
Definition at line 106 of file sycl-span.hh.
|
inlineconstexpr |
True when size() == 0.
Definition at line 107 of file sycl-span.hh.
|
inlineconstexpr |
size() * sizeof(T).
Definition at line 109 of file sycl-span.hh.
|
inlineconstexpr |
Iterator to the first element.
Definition at line 110 of file sycl-span.hh.
|
inlineconstexpr |
Iterator one past the last element.
Definition at line 111 of file sycl-span.hh.
|
inlineconstexpr |
|
inlineconstexpr |