mirror of
https://igit.ific.uv.es/alramos/latticegpu.jl.git
synced 2025-05-14 19:23:42 +02:00
Added some documentation
This commit is contained in:
parent
bfc5b4b508
commit
cfffb3ca20
3 changed files with 27 additions and 4 deletions
|
@ -14,11 +14,33 @@ module Fields
|
|||
using CUDA
|
||||
using ..Space
|
||||
|
||||
"""
|
||||
vector_field(::Type{T}, lp::SpaceParm)
|
||||
|
||||
Returns a vector field of elemental type `T`.
|
||||
"""
|
||||
vector_field(::Type{T}, lp::SpaceParm) where {T} = CuArray{T, 3}(undef, lp.bsz, lp.ndim, lp.rsz)
|
||||
|
||||
"""
|
||||
scalar_field(::Type{T}, lp::SpaceParm)
|
||||
|
||||
Returns a scalar field of elemental type `T`.
|
||||
"""
|
||||
scalar_field(::Type{T}, lp::SpaceParm) where {T} = CuArray{T, 2}(undef, lp.bsz, lp.rsz)
|
||||
|
||||
"""
|
||||
nscalar_field(::Type{T}, n::Integer, lp::SpaceParm)
|
||||
|
||||
Returns `n` scalar fields of elemental type `T`
|
||||
"""
|
||||
nscalar_field(::Type{T}, n, lp::SpaceParm) where {T} = CuArray{T, 3}(undef, lp.bsz, n, lp.rsz)
|
||||
|
||||
|
||||
"""
|
||||
scalar_field(::Type{T}, lp::SpaceParm)
|
||||
|
||||
Returns a scalar field of elemental type `T`, with lexicografic memory layout.
|
||||
"""
|
||||
scalar_field_point(::Type{T}, lp::SpaceParm{N,M,D}) where {T,N,M,D} = CuArray{T, N}(undef, lp.iL...)
|
||||
|
||||
export vector_field, scalar_field, nscalar_field, scalar_field_point
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue