forum.alglib.net

ALGLIB forum
It is currently Sun Dec 22, 2024 11:19 pm

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: memory usage of real_1d_array or real_2d_array
PostPosted: Tue Oct 08, 2013 1:34 pm 
Offline

Joined: Tue Oct 08, 2013 1:30 pm
Posts: 1
Hi,
is there any way to avoid copying data in to that containers and use only pointers instead.
The docu says that in this case data is copied:
double _r1[] = {2, 3};
r1.setcontent(2,_r1);

But often the overhead of copies arises the computatio time. Is there any other way?

Regards
Steffen


Top
 Profile  
 
 Post subject: Re: memory usage of real_1d_array or real_2d_array
PostPosted: Wed Oct 09, 2013 10:13 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
It is not possible in the current version. These classes allocate arrays in the aligned manner which is essential for high performance on x86 systems. Furthermore, with 2D arrays it is even theoretically impossible to completely avoid dynamic allocation of memory - we need at least 8*number_of_rows bytes to store pointers to rows of the matrix.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 29 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group