[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "out of memory or dimension too large for Octave's index type"
From: |
Francesco Potortì |
Subject: |
Re: "out of memory or dimension too large for Octave's index type" |
Date: |
Tue, 16 Jan 2018 21:13:19 +0100 |
mmuetzel:
>If you know the size of the matrices you need already at the start of
>your program, you could try and "reserve" a continuous memory block for
>it. You might be able to do something like:
>
>function A = fragments_memory ()
>A = zeros(5184,3904, typename);
>
>... (the lines that fragment your memory)
>
>A(:,:) = what_it_should_be;
>
>endfunction
Oh, right, I had taken that for granted, while I shouldn't have. What
Marku sugegsts is (probably the most useful of) a series of optimization
techniqus to care for when you program in Octave using not-so-small
data.
Have a look at chapter "Vectorization and Faster Code Execution" in the
Octave manual for more ideas.
--
Francesco Potortì (ricercatore) Voice: +39.050.621.3058
ISTI - Area della ricerca CNR Mobile: +39.348.8283.107
via G. Moruzzi 1, I-56124 Pisa Skype: wnlabisti
(entrance 20, 1st floor, room C71) Web: http://fly.isti.cnr.it
- Re: "out of memory or dimension too large for Octave's index type", (continued)