Routines to reshape / redistribute tensors
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=*), | private, | parameter | :: | moduleN | = | 'dbcsr_tensor_reshape' |
add block to buffer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(block_buffer_type), | intent(inout) | :: | buffer | |||
integer, | intent(in) | :: | ndata | |||
integer, | intent(in), | DIMENSION(ndims_buffer(buffer)) | :: | index | ||
real(kind=real_8), | intent(in), | DIMENSION(ndata) | :: | block |
add block to buffer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(block_buffer_type), | intent(inout) | :: | buffer | |||
integer, | intent(in) | :: | ndata | |||
integer, | intent(in), | DIMENSION(ndims_buffer(buffer)) | :: | index | ||
real(kind=real_4), | intent(in), | DIMENSION(ndata) | :: | block |
add block to buffer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(block_buffer_type), | intent(inout) | :: | buffer | |||
integer, | intent(in) | :: | ndata | |||
integer, | intent(in), | DIMENSION(ndims_buffer(buffer)) | :: | index | ||
complex(kind=real_8), | intent(in), | DIMENSION(ndata) | :: | block |
add block to buffer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(block_buffer_type), | intent(inout) | :: | buffer | |||
integer, | intent(in) | :: | ndata | |||
integer, | intent(in), | DIMENSION(ndims_buffer(buffer)) | :: | index | ||
complex(kind=real_4), | intent(in), | DIMENSION(ndata) | :: | block |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | ndim | = | -1 | ||
integer, | public | :: | nblock | = | -1 | ||
integer, | public, | DIMENSION(:, :), ALLOCATABLE | :: | indx | |||
real(kind=real_8), | public, | DIMENSION(:), ALLOCATABLE | :: | msg_r_dp | |||
real(kind=real_4), | public, | DIMENSION(:), ALLOCATABLE | :: | msg_r_sp | |||
complex(kind=real_8), | public, | DIMENSION(:), ALLOCATABLE | :: | msg_c_dp | |||
complex(kind=real_4), | public, | DIMENSION(:), ALLOCATABLE | :: | msg_c_sp | |||
integer, | public | :: | data_type | = | -1 | ||
integer, | public | :: | endpos | = | -1 |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(block_buffer_type), | intent(in) | :: | buffer |
how many blocks left in iterator
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(block_buffer_type), | intent(in) | :: | buffer |
copy data (involves reshape)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_t_type), | intent(inout) | :: | tensor_in | |||
type(dbcsr_t_type), | intent(inout) | :: | tensor_out | |||
logical, | intent(in), | optional | :: | summation |
tensor_out = tensor_out + tensor_in move_data memory optimization: transfer data from tensor_in to tensor_out s.t. tensor_in is empty on return |
|
logical, | intent(in), | optional | :: | move_data |
Create block buffer for MPI communication.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(block_buffer_type), | intent(out) | :: | buffer |
block buffer |
||
integer, | intent(in) | :: | nblock |
number of blocks total number of block entries number of dimensions |
||
integer, | intent(in) | :: | ndata |
number of blocks total number of block entries number of dimensions |
||
integer, | intent(in) | :: | data_type |
number of blocks total number of block entries number of dimensions |
||
integer, | intent(in) | :: | ndim |
number of blocks total number of block entries number of dimensions |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(block_buffer_type), | intent(inout) | :: | buffer |
insert a block into block buffer (at current iterator position)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(block_buffer_type), | intent(inout) | :: | buffer | |||
integer, | intent(in), | DIMENSION(ndims_buffer(buffer)) | :: | index |
index of block |
|
type(block_nd), | intent(in) | :: | block |
block |
get next block from buffer. Iterator is advanced only if block is retrieved or advance_iter.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(block_buffer_type), | intent(inout) | :: | buffer | |||
integer, | intent(out) | :: | ndata | |||
integer, | intent(out), | DIMENSION(ndims_buffer(buffer)) | :: | index | ||
type(block_nd), | intent(inout), | optional | :: | block | ||
logical, | intent(in), | optional | :: | advance_iter |
Get all indices from buffer
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(block_buffer_type), | intent(in) | :: | buffer | |||
integer, | intent(out), | DIMENSION(:, :), ALLOCATABLE | :: | index |
communicate buffer
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mp_comm_type), | intent(in) | :: | mp_comm | |||
type(block_buffer_type), | intent(inout), | DIMENSION(0:) | :: | buffer_recv | ||
type(block_buffer_type), | intent(inout), | DIMENSION(0:) | :: | buffer_send | ||
type(mp_request_type), | intent(out), | DIMENSION(:, :) | :: | req_array |
add block to buffer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(block_buffer_type), | intent(inout) | :: | buffer | |||
integer, | intent(in) | :: | ndata | |||
integer, | intent(in), | DIMENSION(ndims_buffer(buffer)) | :: | index | ||
real(kind=real_8), | intent(in), | DIMENSION(ndata) | :: | block |
add block to buffer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(block_buffer_type), | intent(inout) | :: | buffer | |||
integer, | intent(in) | :: | ndata | |||
integer, | intent(in), | DIMENSION(ndims_buffer(buffer)) | :: | index | ||
real(kind=real_4), | intent(in), | DIMENSION(ndata) | :: | block |
add block to buffer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(block_buffer_type), | intent(inout) | :: | buffer | |||
integer, | intent(in) | :: | ndata | |||
integer, | intent(in), | DIMENSION(ndims_buffer(buffer)) | :: | index | ||
complex(kind=real_8), | intent(in), | DIMENSION(ndata) | :: | block |
add block to buffer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(block_buffer_type), | intent(inout) | :: | buffer | |||
integer, | intent(in) | :: | ndata | |||
integer, | intent(in), | DIMENSION(ndims_buffer(buffer)) | :: | index | ||
complex(kind=real_4), | intent(in), | DIMENSION(ndata) | :: | block |
get next block from buffer. Iterator is advanced only if block is retrieved or advance_iter.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(block_buffer_type), | intent(inout) | :: | buffer | |||
integer, | intent(out) | :: | ndata | |||
integer, | intent(out), | DIMENSION(ndims_buffer(buffer)) | :: | index | ||
real(kind=real_8), | intent(out), | optional, | DIMENSION(:), ALLOCATABLE | :: | block | |
logical, | intent(in), | optional | :: | advance_iter |
get next block from buffer. Iterator is advanced only if block is retrieved or advance_iter.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(block_buffer_type), | intent(inout) | :: | buffer | |||
integer, | intent(out) | :: | ndata | |||
integer, | intent(out), | DIMENSION(ndims_buffer(buffer)) | :: | index | ||
real(kind=real_4), | intent(out), | optional, | DIMENSION(:), ALLOCATABLE | :: | block | |
logical, | intent(in), | optional | :: | advance_iter |
get next block from buffer. Iterator is advanced only if block is retrieved or advance_iter.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(block_buffer_type), | intent(inout) | :: | buffer | |||
integer, | intent(out) | :: | ndata | |||
integer, | intent(out), | DIMENSION(ndims_buffer(buffer)) | :: | index | ||
complex(kind=real_8), | intent(out), | optional, | DIMENSION(:), ALLOCATABLE | :: | block | |
logical, | intent(in), | optional | :: | advance_iter |
get next block from buffer. Iterator is advanced only if block is retrieved or advance_iter.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(block_buffer_type), | intent(inout) | :: | buffer | |||
integer, | intent(out) | :: | ndata | |||
integer, | intent(out), | DIMENSION(ndims_buffer(buffer)) | :: | index | ||
complex(kind=real_4), | intent(out), | optional, | DIMENSION(:), ALLOCATABLE | :: | block | |
logical, | intent(in), | optional | :: | advance_iter |