Merge pull request #1 from justanotherdot/topic/fix-typo

Fix typo on DEFINE in sample code
This commit is contained in:
Nan Xiao 2020-09-02 10:35:04 +08:00 committed by GitHub
commit c25de25edf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,16 +7,16 @@ $ cat sum.c
#include <omp.h>
#define N 100000000
#define THRAED_NUM 8
#define THREAD_NUM 8
int values[N];
int main(void)
{
int sum[THRAED_NUM];
int sum[THREAD_NUM];
#pragma omp parallel for
for (int i = 0; i < THRAED_NUM; i++)
for (int i = 0; i < THREAD_NUM; i++)
{
int local_sum;
for (int j = 0; j < N; j++)