Skip to content

Instantly share code, notes, and snippets.

@oodler577
oodler577 / pi.c
Created May 14, 2021 04:52 — forked from bbengfort/pi.c
OpenMP parallel integration to compute Pi.
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#define MAX_THREADS 8
static long steps = 1000000000;
double step;
int main (int argc, const char *argv[]) {