Re: Can i avoid the loop,help me speed up,thanks [message #61959 is a reply to message #61892] |
Tue, 12 August 2008 05:47   |
Rongchang Chen
Messages: 12 Registered: August 2008
|
Junior Member |
|
|
On Aug 11, 7:20 pm, Jean H <jghas...@DELTHIS.ucalgary.ANDTHIS.ca>
wrote:
>> I use PROFILER to check and show the I/O take most of time,use Chris
>> suggestion,I read all the projections(in 3D array) in advance and it
>> speed up a lot,but use 3D array I can just read 100 projections,if
>> more it complain’ % Array has too many elements.’ ??? how to avoid
>> this.
>
> You don't have enough memory available. Use "memtest.pro" from ITTVIS to
> figure out the largest array you can make. So you basically have 3
> options, the last one being, obviously, the easiest:
> 1) buy more memory. If on windows, you can't get more than 2Gb of memory
> for IDL, unless you play with the /3gb option on windows AND that you
> enable IDL to get access to 3gb... I don't know if it is feasible on IDL 7.
>
> 2) switch to Linux. You will be able to a) access more memory and b)
> access more contiguous memory (bigger arrays, look on ITTVIS website for
> an explanation)
>
> 3) don't create one big array, but an array of pointer, each pointing to
> a single entity (or image). Like that, each entity use a small amount of
> memory and you will be able to store much more entities.
>
>> I’m thinking dose IDL has some type of file that I can write one row
>> each time without read the file first??
>> Thank you very much.
>
> look at openW with the /append keyword.
>
> Jean
Now working,used pointer successful avoiding 100 projections limit.
Thank you very much for helpful discussion.
Rongchang
|
|
|