{"id":19262408,"url":"https://github.com/alpaka-group/vikunja","last_synced_at":"2025-07-01T12:37:16.073Z","repository":{"id":41854059,"uuid":"164885057","full_name":"alpaka-group/vikunja","owner":"alpaka-group","description":"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.","archived":false,"fork":false,"pushed_at":"2023-10-10T06:58:58.000Z","size":700,"stargazers_count":14,"open_issues_count":26,"forks_count":5,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-13T00:52:17.935Z","etag":null,"topics":["cmake","cpp","cpp17"],"latest_commit_sha":null,"homepage":"https://vikunja.readthedocs.io/en/latest/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alpaka-group.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-01-09T15:08:42.000Z","updated_at":"2023-12-08T20:01:53.000Z","dependencies_parsed_at":"2024-11-09T19:32:15.055Z","dependency_job_id":"6852c183-6a37-4a16-b0f4-d8d692ef9241","html_url":"https://github.com/alpaka-group/vikunja","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpaka-group%2Fvikunja","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpaka-group%2Fvikunja/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpaka-group%2Fvikunja/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpaka-group%2Fvikunja/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alpaka-group","download_url":"https://codeload.github.com/alpaka-group/vikunja/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250110882,"owners_count":21376547,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmake","cpp","cpp17"],"created_at":"2024-11-09T19:31:26.710Z","updated_at":"2025-04-21T18:31:09.165Z","avatar_url":"https://github.com/alpaka-group.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vikunja\n\n[![Build Status](https://gitlab.com/hzdr/crp/vikunja/badges/master/pipeline.svg)](https://gitlab.com/hzdr/crp/vikunja/-/commits/master/)\n[![Documentation Status](https://readthedocs.org/projects/vikunja/badge/?version=latest)](https://vikunja.readthedocs.io)\n[![Doxygen](https://img.shields.io/badge/API-Doxygen-blue.svg)](https://vikunja.readthedocs.io/en/latest/doxygen/index.html)\n[![Language](https://img.shields.io/badge/language-C%2B%2B17-orange.svg)](https://isocpp.org/)\n[![Platforms](https://img.shields.io/badge/platform-linux-lightgrey.svg)](https://github.com/alpaka-group/vikunja)\n[![License](https://img.shields.io/badge/license-MPL--2.0-blue.svg)](https://www.mozilla.org/en-US/MPL/2.0/)\n\n![vikunja](docs/source/logo/vikunja_logo.png)\n\nVikunja 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.\n\nVikunja uses [alpaka](https://github.com/alpaka-group/alpaka) to implement platform-independent primitives such as `reduce` or `transform`. \n\n# Installation\n## Install Alpaka\n\nAlpaka requires a [boost installation](https://github.com/alpaka-group/alpaka#dependencies).\n\n```bash\ngit clone --depth 1 --branch 0.8.0 https://github.com/alpaka-group/alpaka.git\nmkdir alpaka/build\ncd alpaka/build\ncmake ..\ncmake --install .\n```\n\nFor more information see the [alpaka GitHub](https://github.com/alpaka-group/alpaka) repository. It is recommended to use the latest release version. Vikunja supports `alpaka` from version `0.6` up to version `0.8`.\n\n## Install Vikunja\n\n```bash\ngit clone https://github.com/alpaka-group/vikunja.git\nmkdir vikunja/build\ncd vikunja/build\ncmake ..\ncmake --install .\n```\n\n## Build and Run Tests\n\n```bash\ncd vikunja/build\ncmake .. -DBUILD_TESTING=ON\nctest\n```\n\n## Enable Examples\n\n```bash\ncmake .. -Dvikunja_BUILD_EXAMPLES=ON\n```\nExamples can be found in the folder `example/`.\n\n# Getting Started\n\nThe following source code shows an application that uses vikunja to replace all values in a vector with their absolute values.\n\n```c++\n#include \u003cvikunja/transform/transform.hpp\u003e\n\n#include \u003calpaka/alpaka.hpp\u003e\n\n#include \u003calgorithm\u003e\n#include \u003ciostream\u003e\n#include \u003crandom\u003e\n\n\nint main()\n{\n    // Define the accelerator.\n    // The accelerator decides on which processor type the vikunja algorithm will be executed.\n    // The accelerators must be enabled during the CMake configuration to be available.\n    //\n    // It is possible to choose from a set of accelerators:\n    // - AccGpuCudaRt\n    // - AccGpuHipRt\n    // - AccCpuThreads\n    // - AccCpuFibers\n    // - AccCpuOmp2Threads\n    // - AccCpuOmp2Blocks\n    // - AccOmp5\n    // - AccCpuTbbBlocks\n    // - AccCpuSerial\n    using Acc = alpaka::AccCpuOmp2Blocks\u003calpaka::DimInt\u003c1u\u003e, int\u003e;\n\n    // Create a device that executes the algorithm.\n    // For example, it can be a CPU or GPU Nr. 0 or 1 in a multi-GPU system.\n    auto const devAcc = alpaka::getDevByIdx\u003cAcc\u003e(0u);\n    // The host device is required if the devAcc does not use the same memory as the host.\n    // For example, if the host is a CPU and the device is a GPU.\n    auto const devHost(alpaka::getDevByIdx\u003calpaka::PltfCpu\u003e(0u));\n\n    // All algorithms must be enqueued so that they are executed in the correct order.\n    using QueueAcc = alpaka::Queue\u003cAcc, alpaka::Blocking\u003e;\n    QueueAcc queueAcc(devAcc);\n\n    // Dimension of the problem. 1D in this case (inherited from the Accelerator).\n    using Dim = alpaka::Dim\u003cAcc\u003e;\n    // The index type needs to fit the problem size.\n    // A smaller index type can reduce the execution time.\n    // In this case the index type is inherited from the Accelerator: std::uint64_t.\n    using Idx = alpaka::Idx\u003cAcc\u003e;\n    // Type of the user data.\n    using Data = int;\n\n    // The extent stores the problem size.\n    using Vec = alpaka::Vec\u003cDim, Idx\u003e;\n    Vec extent(Vec::all(static_cast\u003cIdx\u003e(10)));\n\n    // Allocate memory for the device.\n    auto deviceMem(alpaka::allocBuf\u003cData, Idx\u003e(devAcc, extent));\n    // The memory is accessed via a pointer.\n    Data* deviceNativePtr = alpaka::getPtrNative(deviceMem);\n    // Allocate memory for the host.\n    auto hostMem(alpaka::allocBuf\u003cData, Idx\u003e(devHost, extent));\n    Data* hostNativePtr = alpaka::getPtrNative(hostMem);\n\n    // Initialize the host memory with random values from -10 to 10.\n    std::uniform_int_distribution\u003cData\u003e distribution(-10, 10);\n    std::default_random_engine generator;\n    std::generate(\n        hostNativePtr,\n        hostNativePtr + extent.prod(),\n        [\u0026distribution, \u0026generator]() { return distribution(generator); });\n\n    // Copy data to the device.\n    alpaka::memcpy(queueAcc, deviceMem, hostMem, extent);\n\n    // Use a lambda function to define the transformation function.\n    // Returns the absolute value of each input\n    auto abs = [] ALPAKA_FN_HOST_ACC(auto const\u0026 acc, Data const j) { return alpaka::math::abs(acc, j); };\n\n    vikunja::transform::deviceTransform\u003cAcc\u003e(\n        devAcc, // The device that executes the algorithm.\n        queueAcc, // Queue in which the algorithm is enqueued.\n        extent.prod(), // Problem size\n        deviceNativePtr, // Input memory\n        deviceNativePtr, // Operator\n        abs);\n\n    // Copy data to the host.\n    alpaka::memcpy(queueAcc, hostMem, deviceMem, extent);\n\n    for(Data i = 0; i \u003c extent.prod(); ++i)\n    {\n        std::cout \u003c\u003c hostNativePtr[i] \u003c\u003c \" \";\n    }\n    std::cout \u003c\u003c std::endl;\n\n    return 0;\n}\n```\n\nCMakeLists.txt\n\n```cmake\ncmake_minimum_required(VERSION 3.18)\nproject(vikunjaAbs)\n\nadd_subdirectory(vikunja REQUIRED)\n\nalpaka_add_executable(${CMAKE_PROJECT_NAME} main.cpp)\ntarget_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE vikunja::vikunja)\n```\n\nBuild instructions:\n```bash\n# the source folder contains the main.cpp and the CMakeLists.txt\ncd \u003cfolder/with/source/code\u003e\nmkdir build \u0026\u0026 cd build\n# configure build with OpenMP backend enabled\ncmake .. -DALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE=ON\n# compile application\ncmake --build .\n# run application\n./vikunjaAbs # output: 10 8 5 1 1 6 10 4 4 9\n```\n\n# Documentation\n\n- You can find the general documentation here: https://vikunja.readthedocs.io/en/latest/\n- You can find the API documentation here: https://vikunja.readthedocs.io/en/latest/doxygen/index.html\n\n# Authors\n\n## Maintainers* and Core Developers\n\n- Simeon Ehrig*\n\n## Former Members, Contributions and Thanks\n\n- Dr. Michael Bussmann\n- Hauke Mewes\n- René Widera\n- Bernhard Manfred Gruber\n- Jan Stephan\n- Dr. Jiří Vyskočil\n- Matthias Werner\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpaka-group%2Fvikunja","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falpaka-group%2Fvikunja","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpaka-group%2Fvikunja/lists"}