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

Home » Public Forums » archive » Re: which array dimensions are contiguous?
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: which array dimensions are contiguous? [message #47523 is a reply to message #47522] Mon, 13 February 2006 12:04 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
greg michael writes:

> I know somebody wrote this only recently, but I can't find it again. If
> the function below, EvaluateFunctionSection, returns a 2-d array
> (ns,nl), will assignment put it into contiguous memory, or make some
> kind of awful (slow?) mess?
>
> b=fltarr(ns,nl,n_elements(f))
> for i=1,n_elements(f) do begin
>
> b[*,*,i]=self-> EvaluateFunctionSection(f[i],ln,sm,nl,ns,downsample=downsamp le)
> endfor

It will make a (slow) mess. Do this, instead:

b[0,0,I]=self->EvaluateFunctionSection[I], $
ln,sm,nl,ns,downsample=downsample)

See this article:

http://www.dfanning.com/misc_tips/submemory.html

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: which array dimensions are contiguous?
Next Topic: weighted Gaussian distribution mean

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

Current Time: Sat Oct 11 17:21:03 PDT 2025

Total time taken to generate the page: 0.00994 seconds