dbcsr_tensor_split Module

Routines to split blocks and to convert between tensors with different block sizes.



Contents


Variables

TypeVisibilityAttributesNameInitial
character(len=*), private, parameter:: moduleN ='dbcsr_tensor_split'

Subroutines

public subroutine dbcsr_t_split_blocks_generic(tensor_in, tensor_out, blk_size_1, blk_size_2, blk_size_3, blk_size_4, nodata)

Split tensor blocks into smaller blocks

Arguments

TypeIntentOptionalAttributesName
type(dbcsr_t_type), intent(inout) :: tensor_in

Input tensor

type(dbcsr_t_type), intent(out) :: tensor_out

Output tensor (splitted blocks)

integer, intent(in), optional DIMENSION(:):: blk_size_1

block sizes for each of the tensor dimensions

integer, intent(in), optional DIMENSION(:):: blk_size_2

block sizes for each of the tensor dimensions

integer, intent(in), optional DIMENSION(:):: blk_size_3

block sizes for each of the tensor dimensions

integer, intent(in), optional DIMENSION(:):: blk_size_4

block sizes for each of the tensor dimensions

logical, intent(in), optional :: nodata

don't copy data from tensor_in to tensor_out

public subroutine dbcsr_t_split_blocks(tensor_in, tensor_out, block_sizes, nodata)

Split tensor blocks into smaller blocks of maximum size PRODUCT(block_sizes).

Arguments

TypeIntentOptionalAttributesName
type(dbcsr_t_type), intent(inout) :: tensor_in

Input tensor

type(dbcsr_t_type), intent(out) :: tensor_out

Output tensor (split blocks)

integer, intent(in), DIMENSION(ndims_tensor(tensor_in)):: block_sizes

block sizes for each of the tensor dimensions

logical, intent(in), optional :: nodata

don't copy data from tensor_in to tensor_out

public subroutine dbcsr_t_split_copyback(tensor_split_in, tensor_out, summation)

Copy tensor with split blocks to tensor with original block sizes.

Arguments

TypeIntentOptionalAttributesName
type(dbcsr_t_type), intent(inout) :: tensor_split_in

tensor with smaller blocks

type(dbcsr_t_type), intent(inout) :: tensor_out

original tensor

logical, intent(in), optional :: summation

public subroutine dbcsr_t_make_compatible_blocks(tensor1, tensor2, tensor1_split, tensor2_split, order, nodata1, nodata2, move_data)

split two tensors with same total sizes but different block sizes such that they have equal block sizes \move_data memory optimization: transfer data s.t. tensor1 and tensor2 may be empty on return

Arguments

TypeIntentOptionalAttributesName
type(dbcsr_t_type), intent(inout) :: tensor1

tensor 1 in tensor 2 in

type(dbcsr_t_type), intent(inout) :: tensor2

tensor 1 in tensor 2 in

type(dbcsr_t_type), intent(out) :: tensor1_split

tensor 1 with split blocks tensor 2 with split blocks

type(dbcsr_t_type), intent(out) :: tensor2_split

tensor 1 with split blocks tensor 2 with split blocks

integer, intent(in), optional DIMENSION(ndims_tensor(tensor1)):: order
logical, intent(in), optional :: nodata1

don't copy data of tensor 1 don't copy data of tensor 2

logical, intent(in), optional :: nodata2

don't copy data of tensor 1 don't copy data of tensor 2

logical, intent(in), optional :: move_data

don't copy data of tensor 1 don't copy data of tensor 2

public subroutine dbcsr_t_crop(tensor_in, tensor_out, bounds, move_data)

Arguments

TypeIntentOptionalAttributesName
type(dbcsr_t_type), intent(inout) :: tensor_in
type(dbcsr_t_type), intent(out) :: tensor_out
integer, intent(in), DIMENSION(2, ndims_tensor(tensor_in)):: bounds
logical, intent(in), optional :: move_data