Calculates the scalar product between two vectors
Note
Jonathan Chico: This can be generalized to vectors of any dimmension by using the
call sum(x(:)*y(:))
. This should be more efficient for ifort
as it vectorizes
the sum
call automatically
C a l c u l a t e s
t h e
s c a l a r
p r o d u c t
b e t w e e n
t w o
v e c t o r s
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in), | dimension(*) | :: | x | ||
real(kind=dp), | intent(in), | dimension(*) | :: | y | ||
real(kind=dp), | intent(out) | :: | z |