[PATCH] Re: [pooma-dev] [BUG] FieldEngine::makeOwnCopy() does not compile
Richard Guenther
rguenth at tat.physik.uni-tuebingen.de
Mon Oct 21 10:21:31 UTC 2002
On Fri, 18 Oct 2002, Richard Guenther wrote:
> FieldEngine::makeOwnCopy() does not compile and I cant figure out how the
> current "structure" of it should work. Can anybody enlighten me or fix the
> problem?
Ok, I needed this so I sat down and at least fixed it (probably not in an
optimal way, but it seems to work). Apply the following
Index: src/Field/FieldEngine/FieldEngine.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Field/FieldEngine/FieldEngine.h,v
retrieving revision 1.3
diff -u -r1.3 FieldEngine.h
--- src/Field/FieldEngine/FieldEngine.h 1 Jul 2002 22:25:53 -0000 1.3
+++ src/Field/FieldEngine/FieldEngine.h 21 Oct 2002 10:20:11 -0000
@@ -587,6 +587,10 @@
{
PAssert(data_m.isValid());
+ // Remember data_m as model
+
+ RefCountedBlockPtr<Data_t> model = data_m;
+
// Create a blank slate of engines:
data_m = RefCountedBlockPtr<Data_t>();
@@ -600,7 +604,7 @@
{
for (int c = 0; c < centering_m.size(); ++ c)
{
- data(m, c) = model.data(m, c);
+ data(m, c) = model[m*stride_m + c];
data(m, c).engine().makeOwnCopy();
data(m, c).relations().makeOwnCopy(s);
}
More information about the pooma-dev
mailing list