feat: implement parallel bitonic sort with proper power-of-2 padding (v0.2.0)
- Add rayon dependency for parallel processing - Implement rayon::broadcast for proper TFHE server key distribution across threads - Fix bitonic sort to handle non-power-of-2 input sizes by padding to nearest 2^k - Add parallel execution for recursive calls and comparison operations - Update API to accept encrypted max values for safe padding - Add Send/Sync traits for EncryptedNeighbor to enable thread safety - Modify perform_knn_selection to support bitonic sort requirements - Bump version to 0.2.0 This resolves the bitonic sort correctness issue where non-power-of-2 array sizes caused incorrect results. The algorithm now properly pads from 100 to 128 elements and should produce deterministic, correct results.
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -419,6 +419,7 @@ dependencies = [
|
||||
"env_logger",
|
||||
"log",
|
||||
"rand",
|
||||
"rayon",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tfhe",
|
||||
|
||||
Reference in New Issue
Block a user