I'm trying to avoid Polyester. I set minbatch=-1, and at first it looked like I got what I wanted. But actually Polyester is still being used, only with a single thread. It appears the logic is broken in this code snippet
By contradicting the principles of functional programming and mutating the variable minbatch, the value provided by the user is forced into something else. The positive branch of the if can never be reached.
Furthermore, if the query array happens to be empty, this now results not in an empty output, as I suspect would be the case if the non-parallel code was running. What we get instead is a division-by-zero error thrown by Polyester.
I'm trying to avoid Polyester. I set
minbatch=-1
, and at first it looked like I got what I wanted. But actually Polyester is still being used, only with a single thread. It appears the logic is broken in this code snippethttps://github.com/sadit/SimilaritySearch.jl/blob/61485978cbcaaa645dc7940bfe2bc0be060bae0f/src/SimilaritySearch.jl#L167-L170
By contradicting the principles of functional programming and mutating the variable
minbatch
, the value provided by the user is forced into something else. The positive branch of theif
can never be reached.Furthermore, if the query array happens to be empty, this now results not in an empty output, as I suspect would be the case if the non-parallel code was running. What we get instead is a division-by-zero error thrown by Polyester.