X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=code%2Fstage1%2Fsrc%2FMPI_Communication%2Fpack.c;h=8cb7b4f166f0c4d2fedbbd76acee01127b9e4480;hb=73d68777d709e054cf74e806e23b0bdefda9462a;hp=a7570b9814d54c7a076d805e4cc6bc1e797b2960;hpb=f9f51b6ab4c7280dd521da675353252d7b078984;p=epclust.git diff --git a/code/stage1/src/MPI_Communication/pack.c b/code/stage1/src/MPI_Communication/pack.c index a7570b9..8cb7b4f 100644 --- a/code/stage1/src/MPI_Communication/pack.c +++ b/code/stage1/src/MPI_Communication/pack.c @@ -16,26 +16,26 @@ void pack_work(Work_t* work, uint32_t nbSeriesInChunk, Byte* packedWork) while (index < NCHAR_FNAME) packedWork[index++] = 0; - write_int(work->nbSeries, 4, packedWork + index); + write_int(work->nbSeries, packedWork + index); index += 4; for (uint32_t i = 0; i < work->nbSeries; i++) { - write_int(work->ranks[i], 4, packedWork + index); + write_int(work->ranks[i], packedWork + index); index += 4; } // complete with zeros for (uint32_t i = 0; i < nbSeriesInChunk - work->nbSeries; i++) { - write_int(0, 4, packedWork + index); + write_int(0, packedWork + index); index += 4; } - write_int(work->nbClusters, 4, packedWork + index); + write_int(work->nbClusters, packedWork + index); index += 4; - write_int(work->clustOnMedoids, 4, packedWork + index); + write_int(work->clustOnMedoids, packedWork + index); index += 4; - write_int(work->p_for_dissims, 4, packedWork + index); + write_int(work->p_for_dissims, packedWork + index); } // serialize a Result_t object into a bytes string @@ -43,18 +43,18 @@ void pack_result(Result_t* result, Byte* packedResult) { uint32_t index = 0; - write_int(result->nbClusters, 4, packedResult); + write_int(result->nbClusters, packedResult); index += 4; for (uint32_t i = 0; i < result->nbClusters; i++) { - write_int(result->medoids_ID[i], 4, packedResult + index); + write_int(result->medoids_ID[i], packedResult + index); index += 4; } for (uint32_t i = 0; i < result->nbClusters; i++) { - write_int(result->medoids_ranks[i], 4, packedResult + index); + write_int(result->medoids_ranks[i], packedResult + index); index += 4; } }