Skip to content
/ OCCA Public
forked from libocca/occa

Mirror of OCCA - Portable Approach for Parallel Architectures. Please use the official repository, https://github.com/libocca/occa, to create issues and pull requests.

License

Notifications You must be signed in to change notification settings

CEED/OCCA

 
 

Repository files navigation

occa

 

Build codecov.io Slack

 

What is OCCA?

In a nutshell, OCCA (like oca-rina) is an open-source library which aims to

  • Make it easy to program different types of devices (e.g. CPU, GPU, FPGA)
  • Provide a unified API for interacting with backend device APIs (e.g. OpenMP, CUDA, HIP, OpenCL, Metal)
  • Use just-in-time compilation to build backend kernels
  • Provide a kernel language, a minor extension to C, to abstract programming for each backend

 

Links

 

Installing

git clone --depth 1 https://github.com/libocca/occa.git
cd occa
make -j 4

 

Environment

Setup environment variables inside the occa directory

Linux

export PATH+=":${PWD}/bin"
export LD_LIBRARY_PATH+=":${PWD}/lib"

Mac OSX

export PATH+=":${PWD}/bin"
export DYLD_LIBRARY_PATH+=":${PWD}/lib"

 

Hello World

cd examples/cpp/1_add_vectors
make
./main

 

CLI

There is an executable occa provided inside bin

> occa --help

Usage: occa COMMAND

Can be used to display information of cache kernels.

Commands:
  autocomplete    Prints shell functions to autocomplete occa
                  commands and arguments
  cache           Cache kernels
  clear           Clears cached files and cache locks
  compile         Compile kernels
  env             Print environment variables used in OCCA
  info            Prints information about available backend modes
  modes           Prints available backend modes
  translate       Translate kernels
  version         Prints OCCA library version

Arguments:
  COMMAND    Command to run

 

Bash Autocomplete

. <(occa autocomplete bash)

About

Mirror of OCCA - Portable Approach for Parallel Architectures. Please use the official repository, https://github.com/libocca/occa, to create issues and pull requests.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 87.9%
  • C 4.1%
  • Fortran 3.9%
  • Shell 1.0%
  • CMake 0.9%
  • Makefile 0.9%
  • Other 1.3%