# Develop a native C++ library on an Arm-based machine

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/cross-platform/matrix/)
- [Laying the foundations](https://learn.arm.com/learning-paths/cross-platform/matrix/1-foundations/)
- [Test the library](https://learn.arm.com/learning-paths/cross-platform/matrix/2-testing/)
- [Start coding](https://learn.arm.com/learning-paths/cross-platform/matrix/3-code-1/)
- [Implement matrix operations](https://learn.arm.com/learning-paths/cross-platform/matrix/4-code-2/)
- [Next Steps](https://learn.arm.com/learning-paths/cross-platform/matrix/_next-steps/)

## About this Learning Path

| Skill level:        | Advanced          |
|---------------------|-------------------|
| Reading time:       | 2 hrs             |
| Last updated:       | 03 Aug 2026       |

| Author:                              | Arnaud de Grandmaison, Arm [GitHub](https://github.com/Arnaud-de-Grandmaison-ARM) [LinkedIn](https://linkedin.com/in/arnauddegrandmaison) |
|--------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|
| Arm IP:                              | [Neoverse](https://support.arm.com/?tab=compute-ip&Product%20Type=Infrastructure%20Processors) [Cortex-A](https://support.arm.com/?tab=compute-ip&Product%20Type=Application%20Processors) |
| Tags:                                | [Performance and Architecture](https://learn.arm.com/tag/performance-and-architecture) [Linux](https://learn.arm.com/tag/linux) [macOS](https://learn.arm.com/tag/macos) [Windows](https://learn.arm.com/tag/windows) [CPP](https://learn.arm.com/tag/cpp) [GCC](https://learn.arm.com/tag/gcc) [Clang](https://learn.arm.com/tag/clang) [CMake](https://learn.arm.com/tag/cmake) [Google Test](https://learn.arm.com/tag/google-test) [Runbook](https://learn.arm.com/tag/runbook) |

### Who is this for?
This is an advanced topic for developers who want to learn how to develop a library in modern C++ on Arm, using matrix processing as an example.

### What will you learn?
Upon completion of this Learning Path, you will be able to:
- Develop a new C++ library.
- Test a C++ library, ensuring it does not regress functionally.

### Prerequisites
Before starting, you will need the following:
- An Arm-based computer running Linux, macOS, or Windows.
- An intermediate understanding of C++ programming.
- A suitable Integrated Development Environment (IDE).
- The [CMake](https://learn.arm.com/install-guides/cmake/) build tool.
- A C++ compiler with C++17 support.
- A build system [GNU Make](https://www.gnu.org/software/make/) or [Ninja](https://ninja-build.org/).
- A documentation generator [Doxygen](https://www.doxygen.nl/).

### Summary
You’ll build and test a modern C++ matrix library on an Arm-based machine with CMake and GoogleTest. First, you’ll configure a C++17 toolchain and add unit tests. Then, you’ll implement matrix construction, assignment, addition, subtraction, and multiplication, keeping traversal separate from data processing. You’ll choose a build system and balance error checking with performance before validating the library with consistent builds and passing tests.

### Frequently asked questions
#### Which C++ compiler should I use and which standard is required?
Use a compiler with C++17 support. Both Clang and GCC work for this Learning Path.

#### Should I use GNU Make or Ninja for the build?
Either GNU Make or Ninja works with CMake. Choose one and use it consistently across builds.

#### What result should I expect after the first build and test run?
Expect the project to build successfully, and the unit tests to run without failures. At this stage, you can construct, assign, and print `Matrix` objects.

#### Which matrix operations do I implement and how should I structure them?
Implement addition, subtraction, and multiplication. Keep traversal separate from data processing so you can compose functionality and test components independently.

#### How should I approach error handling while implementing the library?
Balance safety and performance for your use case. Trusted, curated data can use different checks from untrusted input, so choose the validation level accordingly.
