Skip to content
/ occa Public
forked from libocca/occa

Portable Approach for Parallel Architectures

License

Notifications You must be signed in to change notification settings

v-dobrev/occa

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
  • 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/1_add_vectors/cpp
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

Portable Approach for Parallel Architectures

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 93.3%
  • C 4.6%
  • Shell 1.1%
  • Other 1.0%