[PATCH] Fix Cheetah operation

Jeffrey D. Oldham oldham at codesourcery.com
Fri Jan 9 17:26:32 UTC 2004


Richard Guenther wrote:
> Hi!
> 
> This patch reverts part of a previous patch to restore unpacking of
> compressible brick views in Cheetah mode.
> 
> Ok?

Yes.

> Richard.
> 
> 
> 2004Jan09  Richard Guenther <richard.guenther at uni-tuebingen.de>
> 
> 	* src/Engine/RemoteEngine.h: revert removal of unpack(Engine*,
> 	char*) and cleanup(Engine*) method in Cheetah::Serialize<CHEETAH,
> 	Engine<Dim, T, CompressibleBrickView> > class.
> 
> ===== RemoteEngine.h 1.5 vs edited =====
> --- 1.5/r2/src/Engine/RemoteEngine.h	Wed Jan  7 09:54:05 2004
> +++ edited/RemoteEngine.h	Fri Jan  9 14:42:11 2004
> @@ -1616,6 +1616,55 @@
>      return nBytes;
>    }
> 
> +  static inline int
> +  unpack(Engine_t* &a, char *buffer)
> +  {
> +    Interval<Dim> *dom;
> +
> +    int change;
> +    int nBytes=0;
> +
> +    change = Serialize<CHEETAH, Domain_t>::unpack(dom, buffer);
> +    buffer += change;
> +    nBytes += change;
> +
> +    bool *compressed;
> +
> +    change = Serialize<CHEETAH, bool>::unpack(compressed, buffer);
> +    buffer += change;
> +    nBytes += change;
> +
> +    if (*compressed)
> +    {
> +      T *value;
> +
> +      change = Serialize<CHEETAH, T>::unpack(value, buffer);
> +
> +      Engine<Dim, T, CompressibleBrick> foo(*dom, *value);
> +
> +      a = new Engine_t(foo, *dom);
> +    }
> +    else
> +    {
> +      Engine<Dim, T, CompressibleBrick> foo(*dom);
> +
> +      EngineElemDeSerialize op(buffer);
> +
> +      change = EngineBlockSerialize::apply(op, foo, *dom);
> +
> +      a = new Engine_t(foo, *dom);
> +    }
> +    nBytes += change;
> +
> +    return nBytes;
> +  }
> +
> +  static inline void
> +  cleanup(Engine_t* a)
> +  {
> +    delete a;
> +  }
> +
>    // We support a special unpack to avoid an extra copy.
> 
>    static inline int


-- 
Jeffrey D. Oldham
oldham at codesourcery.com




More information about the pooma-dev mailing list