/* omp_crc32.c - example OpenMP program that calculates CRC32 * Jon Mayo - 6 Aug 2010 - PUBLIC DOMAIN */ #include #include #define CRCPOLY 0xedb88320UL int main() { unsigned crctab[256]; #pragma omp parallel { int i; #pragma omp for for(i=0;i0;j--) c=c&1?CRCPOLY^(c>>1):c>>1; crctab[i]=c; /* sleep(1); if you have 8 threads then it would take 32 seconds */ } } { int i; for(i=0;i