pachadotdev / cpp11armadillo

The idea is to pass matrices/vectors from R to C++, write pure C++/Armadillo code for the computation, and then export the result back to R with the proper data structures.
http://pacha.dev/cpp11armadillo/
Apache License 2.0
6 stars 0 forks source link

Hacktoberfest 2024 πŸŽ‰ – Contribute to cpp11armadillo! #4

Open pachadotdev opened 2 months ago

pachadotdev commented 2 months ago

Hacktoberfest 2024 πŸŽ‰ – Contribute to cpp11armadillo!

Hello, Hacktoberfest contributors!

This project started as a journey to ensure correctness, and now, as it evolves, I am focusing on optimizing performance.

My current goal is to move data (e.g., vectors and matrices) from R and vice versa in the most efficient possible way without compromising code safety. For example, the current wrapper to copy matrices from C++ to R uses std::memcpy() , but previously it used a double for loop with OMP and added more overhead.

How it is now:

https://github.com/pachadotdev/cpp11armadillo/blob/61905c670d2a8b848b987b58595b34e11c82ffac/inst/include/wrappers/matrices.hpp#L80-L86

How it was before:

https://github.com/pachadotdev/cpp11armadillo/blob/1e3f7ff45aeb9850b511644e0f324c40c238dd22/inst/include/wrappers/matrices.hpp#L80-L87

If you're excited about working on high-performance computing (HPC), multi-threading, or just love to have a convenient set of efficient linear algebra functions in R, this project is for you!

How You Can Contribute

Whether you're a seasoned developer or a newcomer, there are many ways you can help:

  1. Optimize existing code: Dive into areas that could use more efficient algorithms or better resource utilization. If you have an idea to implement or improve parallelization techniques to make the functions more efficient, please send me an issue.
  2. Documentation: Help me to provide useful examples (see https://pacha.dev/cpp11armadillo/articles/usage.html)
  3. Testing: Create or improve test cases to ensure safety when implementing changes.

Hacktoberfest Rules

Let’s make this Hacktoberfest a success and push cpp11armadillo to the next level of performance together! πŸš€

Happy coding! πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»