Neko 1.99.9
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
tensor3::tensor3_t Type Reference
Collaboration diagram for tensor3::tensor3_t:

Public Member Functions

procedure, pass(t) init (t, n1, n2, n3, name)
 Initialise a tensor of size n1*n2*n3.
 
procedure, pass(t) free (t)
 Deallocate a tensor.
 
procedure, pass(t) size (t)
 Returns the number of entries in the tensor.
 
procedure, pass(t) copy_from (t, memdir, sync)
 Copy between host and device.
 
procedure, pass(t) get_n1 (t)
 Returns the size of the first dimension.
 
procedure, pass(t) get_n2 (t)
 Returns the size of the second dimension.
 
procedure, pass(t) get_n3 (t)
 Returns the size of the third dimension.
 
procedure, pass(t) tensor3_assign_tensor3 (t, w)
 Assignment \( t = w \).
 
procedure, pass(t) tensor3_assign_scalar (t, s)
 Assignment \( t = s \).
 
generic assignment (t, w)
 Assignment \( t = w \).
 
generic assignment (t, s)
 Assignment \( t = s \).
 

Public Attributes

real(kind=rp), dimension(:,:,:), allocatable x
 Tensor entries.
 
character(len=neko_varname_len) name = ""
 Name of the tensor.
 
type(c_ptr) x_d = C_NULL_PTR
 Device pointer.
 

Private Member Functions

procedure, pass, private alloc (t, n1, n2, n3)
 Allocate a tensor of size n1*n2*n3.
 

Private Attributes

integer, private n1 = 0
 Size of the first dimension.
 
integer, private n2 = 0
 Size of the second dimension.
 
integer, private n3 = 0
 Size of the third dimension.
 
integer, private n = 0
 Total size n1*n2*n3.
 

Detailed Description

Definition at line 45 of file tensor3.f90.

Member Function/Subroutine Documentation

◆ alloc()

procedure, pass, private tensor3::tensor3_t::alloc ( class(tensor3_t), intent(inout t,
integer, intent(in n1,
integer, intent(in n2,
integer, intent(in n3 
)
private
Parameters
tTensor to allocate.
n1Size of the first dimension.
n2Size of the second dimension.
n3Size of the third dimension.

Definition at line 77 of file tensor3.f90.

◆ assignment() [1/2]

generic tensor3::tensor3_t::assignment ( class(tensor3_t), intent(inout t,
real(kind=rp), intent(in s 
)
Parameters
tTensor to assign to.
sScalar to fill the tensor with.

Definition at line 73 of file tensor3.f90.

◆ assignment() [2/2]

generic tensor3::tensor3_t::assignment ( class(tensor3_t), intent(inout t,
type(tensor3_t), intent(in w 
)
Parameters
tTensor to assign to.
wTensor to assign from.

Definition at line 73 of file tensor3.f90.

Here is the call graph for this function:

◆ copy_from()

procedure, pass(t) tensor3::tensor3_t::copy_from ( class(tensor3_t), intent(inout t,
integer, intent(in memdir,
logical, intent(in sync 
)
Parameters
tTensor to copy to/from device/host.
memdirDirection to copy (HOST_TO_DEVICE or DEVICE_TO_HOST).
syncWhether the memcopy is to be blocking or not.

Definition at line 61 of file tensor3.f90.

◆ free()

procedure, pass(t) tensor3::tensor3_t::free ( class(tensor3_t), intent(inout t)
Parameters
tTensor to deallocate.

Definition at line 57 of file tensor3.f90.

◆ get_n1()

procedure, pass(t) tensor3::tensor3_t::get_n1 ( class(tensor3_t), intent(in t)
Parameters
tTensor to query.

Definition at line 63 of file tensor3.f90.

◆ get_n2()

procedure, pass(t) tensor3::tensor3_t::get_n2 ( class(tensor3_t), intent(in t)
Parameters
tTensor to query.

Definition at line 65 of file tensor3.f90.

◆ get_n3()

procedure, pass(t) tensor3::tensor3_t::get_n3 ( class(tensor3_t), intent(in t)
Parameters
tTensor to query.

Definition at line 67 of file tensor3.f90.

◆ init()

procedure, pass(t) tensor3::tensor3_t::init ( class(tensor3_t), intent(inout t,
integer, intent(in n1,
integer, intent(in n2,
integer, intent(in n3,
character(len=*), intent(in), optional  name 
)
Parameters
tTensor to initialise.
n1Size of the first dimension.
n2Size of the second dimension.
n3Size of the third dimension.
nameOptional name of the tensor.

Definition at line 55 of file tensor3.f90.

◆ size()

procedure, pass(t) tensor3::tensor3_t::size ( class(tensor3_t), intent(in t)
Parameters
tTensor to query.

Definition at line 59 of file tensor3.f90.

◆ tensor3_assign_scalar()

procedure, pass(t) tensor3::tensor3_t::tensor3_assign_scalar ( class(tensor3_t), intent(inout t,
real(kind=rp), intent(in s 
)
Parameters
tTensor to assign to.
sScalar to fill the tensor with.

Definition at line 71 of file tensor3.f90.

◆ tensor3_assign_tensor3()

procedure, pass(t) tensor3::tensor3_t::tensor3_assign_tensor3 ( class(tensor3_t), intent(inout t,
type(tensor3_t), intent(in w 
)
Parameters
tTensor to assign to.
wTensor to assign from.

Definition at line 69 of file tensor3.f90.

Member Data Documentation

◆ n

integer, private tensor3::tensor3_t::n = 0
private

Definition at line 52 of file tensor3.f90.

◆ n1

integer, private tensor3::tensor3_t::n1 = 0
private

Definition at line 49 of file tensor3.f90.

◆ n2

integer, private tensor3::tensor3_t::n2 = 0
private

Definition at line 50 of file tensor3.f90.

◆ n3

integer, private tensor3::tensor3_t::n3 = 0
private

Definition at line 51 of file tensor3.f90.

◆ name

character(len=neko_varname_len) tensor3::tensor3_t::name = ""

Definition at line 47 of file tensor3.f90.

◆ x

real(kind=rp), dimension(:,:,:), allocatable tensor3::tensor3_t::x

Definition at line 46 of file tensor3.f90.

◆ x_d

type(c_ptr) tensor3::tensor3_t::x_d = C_NULL_PTR

Definition at line 48 of file tensor3.f90.


The documentation for this type was generated from the following file: