compute size of tensor of given rank
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | rank |
integer pure function tensor_size(rank)
integer, intent(in) :: rank
tensor_size = (rank + 2) * (rank + 1) / 2
end function tensor_size