Re: [protobuf] Message was missing required fields

2015-03-11 Thread Stephen Tu
On Tue, Mar 10, 2015 at 5:09 PM, Patrick Linehan pline...@gmail.com wrote: A simple workaround is to modify the compiler output to make both memoizedIsInitialized and isInitalized into ints. This avoids any need for casting or sign extension. Wait what? If this is really the problem, why not

Re: [protobuf] Can protobuf work with C++ templates?

2015-01-21 Thread Stephen Tu
This is not really a protobuf question, moreso a C++ question. But anyways, the typical way to do this is: template typename T struct MatrixTraits { }; template struct MatrixTraitsdouble { typedef DoubleMatrix type; }; template struct MatrixTraitsfloat{ typedef FloatMatrix type; };

Re: [protobuf] Re: Issue 599 in protobuf: Fails to compile for Intel Phi

2014-01-23 Thread Stephen Tu
I think you might actually want two memory barriers, something like MemoryBarrier(); *ptr = value; MemoryBarrier(); your current solution prevents compiler reordering the store with statements after, but what about statements before? On Thu, Jan 23, 2014 at 11:20 AM, proto...@googlecode.com

Re: [protobuf] Re: Issue 599 in protobuf: Fails to compile for Intel Phi

2014-01-23 Thread Stephen Tu
Yes my bad, it is not called SequentiallyConsistentStore but AcquireStore :) On Thu, Jan 23, 2014 at 11:57 AM, Peter Burka pe...@quux.net wrote: Hi Stephen, Honestly I didn't think about it too deeply. I simply copied the same pattern that the x86-64 SSE2 code is using. If a second barrier

Re: [protobuf] Re: Issue 599 in protobuf: Fails to compile for Intel Phi

2014-01-22 Thread Stephen Tu
MemoryBarrier() should probably have a compiler fence in it. For gcc, this looks like: asm volatile( ::: memory) not sure about other compilers. On Tue, Jan 21, 2014 at 2:57 PM, Peter Burka pe...@quux.net wrote: If accepted, please attribute the patch to my work address: peter dot burka at

Re: [protobuf] Issue 542 in protobuf: The memory leak problem

2013-08-08 Thread Stephen Tu
If you link in tcmalloc to your app, it should just work w/o having to change any code. See http://goog-perftools.sourceforge.net/doc/tcmalloc.html On Thu, Aug 8, 2013 at 7:12 AM, proto...@googlecode.com wrote: Status: New Owner: liuj...@google.com Labels: Type-Defect Priority-Medium New

Re: [protobuf] Re: Issue 542 in protobuf: The memory leak problem

2013-08-08 Thread Stephen Tu
Yes, observe: $ cat t.cc #include iostream using namespace std; struct foo { char b[4096]; }; int main(void) { foo *f = new foo; return 0; } $ g++ -o t t.cc -ltcmalloc $ gdb --args ./t GNU gdb (GDB) 7.6 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or

Re: [protobuf] ProtoBuff with Scala

2013-01-15 Thread Stephen Tu
You should just be able to use the Java bindings. On Tue, Jan 15, 2013 at 8:07 AM, Florian Johannßen fjohanns...@googlemail.com wrote: Hi everybody, is it possible to use ProtoBuff in Scala-projects? Do you have made any experience with it? Kind regards Florian -- You received this