Added remarks about loop body

This commit is contained in:
patrick 2024-12-13 01:11:04 +01:00
parent c7bfd4c74f
commit b5beb5d2cd
1 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,4 @@
pkbf - Parallel Kernel Benchmarking Framework # pkbf - Parallel Kernel Benchmarking Framework
This project provides a benchmarking framework for parallel computing kernels, where the execution of the kernels can be parallelized using OpenMP or Eventify to compare both for the FlexFMM collaborative project. This project provides a benchmarking framework for parallel computing kernels, where the execution of the kernels can be parallelized using OpenMP or Eventify to compare both for the FlexFMM collaborative project.
The application is designed to make adding kernels and parallelization strategies as easy as possible. The application is designed to make adding kernels and parallelization strategies as easy as possible.
@ -104,6 +104,8 @@ To add a new kernel to the project, follow these steps:
1. **Define the Kernel**: 1. **Define the Kernel**:
- Open the `src/kernels.cpp` file and scroll to the section where new kernels are registered (around the `initialize_registry` function). - Open the `src/kernels.cpp` file and scroll to the section where new kernels are registered (around the `initialize_registry` function).
- Use the existing kernels (`stream_triad` and `daxpy`) as templates. Create a new kernel by adding a lambda to the `register_kernel` method. - Use the existing kernels (`stream_triad` and `daxpy`) as templates. Create a new kernel by adding a lambda to the `register_kernel` method.
- The number, types and initialization of arguments can be choosen freely.
- Note that you only need to provide the loop body / inner loops of a loop nest. The outer loop with induction variable `int i` is defined as part of the parallelization strategy already.
For example, to add a new **vector product** kernel, you can do the following: For example, to add a new **vector product** kernel, you can do the following: