Skip to content

paralelodev/protok

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProtoK

ProtoK is a C++ library for quickly prototyping parallel kernels. It uses OpenMP in the background to execute the code in parallel.

The idea is simple: do not write loops, just configure the parallel environment and provide the code instructions that must be executed in parallel. E.g.:

#include <protok.h>

using namespace protok;

int main() {
  int N = 1000;
  int A[1000];
  int B[1000];
  int C[1000];

  // data initialization goes here ...

  compute(
      [&A, &B, &C](int &i) { C[i] = A[i] + B[i]; },
      {.lowerbound = 0, .upperbound = N, .stride = 1, .type = RangeType::SPACE},
      {.Source = ComputingUnit::CPU, .Target = ComputingUnit::THREAD}
      );
}

The development of this library serves as an experimentation ground for the design of the Ptk language. See the example/example.ptk file for a preview of the language.

Feel free to contact the autor if you wish to know more and maybe contribute: paralelodevinfo@gmail.com

About

ProtoK is a C++ library for quick prototyping of parallel kernels

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published