emp-ag2pc icon indicating copy to clipboard operation
emp-ag2pc copied to clipboard

Should these loops iterate from 1?

Open joerowell opened this issue 2 years ago • 2 comments

It seems like these loops:

https://github.com/emp-toolkit/emp-ag2pc/blob/19751229d79deccfcf5f8d3a97a15d3dee4b917a/emp-ag2pc/fpre.h#L314

https://github.com/emp-toolkit/emp-ag2pc/blob/19751229d79deccfcf5f8d3a97a15d3dee4b917a/emp-ag2pc/fpre.h#L327

Iterate starting from 1.

Is this intentional? Given that the whole array is sent later, this means that an uninitialised value gets written, and I can't see why you'd want to do that...

joerowell avatar Apr 05 '23 12:04 joerowell

I think that's intentional. This is the bucket "merge" to set the x values of all triples in a bucket to be the same as the first one in the bucket.

wangxiao1254 avatar Apr 05 '23 13:04 wangxiao1254

I guess the code can be optimized a bit so that less bits are sent!

wangxiao1254 avatar Apr 05 '23 13:04 wangxiao1254