Skip to content
JIT Compilation for Multiple Architectures: C++, OpenMP, CUDA, HIP, OpenCL, Metal
C++ C Shell Objective-C++ Makefile Python
Branch: master
Clone or download
dmed256 #246 [OKL] Adds @directive preprocessor attribute
[OKL] Adds @directive preprocessor attribute
Latest commit 25841d5 Aug 9, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github [Github] Updates pull request template Aug 1, 2019
bin [Metal] Backend skeleton compiles Jul 6, 2019
examples [OKL] INLINE_OKL -> OCCA_JIT Jul 10, 2019
include [Tokenizer] Handles unpaired quotes better Aug 9, 2019
scripts soname changes for libocca.so Aug 2, 2019
src [Preprocessor] Adds @directive error tests Aug 9, 2019
tests [Preprocessor] Adds @directive error tests Aug 9, 2019
.codecov.yml
.gitignore [Refactor] Moved runtime scripts into include Sep 9, 2018
.travis.yml [Metal] Adds XCode version check Jul 9, 2019
LICENSE [License] Updated 2018 -> 2019 Feb 17, 2019
Makefile [OKL] Adds @directive attribute Aug 8, 2019
README.md [Metal] Started Metal backend based on OpenCL Jul 6, 2019

README.md

occa

 

Build Status codecov.io Gitter

 

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, 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)
You can’t perform that action at this time.