comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Vectorization question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Vectorization question [message #21760 is a reply to message #21705] Thu, 14 September 2000 00:00 Go to previous messageGo to previous message
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior Member
Liam E. Gumley <Liam.Gumley@ssec.wisc.edu> wrote in message
news:39C1179A.EF9CA04E@ssec.wisc.edu...
> c ... This is the routine which does the work.
> c ... The arguments are defined exactly the same as in the
> c ... call_external procedure call in IDL.
> subroutine vecadd1(a, na, x, nx, b)
> integer*4 na, nx
> real*4 a(na), b(nx)
> integer*4 x(nx), i
> do i = 1, nx
> a(x(i)) = a(x(i)) + b(i)
> end do
> end

I forgot FORTRAN uses 1-based indices by default. What I *meant* to say was:

subroutine vecadd1(a, na, x, nx, b)
integer*4 na, nx
real*4 a(0:na-1), b(0:nx-1)
integer*4 x(0:nx-1), i
do i = 0, nx - 1
a(x(i)) = a(x(i)) + b(i)
end do
end

Cheers,
Liam.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Spherical gridding at a pole
Next Topic: Re: CW_BGROUP

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 07:06:23 PDT 2025

Total time taken to generate the page: 1.20072 seconds