- Integrated GPU acceleration via WebGL in `embedding.ts` and `distance.ts` for optimized performance.
- Enhanced fallback mechanisms for CPU processing when GPU is unavailable or fails to initialize.
- Added threading support for embedding and distance calculations in `embedding.ts` and `distance.ts` to improve performance and avoid blocking the main thread.
- Refactored TensorFlow.js imports to dynamically load modules (`@tensorflow/tfjs-core`, `@tensorflow/tfjs-backend-webgl`, `@tensorflow/tfjs-backend-cpu`) for modular dependency usage.
- Introduced GPU-accelerated batch distance calculations in `distance.ts` with appropriate error handling.
- Applied consistent formatting to improve code readability and maintainability while adhering to project style guidelines.
Refactored worker script initialization in `src/utils/workerUtils.ts` by introducing global variables for safer script execution. Applied consistent formatting adjustments, including removal of redundant semicolons, to improve code readability and maintainability without altering functionality.
Integrated `calculateDistancesWithGPU` for GPU-accelerated distance calculations, optimizing performance for compute-intensive tasks. Introduced robust error handling for GPU failures with automatic fallback to threaded or sequential CPU calculations. Enhanced code structure and readability with consistent formatting adjustments.
Applied consistent formatting adjustments across `src/brainyData.ts`, including line breaks, parentheses, and object destructuring. These changes enhance code readability, maintainability, and alignment with the project's style guidelines without altering functionality.
Applied consistent formatting adjustments throughout `src/index.ts`, including line breaks, object destructuring, and type exports. Improved code readability and alignment with project style guidelines. These changes maintain existing functionality without introducing behavioral changes.
Applied consistent formatting adjustments, including line breaks, parentheses, and object destructuring. These changes enhance code readability and maintainability while preserving existing functionality.
Applied consistent formatting to align with the project's style guidelines, including adjustments to line breaks, parentheses, and object destructuring. These changes enhance code readability and maintainability without altering functionality.
Made code more concise by removing unnecessary semicolons and adjusting the code formatting to align with the project's style. Improved readability and maintainability.