-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor, Optimize, Gradle Version, Documentation, and Tests #172
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…i opt-in - Update systemProp.kotlin_version in gradle.properties to 1.9.0-Beta - Add @OptIn(ExperimentalForeignApi::class) to JniLinAlg, JniMath, and JniStat Updated the Kotlin version to the latest beta, which comes with ExperimentalForeignApi. Include the opt-in flags for JniLinAlg, JniMath, and JniStat to ensure compatibility with the new Kotlin version. This change ensures that the project will have the latest features and improvements from the Kotlin language.
Upgrade Dokka documentation tool from 1.8.10 to 1.8.20 to benefit from the latest features and improvements.
…tters and setters for each type In this commit, all the getter and setter methods were extracted to a new dedicated file to improve code organization and maintainability. Additionally, specific getters and setters were created for each primitive type to avoid boxing and unboxing overhead and improve performance.
Improve code readability and maintainability by removing unused imports, optimizing code structure, and adding comments to the functions in Internals.kt. This also helps provide clear documentation for each function's purpose, parameters, and return values.
- Add and correct "nothing_to_inline" suppress annotations - Add inline comments to some internal functions for better readability - Update function signatures for complexFloatArrayOf to support inline class type - Minor formatting changes
- Improve the implementation and functionality of complex numbers for better performance and efficiency. - Improve code readability and organization, complex numbers-related functions and classes have been separated into individual files. - Add and improved the documentation for complex numbers. This includes adding inline comments to the code, improving existing documentation, and providing usage examples. - Identified and corrected minor issues or bugs found while working on the complex numbers. This ensures the stability and reliability of the functionality.
…rove unit tests Refactor the fitsInFloat function in ComplexDouble.kt for better performance. Update and add new test cases in NativeLinAlgTest.kt and KELinAlgTest.kt for complex number dot product. Replace sqrt with hypot in ComplexFloat.kt for calculating the absolute value. Improve test assertion messages in MathTestUtils.kt.
Replace specific dimension type DN with the generic star projection * in MultiArray getters and setters. This refactoring enables these functions to be more flexible and applicable to any dimension.
- Suppress necessary warnings - Add "forEach" function for MultiIndexProgression - Improve documentation for arithmetic operations on MultiArrays - Refactor internal "commonAssignOp" functions for readability and performance
Upgrade Gradle version from 7.5 to 8.1.1 in gradle-wrapper.properties to leverage new features and performance improvements. Also, remove 'withJava()' calls from multik-kotlin and multik-openblas build scripts as they are not needed for the project.
Add import for NexusPublishExtension and update repository block. This ensures compatibility with the latest Gradle Nexus Publish plugin, providing a more streamlined artifact publishing process.
Remove commented out "TODO" in KEMath.kt, update error messages in io.kt and npy.kt to provide better context, and remove unnecessary commented code from MemoryView.kt. These changes improve code readability and user experience when encountering errors.
Simplify expressions for contentEquals function in ComplexFloatArray and ComplexDoubleArray, improving code readability. The new implementation uses built-in `contentEquals` instead of comparing with `equals`.
- Rename CreateNDArray.kt to constructors.kt for better readability - Change deprecation level from WARNING to ERROR for the empty function to enforce usage of zeros function
Add a TODO comment regarding unchecked cast for the 'ret.asType(a.dtype)' line in the cumSum function.
Add ComplexDouble32 and ComplexDouble64 as supported subclasses for DataType conversion in DataType.kt. Also, add a TODO comment in NDArray.kt to indicate unsafe cast.
- Rename CreateArray2DTest.kt to create2DArray.kt - Refactor tests for the creation of 2D arrays - Include tests for various data types (Byte, Short, Int, Long, Float, Double) - Add test cases for different scenarios (ones filled, identity matrix, from lists/sets/arrays) - Use the 'createAlignedNDArray' method to test for aligned 2D arrays
- The korro plugin has been added to the gradle build in multik-core/build.gradle.kts and its version has been defined in gradle.properties - In addition, the Kotlin version has been updated from 1.9.0-Beta to 1.9.0. - Korro plugin has been integrated to manage the documentation and samples for each code with easier grouping mechanism. It's added to make better grouped documentation and samples. - Kotlin version was updated to keep the project up-to-date with the latest stable version.
- This commit introduces a documentation system for the Multik library - It includes XML files that define build profiles, categories, tree structure, and variables for the documentation. - The documentation tree (.tree) file defines the structure of the documentation. It describes the order and hierarchy of content. - The categories (.list) file will be used to organize content into logical groupings. - Build profiles (.xml) file is used to define variables and settings for the documentation build process. - This setup aims to provide an organized and comprehensive system for the documentation of Multik, making it easier for users to find relevant information about using the library effectively.
- Add test samples for overview - Add image for architecture modules of multik
- This commit added empty files documentation for the Multik library
…documentation for Multik library - Added several kotlin program files to test various operations like arithmetic, array creation/iteration, array size etc. - Modified XML and Markdown files to improve and extend the library documentation structure. - Set up proper hierarchy and added instructions for documentation. This commit significantly boosts the Multik's documentation system, making it more systematic and interactive. It also contains examples of using various methods making it easier for the users to understand its wide range of functionalities.
- Introduced a new SVG image resource in the documentation folder, which will be used as a visual asset in the documentation files. - This image contributes to enhancing user experience and understanding of the content. It provides a graphical addition to the text-based instructions, giving users another way to consume and comprehend the information presented.
- Added comprehensive instructions for integrating Multik into various types of projects, such as regular, multi-platform, and notebook environments. - Added detailed guidance for using Multik with Gradle, including adding the Maven Central Repository, choosing dependencies, and indicating the specific code for Kotlin and Groovy. - Provided specifics for adding Multik to a multiplatform project in common or platform specific blocks. - Included instructions for using Multik in interactive environments like Kotlin-Notebook, Jupyter, or Datalore.
…ultik library - Improved the structure and content of 'overview' and 'supported-platforms' files under docs/topics directory. The intent of these edits is to enrich the overall documentation of Multik library. - In 'overview.md', added web, card, and link summaries; modified comparison between stdlib Kotlin and Multik, updated wording in several sections for clarity. - In 'supported-platforms.md', elaborated on the supported platforms and targets, added details with tables for better understanding. - Added a new documentation file 'engines-of-multik.md' in docs/topics/userGuide directory indicating an addition in the upcoming topics. - Updated the links in 'home.topic' file, as they were linking to non-existent files. Fixed these inaccuracies to avoid confusion among users navigating through the site.
- Added placeholders for the description of several new topics in the Multik library documentation. - In order to improve the structure and the content for future development, I added the placeholders: Performance and Optimization, Indexing and Slicing, Input and Output, Iterating over Arrays, Creating Multidimensional Arrays, Complex Numbers, Type Casting, and many more. - In all these files, I added web, card, and link summaries; they are all marked as TODO for future work. - Along with the new topics, I made substantial modifications to the 'quickstart.md' file in the gettingStarted directory. The changes were made to links that were redirecting to different topics; modified it for better navigation flow.
- Modified the comments in the test cases for the functions 'mk.identity(n)' and 'create array' in create2DArray.kt file. - The previous comments were inaccurate and could potentially bring confusion to future developers working on the code.
The file name 'CreateArray3DTest.kt' was renamed to 'Create3DArray.kt' to better match naming conventions for test files. The test cases were significantly expanded and refactored. This includes adding numerous new test cases for different data types (Byte, Short, Int, Long, Float, and Double) and various test scenarios. Test cases were also organized into various blocks based on data type, with each block including detailed comments explaining what is being tested and why.
Refactored the file 'createArray4DTest' to a new structure to match with the new file standards across the project. Also, the filename was accordingly changed to 'create4DArray'. The previous file contained a single test, which has now been subdivided into individual tests for different scenarios. Additionally, new tests have been added to test more features and functions.
Renames CreateArrayNDTest to createNDArray and expands test cases for NDArray with multiple dimensions. This diverse set of tests check for creation of different data type arrays with various dimensions and validation aspects such as size, values and method consistency. The changes aim for comprehensive testing of NDArray creation scenarios.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a variety of updates to the Multik project, focusing on software upgrades, code refactoring and optimization, and an enhancement of the documentation and tests. Here's a summary of the changes:
Kotlin and Dokka Version Upgrade
Code Refactoring and Optimization
get
andset
#57Documentation System for Multik Library
Expansion and Refactoring of Test Cases
Other Updates
Korro
plugin in multik-core