vikunja
Vikunja is a performance portable algorithm 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. Vikunja uses alpaka to implement platform-independent primitives such as reduce or transform.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.7%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Vikunja is a performance portable algorithm 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. Vikunja uses alpaka to implement platform-independent primitives such as reduce or transform.
Basic Info
- Host: GitHub
- Owner: alpaka-group
- License: mpl-2.0
- Language: C++
- Default Branch: master
- Homepage: https://vikunja.readthedocs.io/en/latest/
- Size: 684 KB
Statistics
- Stars: 16
- Watchers: 9
- Forks: 5
- Open Issues: 26
- Releases: 1
Topics
Metadata Files
README.md
Vikunja

Vikunja is a performance portable algorithm 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.
Vikunja uses alpaka to implement platform-independent primitives such as reduce or transform.
Installation
Install Alpaka
Alpaka requires a boost installation.
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 repository. It is recommended to use the latest release version. Vikunja supports alpaka from version 0.6 up to version 0.8.
Install Vikunja
bash
git clone https://github.com/alpaka-group/vikunja.git
mkdir vikunja/build
cd vikunja/build
cmake ..
cmake --install .
Build and Run Tests
bash
cd vikunja/build
cmake .. -DBUILD_TESTING=ON
ctest
Enable Examples
bash
cmake .. -Dvikunja_BUILD_EXAMPLES=ON
Examples can be found in the folder example/.
Getting Started
The following source code shows an application that uses vikunja to replace all values in a vector with their absolute values.
```c++
include
include
include
include
include
int main() { // Define the accelerator. // The accelerator decides on which processor type the vikunja algorithm will be executed. // The accelerators must be enabled during the CMake configuration to be available. // // It is possible to choose from a set of accelerators: // - AccGpuCudaRt // - AccGpuHipRt // - AccCpuThreads // - AccCpuFibers // - AccCpuOmp2Threads // - AccCpuOmp2Blocks // - AccOmp5 // - AccCpuTbbBlocks // - AccCpuSerial using Acc = alpaka::AccCpuOmp2Blocksalpaka::DimInt<1u, int>;
// Create a device that executes the algorithm.
// For example, it can be a CPU or GPU Nr. 0 or 1 in a multi-GPU system.
auto const devAcc = alpaka::getDevByIdx<Acc>(0u);
// The host device is required if the devAcc does not use the same memory as the host.
// For example, if the host is a CPU and the device is a GPU.
auto const devHost(alpaka::getDevByIdx<alpaka::PltfCpu>(0u));
// All algorithms must be enqueued so that they are executed in the correct order.
using QueueAcc = alpaka::Queue<Acc, alpaka::Blocking>;
QueueAcc queueAcc(devAcc);
// Dimension of the problem. 1D in this case (inherited from the Accelerator).
using Dim = alpaka::Dim<Acc>;
// The index type needs to fit the problem size.
// A smaller index type can reduce the execution time.
// In this case the index type is inherited from the Accelerator: std::uint64_t.
using Idx = alpaka::Idx<Acc>;
// Type of the user data.
using Data = int;
// The extent stores the problem size.
using Vec = alpaka::Vec<Dim, Idx>;
Vec extent(Vec::all(static_cast<Idx>(10)));
// Allocate memory for the device.
auto deviceMem(alpaka::allocBuf<Data, Idx>(devAcc, extent));
// The memory is accessed via a pointer.
Data* deviceNativePtr = alpaka::getPtrNative(deviceMem);
// Allocate memory for the host.
auto hostMem(alpaka::allocBuf<Data, Idx>(devHost, extent));
Data* hostNativePtr = alpaka::getPtrNative(hostMem);
// Initialize the host memory with random values from -10 to 10.
std::uniform_int_distribution<Data> distribution(-10, 10);
std::default_random_engine generator;
std::generate(
hostNativePtr,
hostNativePtr + extent.prod(),
[&distribution, &generator]() { return distribution(generator); });
// Copy data to the device.
alpaka::memcpy(queueAcc, deviceMem, hostMem, extent);
// Use a lambda function to define the transformation function.
// Returns the absolute value of each input
auto abs = [] ALPAKA_FN_HOST_ACC(auto const& acc, Data const j) { return alpaka::math::abs(acc, j); };
vikunja::transform::deviceTransform<Acc>(
devAcc, // The device that executes the algorithm.
queueAcc, // Queue in which the algorithm is enqueued.
extent.prod(), // Problem size
deviceNativePtr, // Input memory
deviceNativePtr, // Operator
abs);
// Copy data to the host.
alpaka::memcpy(queueAcc, hostMem, deviceMem, extent);
for(Data i = 0; i < extent.prod(); ++i)
{
std::cout << hostNativePtr[i] << " ";
}
std::cout << std::endl;
return 0;
} ```
CMakeLists.txt
```cmake cmakeminimumrequired(VERSION 3.18) project(vikunjaAbs)
add_subdirectory(vikunja REQUIRED)
alpakaaddexecutable(${CMAKEPROJECTNAME} main.cpp) targetlinklibraries(${CMAKEPROJECTNAME} PRIVATE vikunja::vikunja) ```
Build instructions: ```bash
the source folder contains the main.cpp and the CMakeLists.txt
cd
configure build with OpenMP backend enabled
cmake .. -DALPAKAACCCPUBOMP2TSEQ_ENABLE=ON
compile application
cmake --build .
run application
./vikunjaAbs # output: 10 8 5 1 1 6 10 4 4 9 ```
Documentation
- 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
Authors
Maintainers* and Core Developers
- Simeon Ehrig*
Former Members, Contributions and Thanks
- Dr. Michael Bussmann
- Hauke Mewes
- René Widera
- Bernhard Manfred Gruber
- Jan Stephan
- Dr. Jiří Vyskočil
- Matthias Werner
Owner
- Name: alpaka
- Login: alpaka-group
- Kind: organization
- Location: Dresden, Germany
- Website: http://www.hzdr.de/crp
- Repositories: 9
- Profile: https://github.com/alpaka-group
Abstraction Library for Parallel Kernel Acceleration
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: vikunja
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Hauke
family-names: Mewes
email: haukemewes@gmail.com
affiliation: Helmholtz-Zentrum Dresden-Rossendorf
- given-names: Simeon
family-names: Ehrig
email: s.ehrig@hzdr.de
affiliation: Helmholtz-Zentrum Dresden-Rossendorf
orcid: 'https://orcid.org/0000-0002-8218-3116'
repository-code: 'https://github.com/alpaka-group/vikunja'
url: 'https://vikunja.readthedocs.io/en/latest/'
abstract: >-
Vikunja is a performance portable algorithm 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. Vikunja uses alpaka to
implement platform-independent primitives such as reduce
or transform.
keywords:
- HPC
- C++
- heterogeneous computing
- performance portability
- standard algorithm
license: MPL-2.0
commit: '529e933'
version: 0.1.0
date-released: '2021-01-13'
GitHub Events
Total
Last Year
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Hauke Mewes | h****s@g****m | 119 |
| Simeon Ehrig | s****g@h****e | 99 |
| Third Party | v****a@h****e | 3 |
| René Widera | r****a@h****e | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 69
- Total pull requests: 104
- Average time to close issues: 3 months
- Average time to close pull requests: 12 days
- Total issue authors: 2
- Total pull request authors: 5
- Average comments per issue: 1.23
- Average comments per pull request: 1.1
- Merged pull requests: 82
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: about 6 hours
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- SimeonEhrig (30)
- DerWaldschrat (13)
Pull Request Authors
- SimeonEhrig (51)
- AntonReinhard (2)
- taniakrisanty (1)
- victorjunaidy (1)
- psychocoderHPC (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- allpairspy ==2.5.0
- alpaka-job-coverage >=1.2.0
- pyaml *
- typeguard *
- types-PyYAML *
- Sphinx ==4.3.2
- sphinx-rtd-theme *