Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=SP), | intent(in), | DIMENSION(:) | :: | a | ||
real(kind=SP), | intent(in), | DIMENSION(:) | :: | b |
FUNCTION outersum(a,b)
REAL(SP), DIMENSION(:), INTENT(IN) :: a,b
REAL(SP), DIMENSION(size(a),size(b)) :: outersum
outersum = spread(a,dim=2,ncopies=size(b)) + &
spread(b,dim=1,ncopies=size(a))
END FUNCTION outersum