Index: Engine/RemoteEngine.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Engine/RemoteEngine.h,v retrieving revision 1.42 diff -u -u -r1.42 RemoteEngine.h --- Engine/RemoteEngine.h 19 Jan 2004 22:04:33 -0000 1.42 +++ Engine/RemoteEngine.h 24 Aug 2004 14:23:53 -0000 @@ -1055,8 +1055,8 @@ { CTAssert(Domain::unitStride == 1); int f0 = domain[0].first(); - int e0 = domain[0].length(); - for (int i0 = f0; i0 block) - : field_m(field), block_m(block) + PackLocalPatches(RefCountedBlockPtr block) + : block_m(block) { } - void operator()(int i0) const + inline void operator()(const Element_t &t) { - *block_m = field_m.read(i0); + *block_m = t; ++block_m; } - void operator()(int i0, int i1) const - { - *block_m = field_m.read(i0, i1); - ++block_m; - } - - void operator()(int i0, int i1, int i2) const - { - *block_m = field_m.read(i0, i1, i2); - ++block_m; - } - - void operator()(int i0, int i1, int i2, int i3) const - { - *block_m = field_m.read(i0, i1, i2, i3); - ++block_m; - } - - InputField field_m; - mutable RefCountedBlockPtr block_m; + RefCountedBlockPtr block_m; + int total_m; }; template @@ -149,8 +131,8 @@ { typedef typename Patch::Type_t PatchField_t; PatchField_t patch = field.patchLocal(i); - PackLocalPatches packFunctor(patch, current); - LoopApplyEvaluator::evaluate(packFunctor, patch.domain()); + PackLocalPatches packFunctor(current); + EngineBlockSerialize::apply(packFunctor, patch, patch.domain()); current += patch.domain().size(); } @@ -168,44 +150,27 @@ { typedef typename InputField::Element_t Element_t; - UnPackLocalPatches(const InputField &field, - RefCountedBlockPtr block) - : field_m(field), block_m(block) - { - } - - void operator()(int i0) const + UnPackLocalPatches(RefCountedBlockPtr block) + : block_m(block) { - field_m(i0) = *block_m; - ++block_m; - } - - void operator()(int i0, int i1) const - { - field_m(i0, i1) = *block_m; - ++block_m; } - void operator()(int i0, int i1, int i2) const + inline void operator()(Element_t &t) { - field_m(i0, i1, i2) = *block_m; + t = *block_m; ++block_m; } - void operator()(int i0, int i1, int i2, int i3) const - { - field_m(i0, i1, i2, i3) = *block_m; - ++block_m; - } - - InputField field_m; - mutable RefCountedBlockPtr block_m; + RefCountedBlockPtr block_m; + int total_m; }; template void unpack(const InputField &field, RefCountedBlockPtr block) { + Pooma::blockAndEvaluate(); + int i; RefCountedBlockPtr current = block; @@ -214,8 +179,8 @@ { typedef typename Patch::Type_t PatchField_t; PatchField_t patch = field.patchLocal(i); - UnPackLocalPatches unpackFunctor(patch, current); - LoopApplyEvaluator::evaluate(unpackFunctor, patch.physicalDomain()); + UnPackLocalPatches unpackFunctor(current); + EngineBlockSerialize::apply(unpackFunctor, patch, patch.physicalDomain()); current += patch.physicalDomain().size(); } }