Skip to content
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

Add initial content to the Sphinx Doc #59

Merged
merged 16 commits into from
Jan 13, 2022
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@
# igonre build and install folder
/build*
/install*

.vscode
13 changes: 1 addition & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ include(CMakeDependentOption)
include(FetchContent)

option(VIKUNJA_BUILD_EXAMPLES "Build the examples" OFF)
option(VIKUNJA_BUILD_DOXYGEN "Build the doxygen documentation" OFF)
option(VIKUNJA_ENABLE_EXTRA_WARNINGS "Enable extra warnings" OFF)
option(BUILD_TESTING "Build the testing tree." OFF)
cmake_dependent_option(VIKUNJA_SYSTEM_CATCH2 "Use your local installation of Catch2 v3" ON BUILD_TESTING OFF)
Expand All @@ -30,7 +29,7 @@ cmake_dependent_option(VIKUNJA_ENABLE_CXX_TEST "Builds test that checks if the C
if(ALPAKA_ACC_GPU_CUDA_ENABLE)
# DEPRECATED: used until alpaka 0.6.x
set(ALPAKA_CUDA_NVCC_EXPT_EXTENDED_LAMBDA ON)
# used with alpaka 0.7.0 and below
# used with alpaka 0.7.0 and later
set(ALPAKA_CUDA_EXPT_EXTENDED_LAMBDA ON)
endif()

Expand Down Expand Up @@ -125,16 +124,6 @@ if(${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME})
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include)

#########################################
############# Documentation #############
#########################################

# Use doxygen for api doc when available.
if(VIKUNJA_BUILD_DOXYGEN)
find_package(Doxygen REQUIRED)
doxygen_add_docs(doc include/)
j-stephan marked this conversation as resolved.
Show resolved Hide resolved
endif()

#########################################
################ Testing ################
#########################################
Expand Down
89 changes: 43 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,32 @@
# Primitives for Alpaka
This contains a `reduce` and a `transform` primitive for Alpaka, both header-only.
Directories:
* `include/vikunja`: The actual code
- `mem/iterator`: Contains a base iterator class and a policy based iterator that can vary the memory access pattern: Either a linear or a grid-striding access is possible.
- `reduce`: Contains the `transform_reduce` and the `reduce` function (the latter is just a convenient wrapper around the former).
+ `detail`: This contains the two possible reduce kernels.
- `transform`: Contains two `transform` variants with one and two input iterators.
+ `detail`: This contains the transform kernel.
- `workdiv`: This contains various working divisions for the different backends.
# Vikunja

[![Build Status](https://gitlab.com/hzdr/crp/vikunja/badges/master/pipeline.svg)](https://gitlab.com/hzdr/crp/vikunja/-/commits/master/)
[![Documentation Status](https://readthedocs.org/projects/vikunja/badge/?version=latest)](https://vikunja.readthedocs.io)
[![Doxygen](https://img.shields.io/badge/API-Doxygen-blue.svg)](https://vikunja.readthedocs.io/en/latest/doxygen/index.html)
[![Language](https://img.shields.io/badge/language-C%2B%2B14-orange.svg)](https://isocpp.org/)
[![Platforms](https://img.shields.io/badge/platform-linux-lightgrey.svg)](https://github.com/alpaka-group/vikunja)
[![License](https://img.shields.io/badge/license-MPL--2.0-blue.svg)](https://www.mozilla.org/en-US/MPL/2.0/)

![vikunja](docs/source/logo/vikunja_logo.png)

Vikunja is a performance portable algorithms library that defines functions operating on ranges of elements for a variety of purposes . It supports the execution on multi core CPUs and various GPUs.
SimeonEhrig marked this conversation as resolved.
Show resolved Hide resolved

Vikunja uses [alpaka](https://github.com/alpaka-group/alpaka) to implement platform independent primitives such as `reduce` or `transform`.
SimeonEhrig marked this conversation as resolved.
Show resolved Hide resolved

# Installation
## Install Alpaka

## Requirements
Alpaka requires a [boost installation](https://github.com/alpaka-group/alpaka#dependencies).

[Alpaka 0.6.0](https://github.com/alpaka-group/alpaka)
```bash
git clone --depth 1 --branch 0.8.0 https://github.com/alpaka-group/alpaka.git
mkdir alpaka/build
cd alpaka/build
cmake ..
cmake --install .
```

For more information, see the [alpaka github](https://github.com/alpaka-group/alpaka) repository. It is recommenced to use the latest release version. Vikunja supports `alpaka` `0.6` up to `0.8`.
SimeonEhrig marked this conversation as resolved.
Show resolved Hide resolved

## Install Vikunja

Expand All @@ -25,54 +38,38 @@ cmake ..
cmake --install .
```

## Enable tests
# Build and Run tests
SimeonEhrig marked this conversation as resolved.
Show resolved Hide resolved

```bash
cd vikunja/build
cmake .. -DBUILD_TESTING=ON
ctest
```

## Enable Examples
# Enable Examples

```bash
cmake .. -Dvikunja_BUILD_EXAMPLES=ON
```
Two small examples can be found in the folder `example/`.

# Using Vikunja in a Project

You need to import vikunja in the `CMakeLists.txt` of your Project to use it.

```
cmake_minimum_required(VERSION 3.15)

set(_TARGET_NAME example)
project(${_TARGET_NAME})

find_package(vikunja REQUIRED)

alpaka_add_executable(${_TARGET_NAME} main.cpp)
target_link_libraries(${_TARGET_NAME}
PUBLIC
vikunja::vikunja
)
```

Vikunja supports `find_package(vikunja)` and `add_subdirectory(/path/to/vikunja)`. Alpaka is a dependency during the configure time of your project. If it is not installed in a default location, you can use the cmake argument `-Dalpaka_DIR=/path/to/alpakaInstall/lib/cmake/alpaka` or the environment variable `ALPAKA_ROOT=/path/to/alpakaInstall/` to find it.
Examples can be found in the folder `example/`.

# Documentation
j-stephan marked this conversation as resolved.
Show resolved Hide resolved

An API documentation can be generated with [doxygen](https://www.doxygen.nl/index.html). Install doxygen and run
- You can find the general documentation here: https://vikunja.readthedocs.io/en/latest/
- You can find the API documentation here: https://vikunja.readthedocs.io/en/latest/doxygen/index.html

```bash
cmake .. -Dvikunja_BUILD_DOXYGEN=ON
cmake --build . -t doc
```
# Authors

The documentation can be found in `build/doc`.
## Maintainers* and Core Developers

# Format the code
- Simeon Ehrig*

The code is formatted with `clang-format-11`.
## Former Members, Contributions and Thanks

* Format a single file with: `clang-format -i --style=file <sourcefile>`
* If you want to format the entire code base execute the following command from alpaka’s top-level directory: `find example include test -name '*.hpp' -o -name '*.cpp' | xargs clang-format -i --style=file`
- Dr. Michael Bussmann
- Hauke Mewes
- René Widera
- Bernhard Manfred Gruber
- Jan Stephan
- Dr. Jiří Vyskočil
- Matthias Werner
Loading