Index: CompressibleBrick.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Engine/CompressibleBrick.cpp,v retrieving revision 1.25 diff -c -p -r1.25 CompressibleBrick.cpp *** CompressibleBrick.cpp 2001/05/14 21:11:23 1.25 --- CompressibleBrick.cpp 2001/05/15 14:20:24 *************** Engine(const Engine & makeOwnCopy() - // - // Causes the CompressibleBrickView-Engine to obtain a private copy of the data - // that it refers to. - // - //----------------------------------------------------------------------------- - - template - Engine &Engine::makeOwnCopy() - { - // JIM: This is probably not thread safe??? - // There is a race from checking isShared to getting into cblock's - // makeOwnCopy, which is thread safe. As a result, this should only - // be called after a blockAndEvaluate() to ensure that nobody else - // is messing with the underlying CBC while this is - // occuring. (Logically, this is necessary anyway since you probably - // want a copy of the data that results from all previous - // computations having taken place.) Also, as mentioned elsewhere, - // the current implementation results in copying uncompressed data - // in the parse thread, which will result in incorrect memory - // affinity. - - if (cblock_m.isControllerValidUnlocked() && cblock_m.isShared()) - { - cblock_m.detach(this); - cblock_m.makeOwnCopy(); - cblock_m.attach(this); - - data0_m = cblock_m.data() + (cblock_m.compressed() ? 0 : baseOffset()); - } - - return *this; - } - - //----------------------------------------------------------------------------- - // // Engine:: // elementsCompressed() const // --- 501,506 ---- Index: CompressibleBrick.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Engine/CompressibleBrick.h,v retrieving revision 1.68 diff -c -p -r1.68 CompressibleBrick.h *** CompressibleBrick.h 2001/05/14 21:11:23 1.68 --- CompressibleBrick.h 2001/05/15 14:20:25 *************** public: *** 573,582 **** return Layout_t(domain_m).domain(); } - // Get a private copy of data viewed by this Engine. - - Engine_t &makeOwnCopy(); - // Return the block controller (uncompressed). // See comments in CompressibleBrick above. --- 573,578 ---- *************** struct NewEngine struct ElementProperties > : public MakeOwnCopyProperties > - { }; - - template - struct ElementProperties > - : public MakeOwnCopyProperties > { }; --- 817,822 ----