Skip to content

Instantly share code, notes, and snippets.

View danxan's full-sized avatar

Daniel Sander Isaksen danxan

View GitHub Profile
@stormxuwz
stormxuwz / openMP_whileLoop.c
Last active January 12, 2024 10:21
parallel while loop
// This code is from https://www.cac.cornell.edu/VW/OpenMP/whileloop.aspx
#include <omp.h>
#include <stdio.h>
int main(int argc, char **argv)
{
/* OpenMP does not provide a parallel while loop,
so we're going to have to make one ourselves... */
int sj, sstop, tn, tj, tstop;
int foo(int j);