|
1 | 1 | using LinearAlgebra
|
2 | 2 | import Base: -
|
3 | 3 |
|
4 |
| -""" |
| 4 | +_batched_doc = """ |
| 5 | + batched_transpose(A::AbstractArray{T,3}) |
| 6 | + batched_adjoint(A) |
| 7 | +
|
| 8 | +Equivalent to applying `transpose` or `adjoint` to each matrix `A[:,:,k]`. |
| 9 | +
|
| 10 | +These exist to control how `batched_mul` behaves, |
| 11 | +as it operated on such matrix slices of an array with `ndims(A)==3`. |
| 12 | +
|
5 | 13 | BatchedTranspose{T, N, S} <: AbstractBatchedMatrix{T, N}
|
6 |
| -Batched transpose. Transpose a batch of matrix. |
| 14 | + BatchedAdjoint{T, N, S} |
| 15 | +
|
| 16 | +Lazy wrappers analogous to `Transpose` and `Adjoint`, returned by `batched_transpose` |
7 | 17 | """
|
| 18 | + |
| 19 | +@doc _batched_doc |
8 | 20 | struct BatchedTranspose{T, S} <: AbstractArray{T, 3}
|
9 | 21 | parent::S
|
10 | 22 | BatchedTranspose{T, S}(X::S) where {T, S} = new{T, S}(X)
|
11 | 23 | end
|
12 | 24 |
|
13 |
| -""" |
14 |
| - batched_transpose(A) |
15 |
| -Lazy batched transpose. |
16 |
| -""" |
| 25 | +@doc _batched_doc |
17 | 26 | batched_transpose(A::AbstractArray{T}) where T = BatchedTranspose(A)
|
18 | 27 | batched_transpose(A::BatchedTranspose) = A.parent
|
19 | 28 |
|
20 |
| -""" |
21 |
| - BatchedAdjoint{T, N, S} <: AbstractBatchedMatrix{T, N} |
22 |
| -Batched ajoint. Transpose a batch of matrix. |
23 |
| -""" |
| 29 | +@doc _batched_doc |
24 | 30 | struct BatchedAdjoint{T, S} <: AbstractArray{T, 3}
|
25 | 31 | parent::S
|
26 | 32 | BatchedAdjoint{T, S}(X::S) where {T, S} = new{T, S}(X)
|
27 | 33 | end
|
28 | 34 |
|
29 |
| -""" |
30 |
| - batched_adjoint(A) |
31 |
| -Lazy batched adjoint. |
32 |
| -""" |
| 35 | +@doc _batched_doc |
33 | 36 | batched_adjoint(A::AbstractArray{T, 3}) where T = BatchedAdjoint(A)
|
34 | 37 | batched_adjoint(A::BatchedAdjoint) = A.parent
|
35 | 38 |
|
|
0 commit comments