Routines to split blocks and to convert between tensors with different block sizes.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=*), | private, | parameter | :: | moduleN | = | 'dbcsr_tensor_split' |
Split tensor blocks into smaller blocks
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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 |
Split tensor blocks into smaller blocks of maximum size PRODUCT(block_sizes).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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 |
Copy tensor with split blocks to tensor with original block sizes.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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 |
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
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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 |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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 |