# Contributing to rocRAND #
We welcome contributions to rocRAND. Please follow these details to help ensure your contributions will be successfully accepted.
## Issue Discussion ##
Please use the GitHub Issues tab to notify us of issues.
* Use your best judgement for issue creation. If your issue is already listed, upvote the issue and
comment or post to provide additional details, such as how you reproduced this issue.
* If you're not sure if your issue is the same, err on the side of caution and file your issue.
You can add a comment to include the issue number (and link) for the similar issue. If we evaluate
your issue as being the same as the existing issue, we'll close the duplicate.
* If your issue doesn't exist, use the issue template to file a new issue.
* When filing an issue, be sure to provide as much information as possible, including script output so
we can collect information about your configuration. This helps reduce the time required to
reproduce your issue.
* Check your issue regularly, as we may require additional information to successfully reproduce the
issue.
* You may also open an issue to ask questions to the maintainers about whether a proposed change
meets the acceptance criteria, or to discuss an idea pertaining to the library.
## Acceptance Criteria ##
The rocRAND project provides functions that generate pseudorandom and quasirandom numbers. The rocRAND library is implemented in the [HIP](https://github.com/ROCm/HIP) programming language and optimized for AMD's latest discrete GPUs. It is designed to run on top of AMD's [ROCm](https://rocm.docs.amd.com/) runtime, but it also works on CUDA-enabled GPUs.
Performance and statistical accuracy are important in rocRAND.
To protect against regressions, when a pull request is created, a number of automated checks are run. These checks:
- test the change on various OS platforms (Ubuntu, RHEL, etc.)
- run on different GPU architectures (MI-series, Radeon series cards, etc.)
- run benchmarks to check for performance degredation
In order for change to be accepted:
- it must pass all of the automated checks
- it must undergo a code review
The GitHub "Issues" tab may also be used to discuss ideas surrounding particular features or changes, before raising pull requests.
## Code Structure ##
Library code is located inside the library/ directory. It contains two subdirectories:
* include/ contains header files that can be included in projects using rocRAND.
There is a separate header for each RNG engine and statistical distribution.
* src/ contains the RNG implementations
Other directories in rocRAND include:
* benchmark/ code for benchmarking engines and distributions is located here
* docs/ contains files used to generate the rocRAND API documentation
* python/ contains examples that demonstrate how rocRAND can be loaded and using in Python
* scripts/ contains utility scripts for things like formating code and tuning config
* test/ contains tests for the rocRAND API
* tools/ contains code that helps generate the precomputed constants used by some generators
## Coding Style ##
C and C++ code should be formatted using `clang-format`. Use the clang-format version for Clang 9, which is available in the `/opt/rocm` directory. Please do not use your system's built-in `clang-format`, as this is an older version that will have different results.
To format a file, use:
```
/opt/rocm/hcc/bin/clang-format -style=file -i