Bug in the copied code, I'm copying the matrix to protobuf this way:
// then manually copy the data to the protobuf
for(int i = 0; i < sizeA; i++){
reply->data_c()[i] = matrixDataA[i];
}
I'm guessing the answer is now because of encoding, but if anyone has an
idea I'm happy to hear it out.
El jueves, 13 de junio de 2024 a las 20:17:41 UTC+1, Gerardo Melesio
escribió:
> I am new to the gRPC implementation in C++ and wantd to see if there is
> any way of achieving something.
>
> I have a low library in C that is performing some operations with
> Matrices. It saves the result in a pointer that was allocated dynamically
> in memory.
>
> matrixDataA = (double *) malloc(sizeA*sizeof (double ));
> //... some code fills MatrixA with data
>
> // then manually copy the data to the protobuf
> for(int i = 0; i < sizeA; i++){
> matrixDataA[i] = reply->data_c()[i];
> }
>
> Would there be any way of copying my data in the *double pointer to the
> reply->data_c(), assuming data_c is a repeated double field?
>
>
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/protobuf/b3bc6a6d-9323-4f82-aeb5-6ae909ee25b0n%40googlegroups.com.