Question: deep - shallow - move semantics

杨 铭 <[email protected]> Thu, 21 Jul 2005 16:21:23 +0800
Newsgroups gmane.comp.lib.mtl.devel
Message-ID <[email protected]>
Hi all,

   I'm a newbie (both of C++ and Matrix Computation).

   I'm currently working on a small project which contains some matrix 
manipulation. 
I decide to write a matrix class. I have read some code of MTL, and it's a 
great work, 
I think. 

   What bothers me is how to avoid deep copy. Now MTL uses a reference 
counting 
stratage, as I know. But the plan of future version say that deep copy 
semantics
will be adopt ( see 
  
http://boost-consulting.com/projects/mtl4/libs/numeric/mtl/doc/html/plan.html 
)

   After implementing a simple reference counting based matrix class, I 
realized 
that shallow copy semantics is quite confusing but alleviates the 
efficiency 
problem.

   My question is how to ensure high performance in the forthcoming MTL 4? 
(Sorry, I found section 1.7.2 of the plan is hard to understand, especially
"move semantics").

   And would you like to give me some advise about my matrix class? Should
I use shallow copy semantics or a deep one?

   thank you!

_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com

_______________________________________________
This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/