Documentation for module dbcsr_tensor_block

Methods to operate on n-dimensional tensor blocks.

source: dbcsr_tensor_block.F
Loading...

public Types:

block_nd
...
block_nd_c_dp
...
dbcsr_t_iterator_type
...
block_nd_c_sp
...
block_nd_r_dp
...
block_nd_r_sp
...

Generic procedures:

create_block
dbcsr_t_get_block
dbcsr_t_put_block
dbcsr_t_reserve_blocks
reshape_2d_to_nd_block
reshape_nd_to_2d_block

public Subroutines/Functions:

Generalization of dbcsr_iterator_blocks_left for tensors.
iterate over nd blocks of an nd rank tensor, index only (blocks must be retrieved by calling dbcsr_t_get_block on tensor).
Generalization of dbcsr_iterator_start for tensors.
Generalization of dbcsr_iterator_stop for tensors.
SUBROUTINE
destroy_block (block)
Destroy block
FUNCTION
INTEGER PURE
ndims_iterator (iterator)
Number of dimensions.

public Types:

TYPE :: block_nd

...


:: r_dp ...
:: r_sp ...
:: c_dp ...
:: c_sp ...
INTEGER
:: data_type = -1 ...

TYPE :: block_nd_c_dp

...


INTEGER,
DIMENSION(:), ALLOCATABLE :: sizes ...
COMPLEX(real_8),
DIMENSION(:), ALLOCATABLE :: blk ...

TYPE :: block_nd_c_sp

...


INTEGER,
DIMENSION(:), ALLOCATABLE :: sizes ...
COMPLEX(real_4),
DIMENSION(:), ALLOCATABLE :: blk ...

TYPE :: block_nd_r_dp

...


INTEGER,
DIMENSION(:), ALLOCATABLE :: sizes ...
REAL(real_8),
DIMENSION(:), ALLOCATABLE :: blk ...

TYPE :: block_nd_r_sp

...


INTEGER,
DIMENSION(:), ALLOCATABLE :: sizes ...
REAL(real_4),
DIMENSION(:), ALLOCATABLE :: blk ...

TYPE :: dbcsr_t_iterator_type

...


:: iter ...
:: nd_index_blk ...
:: nd_index ...
:: blk_sizes ...
:: blk_offsets ...


Generic procedure create_block

...

TYPE(block_nd),
INTENT(out)
:: block × × × × ×
INTEGER,
INTENT(in)
:: sizes(:) × × × × ×
REAL(real_8),
INTENT(in)
:: array(product(sizes)) ×
REAL(real_4),
INTENT(in)
:: array(product(sizes)) ×
COMPLEX(real_8),
INTENT(in)
:: array(product(sizes)) ×
COMPLEX(real_4),
INTENT(in)
:: array(product(sizes)) ×
INTEGER,
INTENT(in)
:: data_type ×

Generic procedure dbcsr_t_get_block

...

INTENT(inout)
:: tensor × × × × × × × × × × × × × × × × × × × × × × × × ×
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) × × × × × × × × × × × × × × × × × × × × × × × × ×
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) × × × × × × × × × × × ×
REAL(real_8),
INTENT(out)
:: block(sizes(1),sizes(2)) ×
REAL(real_8),
INTENT(out),
ALLOCATABLE
:: block(:,:) ×
REAL(real_8),
INTENT(out)
:: block(sizes(1),sizes(2),sizes(3)) ×
REAL(real_8),
INTENT(out),
ALLOCATABLE
:: block(:,:,:) ×
REAL(real_8),
INTENT(out)
:: block(sizes(1),sizes(2),sizes(3),sizes(4)) ×
REAL(real_8),
INTENT(out),
ALLOCATABLE
:: block(:,:,:,:) ×
REAL(real_4),
INTENT(out)
:: block(sizes(1),sizes(2)) ×
REAL(real_4),
INTENT(out),
ALLOCATABLE
:: block(:,:) ×
REAL(real_4),
INTENT(out)
:: block(sizes(1),sizes(2),sizes(3)) ×
REAL(real_4),
INTENT(out),
ALLOCATABLE
:: block(:,:,:) ×
REAL(real_4),
INTENT(out)
:: block(sizes(1),sizes(2),sizes(3),sizes(4)) ×
REAL(real_4),
INTENT(out),
ALLOCATABLE
:: block(:,:,:,:) ×
COMPLEX(real_8),
INTENT(out)
:: block(sizes(1),sizes(2)) ×
COMPLEX(real_8),
INTENT(out),
ALLOCATABLE
:: block(:,:) ×
COMPLEX(real_8),
INTENT(out)
:: block(sizes(1),sizes(2),sizes(3)) ×
COMPLEX(real_8),
INTENT(out),
ALLOCATABLE
:: block(:,:,:) ×
COMPLEX(real_8),
INTENT(out)
:: block(sizes(1),sizes(2),sizes(3),sizes(4)) ×
COMPLEX(real_8),
INTENT(out),
ALLOCATABLE
:: block(:,:,:,:) ×
COMPLEX(real_4),
INTENT(out)
:: block(sizes(1),sizes(2)) ×
COMPLEX(real_4),
INTENT(out),
ALLOCATABLE
:: block(:,:) ×
COMPLEX(real_4),
INTENT(out)
:: block(sizes(1),sizes(2),sizes(3)) ×
COMPLEX(real_4),
INTENT(out),
ALLOCATABLE
:: block(:,:,:) ×
COMPLEX(real_4),
INTENT(out)
:: block(sizes(1),sizes(2),sizes(3),sizes(4)) ×
COMPLEX(real_4),
INTENT(out),
ALLOCATABLE
:: block(:,:,:,:) ×
TYPE(block_nd),
INTENT(out)
:: block ×

Generic procedure dbcsr_t_put_block

...

INTENT(inout)
:: tensor × × × × × × × × × × × × ×
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) × × × × × × × × × × × × ×
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) × × × × × × × × × × × ×
REAL(real_8),
INTENT(in)
:: block(sizes(1),sizes(2)) ×
REAL(real_8),
INTENT(in)
:: block(sizes(1),sizes(2),sizes(3)) ×
REAL(real_8),
INTENT(in)
:: block(sizes(1),sizes(2),sizes(3),sizes(4)) ×
REAL(real_4),
INTENT(in)
:: block(sizes(1),sizes(2)) ×
REAL(real_4),
INTENT(in)
:: block(sizes(1),sizes(2),sizes(3)) ×
REAL(real_4),
INTENT(in)
:: block(sizes(1),sizes(2),sizes(3),sizes(4)) ×
COMPLEX(real_8),
INTENT(in)
:: block(sizes(1),sizes(2)) ×
COMPLEX(real_8),
INTENT(in)
:: block(sizes(1),sizes(2),sizes(3)) ×
COMPLEX(real_8),
INTENT(in)
:: block(sizes(1),sizes(2),sizes(3),sizes(4)) ×
COMPLEX(real_4),
INTENT(in)
:: block(sizes(1),sizes(2)) ×
COMPLEX(real_4),
INTENT(in)
:: block(sizes(1),sizes(2),sizes(3)) ×
COMPLEX(real_4),
INTENT(in)
:: block(sizes(1),sizes(2),sizes(3),sizes(4)) ×
TYPE(block_nd),
INTENT(in)
:: block ×

Generic procedure dbcsr_t_reserve_blocks

...

INTENT(inout)
:: tensor × × ×
INTEGER,
INTENT(in),
OPTIONAL
:: blk_ind_1(:) ×
INTEGER,
INTENT(in),
OPTIONAL
:: blk_ind_2(:) ×
INTEGER,
INTENT(in),
OPTIONAL
:: blk_ind_3(:) ×
INTEGER,
INTENT(in),
OPTIONAL
:: blk_ind_4(:) ×
TYPE(array_list),
INTENT(in)
:: blk_ind ×
INTEGER,
INTENT(in)
:: blk_ind(:,:) ×
INTENT(in)
:: tensor_in ×
INTENT(inout)
:: tensor_out × ×
TYPE(dbcsr_type),
INTENT(in)
:: matrix_in ×

Generic procedure reshape_2d_to_nd_block

...

INTENT(in)
:: map × × × × × × × × × × × ×
REAL(real_8),
INTENT(in)
:: block_2d(:,:) × × ×
REAL(real_4),
INTENT(in)
:: block_2d(:,:) × × ×
COMPLEX(real_8),
INTENT(in)
:: block_2d(:,:) × × ×
COMPLEX(real_4),
INTENT(in)
:: block_2d(:,:) × × ×
REAL(real_8),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2)) ×
REAL(real_8),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3)) ×
REAL(real_8),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3),map%dims_nd(4)) ×
REAL(real_4),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2)) ×
REAL(real_4),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3)) ×
REAL(real_4),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3),map%dims_nd(4)) ×
COMPLEX(real_8),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2)) ×
COMPLEX(real_8),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3)) ×
COMPLEX(real_8),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3),map%dims_nd(4)) ×
COMPLEX(real_4),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2)) ×
COMPLEX(real_4),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3)) ×
COMPLEX(real_4),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3),map%dims_nd(4)) ×

Generic procedure reshape_nd_to_2d_block

...

INTENT(in)
:: map × × × × × × × × × × × ×
REAL(real_8),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2)) ×
REAL(real_8),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3)) ×
REAL(real_8),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3),map%dims_nd(4)) ×
REAL(real_4),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2)) ×
REAL(real_4),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3)) ×
REAL(real_4),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3),map%dims_nd(4)) ×
COMPLEX(real_8),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2)) ×
COMPLEX(real_8),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3)) ×
COMPLEX(real_8),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3),map%dims_nd(4)) ×
COMPLEX(real_4),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2)) ×
COMPLEX(real_4),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3)) ×
COMPLEX(real_4),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3),map%dims_nd(4)) ×
REAL(real_8),
INTENT(out)
:: block_2d(map%dims_2d(1),map%dims_2d(2)) × × ×
REAL(real_4),
INTENT(out)
:: block_2d(map%dims_2d(1),map%dims_2d(2)) × × ×
COMPLEX(real_8),
INTENT(out)
:: block_2d(map%dims_2d(1),map%dims_2d(2)) × × ×
COMPLEX(real_4),
INTENT(out)
:: block_2d(map%dims_2d(1),map%dims_2d(2)) × × ×

FUNCTIONdbcsr_t_iterator_blocks_left(iterator)

Generalization of dbcsr_iterator_blocks_left for tensors.

Return Value ::
LOGICAL
Arguments:
INTENT(in)
:: iterator ...

SUBROUTINEdbcsr_t_iterator_next_block(iterator, ind_nd, blk, blk_p, blk_size, blk_offset)

iterate over nd blocks of an nd rank tensor, index only (blocks must be retrieved by calling dbcsr_t_get_block on tensor).

Arguments:
INTENT(inout)
:: iterator ...
INTEGER,
INTENT(out)
:: ind_nd(ndims_iterator(iterator)) nd index of block
INTEGER,
INTENT(out)
:: blk is this needed?
INTEGER,
INTENT(out),
OPTIONAL
:: blk_p is this needed?
INTEGER,
INTENT(out),
OPTIONAL
:: blk_size(ndims_iterator(iterator)) blk size in each dimension
INTEGER,
INTENT(out),
OPTIONAL
:: blk_offset(ndims_iterator(iterator)) blk offset in each dimension

SUBROUTINEdbcsr_t_iterator_start(iterator, tensor)

Generalization of dbcsr_iterator_start for tensors.

Arguments:
INTENT(out)
:: iterator ...
INTENT(in)
:: tensor ...

SUBROUTINEdbcsr_t_iterator_stop(iterator)

Generalization of dbcsr_iterator_stop for tensors.

Arguments:
INTENT(inout)
:: iterator ...

SUBROUTINEdestroy_block(block)

Destroy block

Arguments:
TYPE(block_nd),
INTENT(inout)
:: block ...

PURE FUNCTIONndims_iterator(iterator)

Number of dimensions.

Return Value ::
INTEGER
Arguments:
INTENT(in)
:: iterator ...

SUBROUTINEcreate_block_data_r_dp(block, sizes, array)

Create block from array, array can be n-dimensional.

Arguments:
TYPE(block_nd),
INTENT(out)
:: block ...
INTEGER,
INTENT(in)
:: sizes(:) ...
REAL(real_8),
INTENT(in)
:: array(product(sizes)) ...

SUBROUTINEcreate_block_data_r_sp(block, sizes, array)

Create block from array, array can be n-dimensional.

Arguments:
TYPE(block_nd),
INTENT(out)
:: block ...
INTEGER,
INTENT(in)
:: sizes(:) ...
REAL(real_4),
INTENT(in)
:: array(product(sizes)) ...

SUBROUTINEcreate_block_data_c_dp(block, sizes, array)

Create block from array, array can be n-dimensional.

Arguments:
TYPE(block_nd),
INTENT(out)
:: block ...
INTEGER,
INTENT(in)
:: sizes(:) ...
COMPLEX(real_8),
INTENT(in)
:: array(product(sizes)) ...

SUBROUTINEcreate_block_data_c_sp(block, sizes, array)

Create block from array, array can be n-dimensional.

Arguments:
TYPE(block_nd),
INTENT(out)
:: block ...
INTEGER,
INTENT(in)
:: sizes(:) ...
COMPLEX(real_4),
INTENT(in)
:: array(product(sizes)) ...

SUBROUTINEcreate_block_nodata(block, sizes, data_type)

Create block without data

Arguments:
TYPE(block_nd),
INTENT(out)
:: block ...
INTEGER,
INTENT(in)
:: sizes(:) ...
INTEGER,
INTENT(in)
:: data_type ...

SUBROUTINEdbcsr_t_get_2d_block_r_dp(tensor, ind, sizes, block)

Template for dbcsr_t_get_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
REAL(real_8),
INTENT(out)
:: block(sizes(1),sizes(2)) block to get

SUBROUTINEdbcsr_t_allocate_and_get_2d_block_r_dp(tensor, ind, block)

...

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) ...
REAL(real_8),
INTENT(out),
ALLOCATABLE
:: block(:,:) ...

SUBROUTINEdbcsr_t_get_3d_block_r_dp(tensor, ind, sizes, block)

Template for dbcsr_t_get_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
REAL(real_8),
INTENT(out)
:: block(sizes(1),sizes(2),sizes(3)) block to get

SUBROUTINEdbcsr_t_allocate_and_get_3d_block_r_dp(tensor, ind, block)

...

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) ...
REAL(real_8),
INTENT(out),
ALLOCATABLE
:: block(:,:,:) ...

SUBROUTINEdbcsr_t_get_4d_block_r_dp(tensor, ind, sizes, block)

Template for dbcsr_t_get_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
REAL(real_8),
INTENT(out)
:: block(sizes(1),sizes(2),sizes(3),sizes(4)) block to get

SUBROUTINEdbcsr_t_allocate_and_get_4d_block_r_dp(tensor, ind, block)

...

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) ...
REAL(real_8),
INTENT(out),
ALLOCATABLE
:: block(:,:,:,:) ...

SUBROUTINEdbcsr_t_get_2d_block_r_sp(tensor, ind, sizes, block)

Template for dbcsr_t_get_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
REAL(real_4),
INTENT(out)
:: block(sizes(1),sizes(2)) block to get

SUBROUTINEdbcsr_t_allocate_and_get_2d_block_r_sp(tensor, ind, block)

...

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) ...
REAL(real_4),
INTENT(out),
ALLOCATABLE
:: block(:,:) ...

SUBROUTINEdbcsr_t_get_3d_block_r_sp(tensor, ind, sizes, block)

Template for dbcsr_t_get_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
REAL(real_4),
INTENT(out)
:: block(sizes(1),sizes(2),sizes(3)) block to get

SUBROUTINEdbcsr_t_allocate_and_get_3d_block_r_sp(tensor, ind, block)

...

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) ...
REAL(real_4),
INTENT(out),
ALLOCATABLE
:: block(:,:,:) ...

SUBROUTINEdbcsr_t_get_4d_block_r_sp(tensor, ind, sizes, block)

Template for dbcsr_t_get_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
REAL(real_4),
INTENT(out)
:: block(sizes(1),sizes(2),sizes(3),sizes(4)) block to get

SUBROUTINEdbcsr_t_allocate_and_get_4d_block_r_sp(tensor, ind, block)

...

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) ...
REAL(real_4),
INTENT(out),
ALLOCATABLE
:: block(:,:,:,:) ...

SUBROUTINEdbcsr_t_get_2d_block_c_dp(tensor, ind, sizes, block)

Template for dbcsr_t_get_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
COMPLEX(real_8),
INTENT(out)
:: block(sizes(1),sizes(2)) block to get

SUBROUTINEdbcsr_t_allocate_and_get_2d_block_c_dp(tensor, ind, block)

...

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) ...
COMPLEX(real_8),
INTENT(out),
ALLOCATABLE
:: block(:,:) ...

SUBROUTINEdbcsr_t_get_3d_block_c_dp(tensor, ind, sizes, block)

Template for dbcsr_t_get_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
COMPLEX(real_8),
INTENT(out)
:: block(sizes(1),sizes(2),sizes(3)) block to get

SUBROUTINEdbcsr_t_allocate_and_get_3d_block_c_dp(tensor, ind, block)

...

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) ...
COMPLEX(real_8),
INTENT(out),
ALLOCATABLE
:: block(:,:,:) ...

SUBROUTINEdbcsr_t_get_4d_block_c_dp(tensor, ind, sizes, block)

Template for dbcsr_t_get_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
COMPLEX(real_8),
INTENT(out)
:: block(sizes(1),sizes(2),sizes(3),sizes(4)) block to get

SUBROUTINEdbcsr_t_allocate_and_get_4d_block_c_dp(tensor, ind, block)

...

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) ...
COMPLEX(real_8),
INTENT(out),
ALLOCATABLE
:: block(:,:,:,:) ...

SUBROUTINEdbcsr_t_get_2d_block_c_sp(tensor, ind, sizes, block)

Template for dbcsr_t_get_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
COMPLEX(real_4),
INTENT(out)
:: block(sizes(1),sizes(2)) block to get

SUBROUTINEdbcsr_t_allocate_and_get_2d_block_c_sp(tensor, ind, block)

...

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) ...
COMPLEX(real_4),
INTENT(out),
ALLOCATABLE
:: block(:,:) ...

SUBROUTINEdbcsr_t_get_3d_block_c_sp(tensor, ind, sizes, block)

Template for dbcsr_t_get_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
COMPLEX(real_4),
INTENT(out)
:: block(sizes(1),sizes(2),sizes(3)) block to get

SUBROUTINEdbcsr_t_allocate_and_get_3d_block_c_sp(tensor, ind, block)

...

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) ...
COMPLEX(real_4),
INTENT(out),
ALLOCATABLE
:: block(:,:,:) ...

SUBROUTINEdbcsr_t_get_4d_block_c_sp(tensor, ind, sizes, block)

Template for dbcsr_t_get_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
COMPLEX(real_4),
INTENT(out)
:: block(sizes(1),sizes(2),sizes(3),sizes(4)) block to get

SUBROUTINEdbcsr_t_allocate_and_get_4d_block_c_sp(tensor, ind, block)

...

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) ...
COMPLEX(real_4),
INTENT(out),
ALLOCATABLE
:: block(:,:,:,:) ...

SUBROUTINEdbcsr_t_get_anyd_block(tensor, ind, block)

Generic implementation of dbcsr_t_get_block (arbitrary tensor rank and arbitrary datatype)

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
TYPE(block_nd),
INTENT(out)
:: block block to get

SUBROUTINEdbcsr_t_put_2d_block_r_dp(tensor, ind, sizes, block)

Template for dbcsr_t_put_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
REAL(real_8),
INTENT(in)
:: block(sizes(1),sizes(2)) block to put

SUBROUTINEdbcsr_t_put_3d_block_r_dp(tensor, ind, sizes, block)

Template for dbcsr_t_put_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
REAL(real_8),
INTENT(in)
:: block(sizes(1),sizes(2),sizes(3)) block to put

SUBROUTINEdbcsr_t_put_4d_block_r_dp(tensor, ind, sizes, block)

Template for dbcsr_t_put_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
REAL(real_8),
INTENT(in)
:: block(sizes(1),sizes(2),sizes(3),sizes(4)) block to put

SUBROUTINEdbcsr_t_put_2d_block_r_sp(tensor, ind, sizes, block)

Template for dbcsr_t_put_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
REAL(real_4),
INTENT(in)
:: block(sizes(1),sizes(2)) block to put

SUBROUTINEdbcsr_t_put_3d_block_r_sp(tensor, ind, sizes, block)

Template for dbcsr_t_put_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
REAL(real_4),
INTENT(in)
:: block(sizes(1),sizes(2),sizes(3)) block to put

SUBROUTINEdbcsr_t_put_4d_block_r_sp(tensor, ind, sizes, block)

Template for dbcsr_t_put_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
REAL(real_4),
INTENT(in)
:: block(sizes(1),sizes(2),sizes(3),sizes(4)) block to put

SUBROUTINEdbcsr_t_put_2d_block_c_dp(tensor, ind, sizes, block)

Template for dbcsr_t_put_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
COMPLEX(real_8),
INTENT(in)
:: block(sizes(1),sizes(2)) block to put

SUBROUTINEdbcsr_t_put_3d_block_c_dp(tensor, ind, sizes, block)

Template for dbcsr_t_put_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
COMPLEX(real_8),
INTENT(in)
:: block(sizes(1),sizes(2),sizes(3)) block to put

SUBROUTINEdbcsr_t_put_4d_block_c_dp(tensor, ind, sizes, block)

Template for dbcsr_t_put_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
COMPLEX(real_8),
INTENT(in)
:: block(sizes(1),sizes(2),sizes(3),sizes(4)) block to put

SUBROUTINEdbcsr_t_put_2d_block_c_sp(tensor, ind, sizes, block)

Template for dbcsr_t_put_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
COMPLEX(real_4),
INTENT(in)
:: block(sizes(1),sizes(2)) block to put

SUBROUTINEdbcsr_t_put_3d_block_c_sp(tensor, ind, sizes, block)

Template for dbcsr_t_put_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
COMPLEX(real_4),
INTENT(in)
:: block(sizes(1),sizes(2),sizes(3)) block to put

SUBROUTINEdbcsr_t_put_4d_block_c_sp(tensor, ind, sizes, block)

Template for dbcsr_t_put_block.

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
INTEGER,
INTENT(in)
:: sizes(ndims_tensor(tensor)) block size
COMPLEX(real_4),
INTENT(in)
:: block(sizes(1),sizes(2),sizes(3),sizes(4)) block to put

SUBROUTINEdbcsr_t_put_anyd_block(tensor, ind, block)

Generic implementation of dbcsr_t_put_block (arbitrary tensor rank and arbitrary datatype)

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: ind(ndims_tensor(tensor)) block index
TYPE(block_nd),
INTENT(in)
:: block block to put

SUBROUTINEdbcsr_t_reserve_blocks_index(tensor, blk_ind_1, blk_ind_2, blk_ind_3, blk_ind_4)

reserve tensor blocks using block indices

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in),
OPTIONAL
:: blk_ind_1(:) index of blocks to reserve in each dimension
INTEGER,
INTENT(in),
OPTIONAL
:: blk_ind_2(:) ...
INTEGER,
INTENT(in),
OPTIONAL
:: blk_ind_3(:) ...
INTEGER,
INTENT(in),
OPTIONAL
:: blk_ind_4(:) ...

SUBROUTINEdbcsr_t_reserve_blocks_index_list(tensor, blk_ind)

...

Arguments:
INTENT(inout)
:: tensor ...
TYPE(array_list),
INTENT(in)
:: blk_ind ...

SUBROUTINEdbcsr_t_reserve_blocks_index_array(tensor, blk_ind)

...

Arguments:
INTENT(inout)
:: tensor ...
INTEGER,
INTENT(in)
:: blk_ind(:,:) ...

SUBROUTINEdbcsr_t_reserve_blocks_template(tensor_in, tensor_out)

reserve tensor blocks using template

Arguments:
INTENT(in)
:: tensor_in template tensor
INTENT(inout)
:: tensor_out ...

SUBROUTINEdbcsr_t_reserve_blocks_matrix(matrix_in, tensor_out)

reserve tensor blocks using matrix template

Arguments:
TYPE(dbcsr_type),
INTENT(in)
:: matrix_in ...
INTENT(inout)
:: tensor_out ...

SUBROUTINEreshape_block_m2t_2d_r_dp(map, block_2d, block)

...

Arguments:
INTENT(in)
:: map ...
REAL(real_8),
INTENT(in)
:: block_2d(:,:) ...
REAL(real_8),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2)) ...

SUBROUTINEreshape_block_m2t_3d_r_dp(map, block_2d, block)

...

Arguments:
INTENT(in)
:: map ...
REAL(real_8),
INTENT(in)
:: block_2d(:,:) ...
REAL(real_8),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3)) ...

SUBROUTINEreshape_block_m2t_4d_r_dp(map, block_2d, block)

...

Arguments:
INTENT(in)
:: map ...
REAL(real_8),
INTENT(in)
:: block_2d(:,:) ...
REAL(real_8),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3),map%dims_nd(4)) ...

SUBROUTINEreshape_block_m2t_2d_r_sp(map, block_2d, block)

...

Arguments:
INTENT(in)
:: map ...
REAL(real_4),
INTENT(in)
:: block_2d(:,:) ...
REAL(real_4),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2)) ...

SUBROUTINEreshape_block_m2t_3d_r_sp(map, block_2d, block)

...

Arguments:
INTENT(in)
:: map ...
REAL(real_4),
INTENT(in)
:: block_2d(:,:) ...
REAL(real_4),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3)) ...

SUBROUTINEreshape_block_m2t_4d_r_sp(map, block_2d, block)

...

Arguments:
INTENT(in)
:: map ...
REAL(real_4),
INTENT(in)
:: block_2d(:,:) ...
REAL(real_4),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3),map%dims_nd(4)) ...

SUBROUTINEreshape_block_m2t_2d_c_dp(map, block_2d, block)

...

Arguments:
INTENT(in)
:: map ...
COMPLEX(real_8),
INTENT(in)
:: block_2d(:,:) ...
COMPLEX(real_8),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2)) ...

SUBROUTINEreshape_block_m2t_3d_c_dp(map, block_2d, block)

...

Arguments:
INTENT(in)
:: map ...
COMPLEX(real_8),
INTENT(in)
:: block_2d(:,:) ...
COMPLEX(real_8),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3)) ...

SUBROUTINEreshape_block_m2t_4d_c_dp(map, block_2d, block)

...

Arguments:
INTENT(in)
:: map ...
COMPLEX(real_8),
INTENT(in)
:: block_2d(:,:) ...
COMPLEX(real_8),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3),map%dims_nd(4)) ...

SUBROUTINEreshape_block_m2t_2d_c_sp(map, block_2d, block)

...

Arguments:
INTENT(in)
:: map ...
COMPLEX(real_4),
INTENT(in)
:: block_2d(:,:) ...
COMPLEX(real_4),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2)) ...

SUBROUTINEreshape_block_m2t_3d_c_sp(map, block_2d, block)

...

Arguments:
INTENT(in)
:: map ...
COMPLEX(real_4),
INTENT(in)
:: block_2d(:,:) ...
COMPLEX(real_4),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3)) ...

SUBROUTINEreshape_block_m2t_4d_c_sp(map, block_2d, block)

...

Arguments:
INTENT(in)
:: map ...
COMPLEX(real_4),
INTENT(in)
:: block_2d(:,:) ...
COMPLEX(real_4),
INTENT(out)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3),map%dims_nd(4)) ...

SUBROUTINEreshape_block_t2m_2d_r_dp(map, block, block_2d)

...

Arguments:
INTENT(in)
:: map ...
REAL(real_8),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2)) ...
REAL(real_8),
INTENT(out)
:: block_2d(map%dims_2d(1),map%dims_2d(2)) ...

SUBROUTINEreshape_block_t2m_3d_r_dp(map, block, block_2d)

...

Arguments:
INTENT(in)
:: map ...
REAL(real_8),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3)) ...
REAL(real_8),
INTENT(out)
:: block_2d(map%dims_2d(1),map%dims_2d(2)) ...

SUBROUTINEreshape_block_t2m_4d_r_dp(map, block, block_2d)

...

Arguments:
INTENT(in)
:: map ...
REAL(real_8),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3),map%dims_nd(4)) ...
REAL(real_8),
INTENT(out)
:: block_2d(map%dims_2d(1),map%dims_2d(2)) ...

SUBROUTINEreshape_block_t2m_2d_r_sp(map, block, block_2d)

...

Arguments:
INTENT(in)
:: map ...
REAL(real_4),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2)) ...
REAL(real_4),
INTENT(out)
:: block_2d(map%dims_2d(1),map%dims_2d(2)) ...

SUBROUTINEreshape_block_t2m_3d_r_sp(map, block, block_2d)

...

Arguments:
INTENT(in)
:: map ...
REAL(real_4),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3)) ...
REAL(real_4),
INTENT(out)
:: block_2d(map%dims_2d(1),map%dims_2d(2)) ...

SUBROUTINEreshape_block_t2m_4d_r_sp(map, block, block_2d)

...

Arguments:
INTENT(in)
:: map ...
REAL(real_4),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3),map%dims_nd(4)) ...
REAL(real_4),
INTENT(out)
:: block_2d(map%dims_2d(1),map%dims_2d(2)) ...

SUBROUTINEreshape_block_t2m_2d_c_dp(map, block, block_2d)

...

Arguments:
INTENT(in)
:: map ...
COMPLEX(real_8),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2)) ...
COMPLEX(real_8),
INTENT(out)
:: block_2d(map%dims_2d(1),map%dims_2d(2)) ...

SUBROUTINEreshape_block_t2m_3d_c_dp(map, block, block_2d)

...

Arguments:
INTENT(in)
:: map ...
COMPLEX(real_8),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3)) ...
COMPLEX(real_8),
INTENT(out)
:: block_2d(map%dims_2d(1),map%dims_2d(2)) ...

SUBROUTINEreshape_block_t2m_4d_c_dp(map, block, block_2d)

...

Arguments:
INTENT(in)
:: map ...
COMPLEX(real_8),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3),map%dims_nd(4)) ...
COMPLEX(real_8),
INTENT(out)
:: block_2d(map%dims_2d(1),map%dims_2d(2)) ...

SUBROUTINEreshape_block_t2m_2d_c_sp(map, block, block_2d)

...

Arguments:
INTENT(in)
:: map ...
COMPLEX(real_4),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2)) ...
COMPLEX(real_4),
INTENT(out)
:: block_2d(map%dims_2d(1),map%dims_2d(2)) ...

SUBROUTINEreshape_block_t2m_3d_c_sp(map, block, block_2d)

...

Arguments:
INTENT(in)
:: map ...
COMPLEX(real_4),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3)) ...
COMPLEX(real_4),
INTENT(out)
:: block_2d(map%dims_2d(1),map%dims_2d(2)) ...

SUBROUTINEreshape_block_t2m_4d_c_sp(map, block, block_2d)

...

Arguments:
INTENT(in)
:: map ...
COMPLEX(real_4),
INTENT(in)
:: block(map%dims_nd(1),map%dims_nd(2),map%dims_nd(3),map%dims_nd(4)) ...
COMPLEX(real_4),
INTENT(out)
:: block_2d(map%dims_2d(1),map%dims_2d(2)) ...