filename stringlengths 19 182 | omp_pragma_line stringlengths 24 416 | context_chars int64 100 100 | text stringlengths 152 177k |
|---|---|---|---|
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE | 100 | k - 1) * size + i];
}
}
else if (restk == 5)
{
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
y_data[i] += + alpha[k - 5] * x_data[(k - 5) * size + i] + alpha[k - 4] * x_data[(k - 4) * size + i]
+ alpha[k - 3] * x_data[(k - 3) * size + i] + alpha[k - 2] * x_data[(k - 2) * size + i]
+ alpha[k - 1] * x_data[(k - 1) * size + i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE | 100 | }
else if (restk == 6)
{
jstart = (k - 6) * size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
y_data[i] += alpha[k - 6] * x_data[jstart + i] + alpha[k - 5] * x_data[jstart + i + size]
+ alpha[k - 4] * x_data[(k - 4) * size + i] + alpha[k - 3] * x_data[(k - 3) * size + i]
+ alpha[k - 2] * x_data[(k - 2) * size + i] + alpha[k - 1] * x_data[(k - 1) * size + i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE | 100 | }
else if (restk == 7)
{
jstart = (k - 7) * size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
y_data[i] += alpha[k - 7] * x_data[jstart + i] + alpha[k - 6] * x_data[jstart + i + size]
+ alpha[k - 5] * x_data[(k - 5) * size + i] + alpha[k - 4] * x_data[(k - 4) * size + i]
+ alpha[k - 3] * x_data[(k - 3) * size + i] + alpha[k - 2] * x_data[(k - 2) * size + i]
+ alpha[k - 1] * x_data[(k - 1) * size + i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE | 100 | 0; j < k - 3; j += 4)
{
jstart = j * size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
y_data[i] += alpha[j] * x_data[jstart + i] + alpha[j + 1] * x_data[jstart + i + size]
+ alpha[j + 2] * x_data[(j + 2) * size + i] + alpha[j + 3] * x_data[(j + 3) * size + i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE | 100 | }
}
if (restk == 1)
{
jstart = (k - 1) * size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
y_data[i] += alpha[k - 1] * x_data[jstart + i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE | 100 | }
else if (restk == 2)
{
jstart = (k - 2) * size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
y_data[i] += alpha[k - 2] * x_data[jstart + i] + alpha[k - 1] * x_data[jstart + size + i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE | 100 | }
else if (restk == 3)
{
jstart = (k - 3) * size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
y_data[i] += alpha[k - 3] * x_data[jstart + i] + alpha[k - 2] * x_data[jstart + size + i] + alpha[k
- 1] *
x_data[(k - 1) * size + i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE | 100 | or (j = 0; j < k; j++)
{
jstart = j * size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
y_data[i] += alpha[j] * x_data[jstart + i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res1,res2,res3,res4,res5,res6,res7,res8) HYPRE_SMP_SCHEDULE | 100 | tart6 = jstart5 + size;
jstart7 = jstart6 + size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res1 += hypre_conj(y_data[jstart + i]) * x_data[i];
res2 += hypre_conj(y_data[jstart1 + i]) * x_data[i];
res3 += hypre_conj(y_data[jstart2 + i]) * x_data[i];
res4 += hypre_conj(y_data[jstart3 + i]) * x_data[i];
res5 += hypre_conj(y_data[jstart4 + i]) * x_data[i];
res6 += hypre_conj(y_data[jstart5 + i]) * x_data[i];
res7 += hypre_conj(y_data[jstart6 + i]) * x_data[i];
res8 += hypre_conj(y_data[jstart7 + i]) * x_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res1,res2,res3,res4,res5,res6,res7,res8) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res1) HYPRE_SMP_SCHEDULE | 100 | stk == 1)
{
res1 = 0;
jstart = (k - 1) * size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res1 += hypre_conj(y_data[jstart + i]) * x_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res1) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res1,res2) HYPRE_SMP_SCHEDULE | 100 | jstart = (k - 2) * size;
jstart1 = jstart + size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res1 += hypre_conj(y_data[jstart + i]) * x_data[i];
res2 += hypre_conj(y_data[jstart1 + i]) * x_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res1,res2) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res1,res2,res3) HYPRE_SMP_SCHEDULE | 100 | jstart1 = jstart + size;
jstart2 = jstart1 + size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res1 += hypre_conj(y_data[jstart + i]) * x_data[i];
res2 += hypre_conj(y_data[jstart1 + i]) * x_data[i];
res3 += hypre_conj(y_data[jstart2 + i]) * x_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res1,res2,res3) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res1,res2,res3,res4) HYPRE_SMP_SCHEDULE | 100 | jstart2 = jstart1 + size;
jstart3 = jstart2 + size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res1 += hypre_conj(y_data[jstart + i]) * x_data[i];
res2 += hypre_conj(y_data[jstart1 + i]) * x_data[i];
res3 += hypre_conj(y_data[jstart2 + i]) * x_data[i];
res4 += hypre_conj(y_data[jstart3 + i]) * x_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res1,res2,res3,res4) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res1,res2,res3,res4,res5) HYPRE_SMP_SCHEDULE | 100 | jstart3 = jstart2 + size;
jstart4 = jstart3 + size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res1 += hypre_conj(y_data[jstart + i]) * x_data[i];
res2 += hypre_conj(y_data[jstart1 + i]) * x_data[i];
res3 += hypre_conj(y_data[jstart2 + i]) * x_data[i];
res4 += hypre_conj(y_data[jstart3 + i]) * x_data[i];
res5 += hypre_conj(y_data[jstart4 + i]) * x_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res1,res2,res3,res4,res5) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res1,res2,res3,res4,res5,res6) HYPRE_SMP_SCHEDULE | 100 | jstart4 = jstart3 + size;
jstart5 = jstart4 + size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res1 += hypre_conj(y_data[jstart + i]) * x_data[i];
res2 += hypre_conj(y_data[jstart1 + i]) * x_data[i];
res3 += hypre_conj(y_data[jstart2 + i]) * x_data[i];
res4 += hypre_conj(y_data[jstart3 + i]) * x_data[i];
res5 += hypre_conj(y_data[jstart4 + i]) * x_data[i];
res6 += hypre_conj(y_data[jstart5 + i]) * x_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res1,res2,res3,res4,res5,res6) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res1,res2,res3,res4,res5,res6,res7) HYPRE_SMP_SCHEDULE | 100 | jstart5 = jstart4 + size;
jstart6 = jstart5 + size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res1 += hypre_conj(y_data[jstart + i]) * x_data[i];
res2 += hypre_conj(y_data[jstart1 + i]) * x_data[i];
res3 += hypre_conj(y_data[jstart2 + i]) * x_data[i];
res4 += hypre_conj(y_data[jstart3 + i]) * x_data[i];
res5 += hypre_conj(y_data[jstart4 + i]) * x_data[i];
res6 += hypre_conj(y_data[jstart5 + i]) * x_data[i];
res7 += hypre_conj(y_data[jstart6 + i]) * x_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res1,res2,res3,res4,res5,res6,res7) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res1,res2,res3,res4) HYPRE_SMP_SCHEDULE | 100 | tart2 = jstart1 + size;
jstart3 = jstart2 + size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res1 += hypre_conj(y_data[jstart + i]) * x_data[i];
res2 += hypre_conj(y_data[jstart1 + i]) * x_data[i];
res3 += hypre_conj(y_data[jstart2 + i]) * x_data[i];
res4 += hypre_conj(y_data[jstart3 + i]) * x_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res1,res2,res3,res4) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res1) HYPRE_SMP_SCHEDULE | 100 | stk == 1)
{
res1 = 0;
jstart = (k - 1) * size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res1 += hypre_conj(y_data[jstart + i]) * x_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res1) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res1,res2) HYPRE_SMP_SCHEDULE | 100 | jstart = (k - 2) * size;
jstart1 = jstart + size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res1 += hypre_conj(y_data[jstart + i]) * x_data[i];
res2 += hypre_conj(y_data[jstart1 + i]) * x_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res1,res2) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res1,res2,res3) HYPRE_SMP_SCHEDULE | 100 | jstart1 = jstart + size;
jstart2 = jstart1 + size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res1 += hypre_conj(y_data[jstart + i]) * x_data[i];
res2 += hypre_conj(y_data[jstart1 + i]) * x_data[i];
res3 += hypre_conj(y_data[jstart2 + i]) * x_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res1,res2,res3) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res_x1,res_x2,res_x3,res_x4,res_x5,res_x6,res_x7,res_x8,res_y1,res_y2,res_y3,res_y4,res_y5,res_y6,res_y7,res_y8) HYPRE_SMP_SCHEDULE | 100 | tart6 = jstart5 + size;
jstart7 = jstart6 + size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res_x1 += hypre_conj(z_data[jstart + i]) * x_data[i];
res_y1 += hypre_conj(z_data[jstart + i]) * y_data[i];
res_x2 += hypre_conj(z_data[jstart1 + i]) * x_data[i];
res_y2 += hypre_conj(z_data[jstart1 + i]) * y_data[i];
res_x3 += hypre_conj(z_data[jstart2 + i]) * x_data[i];
res_y3 += hypre_conj(z_data[jstart2 + i]) * y_data[i];
res_x4 += hypre_conj(z_data[jstart3 + i]) * x_data[i];
res_y4 += hypre_conj(z_data[jstart3 + i]) * y_data[i];
res_x5 += hypre_conj(z_data[jstart4 + i]) * x_data[i];
res_y5 += hypre_conj(z_data[jstart4 + i]) * y_data[i];
res_x6 += hypre_conj(z_data[jstart5 + i]) * x_data[i];
res_y6 += hypre_conj(z_data[jstart5 + i]) * y_data[i];
res_x7 += hypre_conj(z_data[jstart6 + i]) * x_data[i];
res_y7 += hypre_conj(z_data[jstart6 + i]) * y_data[i];
res_x8 += hypre_conj(z_data[jstart7 + i]) * x_data[i];
res_y8 += hypre_conj(z_data[jstart7 + i]) * y_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res_x1,res_x2,res_x3,res_x4,res_x5,res_x6,res_x7,res_x8,res_y1,res_y2,res_y3,res_y4,res_y5,res_y6,res_y7,res_y8) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res_x1,res_y1) HYPRE_SMP_SCHEDULE | 100 | res_x1 = 0;
res_y1 = 0;
jstart = (k - 1) * size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res_x1 += hypre_conj(z_data[jstart + i]) * x_data[i];
res_y1 += hypre_conj(z_data[jstart + i]) * y_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res_x1,res_y1) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res_x1,res_x2,res_y1,res_y2) HYPRE_SMP_SCHEDULE | 100 | jstart = (k - 2) * size;
jstart1 = jstart + size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res_x1 += hypre_conj(z_data[jstart + i]) * x_data[i];
res_y1 += hypre_conj(z_data[jstart + i]) * y_data[i];
res_x2 += hypre_conj(z_data[jstart1 + i]) * x_data[i];
res_y2 += hypre_conj(z_data[jstart1 + i]) * y_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res_x1,res_x2,res_y1,res_y2) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res_x1,res_x2,res_x3,res_y1,res_y2,res_y3) HYPRE_SMP_SCHEDULE | 100 | jstart1 = jstart + size;
jstart2 = jstart1 + size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res_x1 += hypre_conj(z_data[jstart + i]) * x_data[i];
res_y1 += hypre_conj(z_data[jstart + i]) * y_data[i];
res_x2 += hypre_conj(z_data[jstart1 + i]) * x_data[i];
res_y2 += hypre_conj(z_data[jstart1 + i]) * y_data[i];
res_x3 += hypre_conj(z_data[jstart2 + i]) * x_data[i];
res_y3 += hypre_conj(z_data[jstart2 + i]) * y_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res_x1,res_x2,res_x3,res_y1,res_y2,res_y3) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res_x1,res_x2,res_x3,res_x4,res_y1,res_y2,res_y3,res_y4) HYPRE_SMP_SCHEDULE | 100 | jstart2 = jstart1 + size;
jstart3 = jstart2 + size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res_x1 += hypre_conj(z_data[jstart + i]) * x_data[i];
res_y1 += hypre_conj(z_data[jstart + i]) * y_data[i];
res_x2 += hypre_conj(z_data[jstart1 + i]) * x_data[i];
res_y2 += hypre_conj(z_data[jstart1 + i]) * y_data[i];
res_x3 += hypre_conj(z_data[jstart2 + i]) * x_data[i];
res_y3 += hypre_conj(z_data[jstart2 + i]) * y_data[i];
res_x4 += hypre_conj(z_data[jstart3 + i]) * x_data[i];
res_y4 += hypre_conj(z_data[jstart3 + i]) * y_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res_x1,res_x2,res_x3,res_x4,res_y1,res_y2,res_y3,res_y4) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res_x1,res_x2,res_x3,res_x4,res_x5,res_y1,res_y2,res_y3,res_y4,res_y5) HYPRE_SMP_SCHEDULE | 100 | jstart3 = jstart2 + size;
jstart4 = jstart3 + size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res_x1 += hypre_conj(z_data[jstart + i]) * x_data[i];
res_y1 += hypre_conj(z_data[jstart + i]) * y_data[i];
res_x2 += hypre_conj(z_data[jstart1 + i]) * x_data[i];
res_y2 += hypre_conj(z_data[jstart1 + i]) * y_data[i];
res_x3 += hypre_conj(z_data[jstart2 + i]) * x_data[i];
res_y3 += hypre_conj(z_data[jstart2 + i]) * y_data[i];
res_x4 += hypre_conj(z_data[jstart3 + i]) * x_data[i];
res_y4 += hypre_conj(z_data[jstart3 + i]) * y_data[i];
res_x5 += hypre_conj(z_data[jstart4 + i]) * x_data[i];
res_y5 += hypre_conj(z_data[jstart4 + i]) * y_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res_x1,res_x2,res_x3,res_x4,res_x5,res_y1,res_y2,res_y3,res_y4,res_y5) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res_x1,res_x2,res_x3,res_x4,res_x5,res_x6,res_y1,res_y2,res_y3,res_y4,res_y5,res_y6) HYPRE_SMP_SCHEDULE | 100 | jstart4 = jstart3 + size;
jstart5 = jstart4 + size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res_x1 += hypre_conj(z_data[jstart + i]) * x_data[i];
res_y1 += hypre_conj(z_data[jstart + i]) * y_data[i];
res_x2 += hypre_conj(z_data[jstart1 + i]) * x_data[i];
res_y2 += hypre_conj(z_data[jstart1 + i]) * y_data[i];
res_x3 += hypre_conj(z_data[jstart2 + i]) * x_data[i];
res_y3 += hypre_conj(z_data[jstart2 + i]) * y_data[i];
res_x4 += hypre_conj(z_data[jstart3 + i]) * x_data[i];
res_y4 += hypre_conj(z_data[jstart3 + i]) * y_data[i];
res_x5 += hypre_conj(z_data[jstart4 + i]) * x_data[i];
res_y5 += hypre_conj(z_data[jstart4 + i]) * y_data[i];
res_x6 += hypre_conj(z_data[jstart5 + i]) * x_data[i];
res_y6 += hypre_conj(z_data[jstart5 + i]) * y_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res_x1,res_x2,res_x3,res_x4,res_x5,res_x6,res_y1,res_y2,res_y3,res_y4,res_y5,res_y6) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res_x1,res_x2,res_x3,res_x4,res_x5,res_x6,res_x7,res_y1,res_y2,res_y3,res_y4,res_y5,res_y6,res_y7) HYPRE_SMP_SCHEDULE | 100 | jstart5 = jstart4 + size;
jstart6 = jstart5 + size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res_x1 += hypre_conj(z_data[jstart + i]) * x_data[i];
res_y1 += hypre_conj(z_data[jstart + i]) * y_data[i];
res_x2 += hypre_conj(z_data[jstart1 + i]) * x_data[i];
res_y2 += hypre_conj(z_data[jstart1 + i]) * y_data[i];
res_x3 += hypre_conj(z_data[jstart2 + i]) * x_data[i];
res_y3 += hypre_conj(z_data[jstart2 + i]) * y_data[i];
res_x4 += hypre_conj(z_data[jstart3 + i]) * x_data[i];
res_y4 += hypre_conj(z_data[jstart3 + i]) * y_data[i];
res_x5 += hypre_conj(z_data[jstart4 + i]) * x_data[i];
res_y5 += hypre_conj(z_data[jstart4 + i]) * y_data[i];
res_x6 += hypre_conj(z_data[jstart5 + i]) * x_data[i];
res_y6 += hypre_conj(z_data[jstart5 + i]) * y_data[i];
res_x7 += hypre_conj(z_data[jstart6 + i]) * x_data[i];
res_y7 += hypre_conj(z_data[jstart6 + i]) * y_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res_x1,res_x2,res_x3,res_x4,res_x5,res_x6,res_x7,res_y1,res_y2,res_y3,res_y4,res_y5,res_y6,res_y7) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res_x1,res_x2,res_x3,res_x4,res_y1,res_y2,res_y3,res_y4) HYPRE_SMP_SCHEDULE | 100 | tart2 = jstart1 + size;
jstart3 = jstart2 + size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res_x1 += hypre_conj(z_data[jstart + i]) * x_data[i];
res_y1 += hypre_conj(z_data[jstart + i]) * y_data[i];
res_x2 += hypre_conj(z_data[jstart1 + i]) * x_data[i];
res_y2 += hypre_conj(z_data[jstart1 + i]) * y_data[i];
res_x3 += hypre_conj(z_data[jstart2 + i]) * x_data[i];
res_y3 += hypre_conj(z_data[jstart2 + i]) * y_data[i];
res_x4 += hypre_conj(z_data[jstart3 + i]) * x_data[i];
res_y4 += hypre_conj(z_data[jstart3 + i]) * y_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res_x1,res_x2,res_x3,res_x4,res_y1,res_y2,res_y3,res_y4) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res_x1,res_y1) HYPRE_SMP_SCHEDULE | 100 | res_x1 = 0;
res_y1 = 0;
jstart = (k - 1) * size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res_x1 += hypre_conj(z_data[jstart + i]) * x_data[i];
res_y1 += hypre_conj(z_data[jstart + i]) * y_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res_x1,res_y1) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res_x1,res_x2,res_y1,res_y2) HYPRE_SMP_SCHEDULE | 100 | jstart = (k - 2) * size;
jstart1 = jstart + size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res_x1 += hypre_conj(z_data[jstart + i]) * x_data[i];
res_y1 += hypre_conj(z_data[jstart + i]) * y_data[i];
res_x2 += hypre_conj(z_data[jstart1 + i]) * x_data[i];
res_y2 += hypre_conj(z_data[jstart1 + i]) * y_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res_x1,res_x2,res_y1,res_y2) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res_x1,res_x2,res_x3,res_y1,res_y2,res_y3) HYPRE_SMP_SCHEDULE | 100 | jstart1 = jstart + size;
jstart2 = jstart1 + size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res_x1 += hypre_conj(z_data[jstart + i]) * x_data[i];
res_y1 += hypre_conj(z_data[jstart + i]) * y_data[i];
res_x2 += hypre_conj(z_data[jstart1 + i]) * x_data[i];
res_y2 += hypre_conj(z_data[jstart1 + i]) * y_data[i];
res_x3 += hypre_conj(z_data[jstart2 + i]) * x_data[i];
res_y3 += hypre_conj(z_data[jstart2 + i]) * y_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res_x1,res_x2,res_x3,res_y1,res_y2,res_y3) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res) HYPRE_SMP_SCHEDULE | 100 | j++)
{
res = 0;
jstart = j * size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res += hypre_conj(y_data[jstart + i]) * x_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res) HYPRE_SMP_SCHEDULE<OMP-END> |
hypre-space/hypre/src/seq_mv/vector_batched.c | #pragma omp parallel for private(i) reduction(+:res_x,res_y) HYPRE_SMP_SCHEDULE | 100 | res_y = 0; //result_y[j];
jstart = j * size;
#if defined(HYPRE_USING_OPENMP)
<LOOP-START>for (i = 0; i < size; i++)
{
res_x += hypre_conj(z_data[jstart + i]) * x_data[i];
res_y += hypre_conj(z_data[jstart + i]) * y_data[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for private(i) reduction(+:res_x,res_y) HYPRE_SMP_SCHEDULE<OMP-END> |
chiao45/mgmetis/mgmetis/src/metis/GKlib/csr.c | #pragma omp parallel for if (ptr[n] > OMPMINOPS) schedule(static) | 100 | eak;
default:
gk_errexit(SIGERR, "Invalid sum type of %d.\n", what);
return;
}
<LOOP-START>for (i=0; i<n; i++)
sums[i] = gk_fsum(ptr[i+1]-ptr[i], val+ptr[i], 1);
}
/*************************************************************************/
/*! Computes the squared of the norms of the rows/columns
\param mat the matrix itself,
\param what is either GK_CSR_ROW or GK_CSR_COL indicating which
squared norms to compute.
*/
/**************************************************************************/
void gk_csr_ComputeSquaredNorms(gk_csr_t *mat, int what)
{
ssize_t i;
int n;
ssize_t *ptr;
float *val, *norms;
switch (what) {
case GK_CSR_ROW:
n = mat->nrows;
ptr = mat->rowptr;
val = mat->rowval;
if (mat->rnorms) gk_free((void **)&mat->rnorms, LTERM);
norms = mat->rnorms = gk_fsmalloc(n, 0, "gk_csr_ComputeSums: norms");
break;
case GK_CSR_COL:
n = mat->ncols;
ptr = mat->colptr;
val = mat->colval;
if (mat->cnorms) gk_free((void **)&mat->cnorms, LTERM);
norms = mat->cnorms = gk_fsmalloc(n, 0, "gk_csr_ComputeSums: norms");
break;
default:
gk_errexit(SIGERR, "Invalid norm type of %d.\n", what);
return;
}
#pragma omp parallel for if (ptr[n] > OMPMINOPS) schedule(static)
for (i=0; i<n; i++)
norms[i] = gk_fdot(ptr[i+1]-ptr[i], val+ptr[i], 1, val+ptr[i], 1);
}<LOOP-END> <OMP-START>#pragma omp parallel for if (ptr[n] > OMPMINOPS) schedule(static)<OMP-END> |
chiao45/mgmetis/mgmetis/src/metis/GKlib/csr.c | #pragma omp parallel for if (ptr[n] > OMPMINOPS) schedule(static) | 100 | ak;
default:
gk_errexit(SIGERR, "Invalid norm type of %d.\n", what);
return;
}
<LOOP-START>for (i=0; i<n; i++)
norms[i] = gk_fdot(ptr[i+1]-ptr[i], val+ptr[i], 1, val+ptr[i], 1);
}
/*************************************************************************/
/*! Computes the similarity between two rows/columns
\param mat the matrix itself. The routine assumes that the indices
are sorted in increasing order.
\param i1 is the first row/column,
\param i2 is the second row/column,
\param what is either GK_CSR_ROW or GK_CSR_COL indicating the type of
objects between the similarity will be computed,
\param simtype is the type of similarity and is one of GK_CSR_COS,
GK_CSR_JAC, GK_CSR_MIN, GK_CSR_AMIN
\returns the similarity between the two rows/columns.
*/
/**************************************************************************/
float gk_csr_ComputeSimilarity(gk_csr_t *mat, int i1, int i2, int what, int simtype)
{
int nind1, nind2;
int *ind1, *ind2;
float *val1, *val2, stat1, stat2, sim;
switch (what) {
case GK_CSR_ROW:
if (!mat->rowptr)
gk_errexit(SIGERR, "Row-based view of the matrix does not exists.\n");
nind1 = mat->rowptr[i1+1]-mat->rowptr[i1];
nind2 = mat->rowptr[i2+1]-mat->rowptr[i2];
ind1 = mat->rowind + mat->rowptr[i1];
ind2 = mat->rowind + mat->rowptr[i2];
val1 = mat->rowval + mat->rowptr[i1];
val2 = mat->rowval + mat->rowptr[i2];
break;
case GK_CSR_COL:
if (!mat->colptr)
gk_errexit(SIGERR, "Column-based view of the matrix does not exists.\n");
nind1 = mat->colptr[i1+1]-mat->colptr[i1];
nind2 = mat->colptr[i2+1]-mat->colptr[i2];
ind1 = mat->colind + mat->colptr[i1];
ind2 = mat->colind + mat->colptr[i2];
val1 = mat->colval + mat->colptr[i1];
val2 = mat->colval + mat->colptr[i2];
break;
default:
gk_errexit(SIGERR, "Invalid index type of %d.\n", what);
return 0.0;
}
switch (simtype) {
case GK_CSR_COS:
case GK_CSR_JAC:
sim = stat1 = stat2 = 0.0;
i1 = i2 = 0;
while (i1<nind1 && i2<nind2) {
if (i1 == nind1) {
stat2 += val2[i2]*val2[i2];
i2++;
}
else if (i2 == nind2) {
stat1 += val1[i1]*val1[i1];
i1++;
}
else if (ind1[i1] < ind2[i2]) {
stat1 += val1[i1]*val1[i1];
i1++;
}
else if (ind1[i1] > ind2[i2]) {
stat2 += val2[i2]*val2[i2];
i2++;
}
else {
sim += val1[i1]*val2[i2];
stat1 += val1[i1]*val1[i1];
stat2 += val2[i2]*val2[i2];
i1++;
i2++;
}
}
if (simtype == GK_CSR_COS)
sim = (stat1*stat2 > 0.0 ? sim/sqrt(stat1*stat2) : 0.0);
else
sim = (stat1+stat2-sim > 0.0 ? sim/(stat1+stat2-sim) : 0.0);
break;
case GK_CSR_MIN:
sim = stat1 = stat2 = 0.0;
i1 = i2 = 0;
while (i1<nind1 && i2<nind2) {
if (i1 == nind1) {
stat2 += val2[i2];
i2++;
}
else if (i2 == nind2) {
stat1 += val1[i1];
i1++;
}
else if (ind1[i1] < ind2[i2]) {
stat1 += val1[i1];
i1++;
}
else if (ind1[i1] > ind2[i2]) {
stat2 += val2[i2];
i2++;
}
else {
sim += gk_min(val1[i1],val2[i2]);
stat1 += val1[i1];
stat2 += val2[i2];
i1++;
i2++;
}
}
sim = (stat1+stat2-sim > 0.0 ? sim/(stat1+stat2-sim) : 0.0);
break;
case GK_CSR_AMIN:
sim = stat1 = stat2 = 0.0;
i1 = i2 = 0;
while (i1<nind1 && i2<nind2) {
if (i1 == nind1) {
stat2 += val2[i2];
i2++;
}
else if (i2 == nind2) {
stat1 += val1[i1];
i1++;
}
else if (ind1[i1] < ind2[i2]) {
stat1 += val1[i1];
i1++;
}
else if (ind1[i1] > ind2[i2]) {
stat2 += val2[i2];
i2++;
}
else {
sim += gk_min(val1[i1],val2[i2]);
stat1 += val1[i1];
stat2 += val2[i2];
i1++;
i2++;
}
}
sim = (stat1 > 0.0 ? sim/stat1 : 0.0);
break;
default:
gk_errexit(SIGERR, "Unknown similarity measure %d\n", simtype);
return -1;
}
return sim;
}<LOOP-END> <OMP-START>#pragma omp parallel for if (ptr[n] > OMPMINOPS) schedule(static)<OMP-END> |
stefanomoriconi/libmpMuelMat/C-libs/mp_comp_MM_polarim_Params.c | #pragma omp parallel for | 100 | double *Mdelta_in,
int *idx_in, int *numel_in )
{
int m = 16;
<LOOP-START>for (int i=0; i<numel_in[0]; ++i) // for each pixel
{
compute_Diatt_Params( MD_in[idx_in[i]*m+4], MD_in[idx_in[i]*m+8], MD_in[idx_in[i]*m+12],
&totD_out[idx_in[i]], &linD_out[idx_in[i]], &oriD_out[idx_in[i]], &cirD_out[idx_in[i]] ); //t12,t13,t14 (TRANSPOSED)
compute_Retard_Params( MR_in[idx_in[i]*m+0] , MR_in[idx_in[i]*m+4] , MR_in[idx_in[i]*m+8] , MR_in[idx_in[i]*m+12],
MR_in[idx_in[i]*m+1] , MR_in[idx_in[i]*m+5] , MR_in[idx_in[i]*m+9] , MR_in[idx_in[i]*m+13],
MR_in[idx_in[i]*m+2] , MR_in[idx_in[i]*m+6] , MR_in[idx_in[i]*m+10], MR_in[idx_in[i]*m+14],
MR_in[idx_in[i]*m+3] , MR_in[idx_in[i]*m+7] , MR_in[idx_in[i]*m+11], MR_in[idx_in[i]*m+15],
&totR_out[idx_in[i]] , &linR_out[idx_in[i]] , &cirR_out[idx_in[i]],
&oriR_out[idx_in[i]] , &oriRfull_out[idx_in[i]]); // (TRANSPOSED)
totP_out[idx_in[i]] = compute_Depol_Params( Mdelta_in[idx_in[i]*m+5],
Mdelta_in[idx_in[i]*m+10],
Mdelta_in[idx_in[i]*m+15] ); // d22,d33,d44
}<LOOP-END> <OMP-START>#pragma omp parallel for <OMP-END> |
stefanomoriconi/libmpMuelMat/C-libs/mp_comp_MM_AIW.c | #pragma omp parallel for | 100 | , double *I_in , double *W_in ,
int *idx_in, int *numel_in )
{
int m = 16;
<LOOP-START>for (int i=0; i<numel_in[0]; ++i) // for each pixel
{
// Components MUST be Transposed!
compute_M_AIW( A_in[idx_in[i]*m+0] , A_in[idx_in[i]*m+4] , A_in[idx_in[i]*m+8] , A_in[idx_in[i]*m+12],
A_in[idx_in[i]*m+1] , A_in[idx_in[i]*m+5] , A_in[idx_in[i]*m+9] , A_in[idx_in[i]*m+13],
A_in[idx_in[i]*m+2] , A_in[idx_in[i]*m+6] , A_in[idx_in[i]*m+10] , A_in[idx_in[i]*m+14],
A_in[idx_in[i]*m+3] , A_in[idx_in[i]*m+7] , A_in[idx_in[i]*m+11] , A_in[idx_in[i]*m+15],
I_in[idx_in[i]*m+0] , I_in[idx_in[i]*m+4] , I_in[idx_in[i]*m+8] , I_in[idx_in[i]*m+12],
I_in[idx_in[i]*m+1] , I_in[idx_in[i]*m+5] , I_in[idx_in[i]*m+9] , I_in[idx_in[i]*m+13],
I_in[idx_in[i]*m+2] , I_in[idx_in[i]*m+6] , I_in[idx_in[i]*m+10] , I_in[idx_in[i]*m+14],
I_in[idx_in[i]*m+3] , I_in[idx_in[i]*m+7] , I_in[idx_in[i]*m+11] , I_in[idx_in[i]*m+15],
W_in[idx_in[i]*m+0] , W_in[idx_in[i]*m+4] , W_in[idx_in[i]*m+8] , W_in[idx_in[i]*m+12],
W_in[idx_in[i]*m+1] , W_in[idx_in[i]*m+5] , W_in[idx_in[i]*m+9] , W_in[idx_in[i]*m+13],
W_in[idx_in[i]*m+2] , W_in[idx_in[i]*m+6] , W_in[idx_in[i]*m+10] , W_in[idx_in[i]*m+14],
W_in[idx_in[i]*m+3] , W_in[idx_in[i]*m+7] , W_in[idx_in[i]*m+11] , W_in[idx_in[i]*m+15],
&M_out[idx_in[i]*m+0] , &M_out[idx_in[i]*m+4] , &M_out[idx_in[i]*m+8] , &M_out[idx_in[i]*m+12],
&M_out[idx_in[i]*m+1] , &M_out[idx_in[i]*m+5] , &M_out[idx_in[i]*m+9] , &M_out[idx_in[i]*m+13],
&M_out[idx_in[i]*m+2] , &M_out[idx_in[i]*m+6] , &M_out[idx_in[i]*m+10] , &M_out[idx_in[i]*m+14],
&M_out[idx_in[i]*m+3] , &M_out[idx_in[i]*m+7] , &M_out[idx_in[i]*m+11] , &M_out[idx_in[i]*m+15] );
}<LOOP-END> <OMP-START>#pragma omp parallel for <OMP-END> |
stefanomoriconi/libmpMuelMat/C-libs/mp_comp_MM_AIW.c | #pragma omp parallel for (parallel) | 100 | +3] , &M_out[idx_in[i]*m+7] , &M_out[idx_in[i]*m+11] , &M_out[idx_in[i]*m+15] );
} // End of <LOOP-START>#pragma omp parallel for
for (int i=0; i<numel_in[0]; ++i) // for each pixel
{
nM_out[idx_in[i]*m+0] = 1.0;
nM_out[idx_in[i]*m+1] = M_out[idx_in[i]*m+1] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+2] = M_out[idx_in[i]*m+2] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+3] = M_out[idx_in[i]*m+3] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+4] = M_out[idx_in[i]*m+4] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+5] = M_out[idx_in[i]*m+5] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+6] = M_out[idx_in[i]*m+6] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+7] = M_out[idx_in[i]*m+7] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+8] = M_out[idx_in[i]*m+8] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+9] = M_out[idx_in[i]*m+9] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+10] = M_out[idx_in[i]*m+10] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+11] = M_out[idx_in[i]*m+11] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+12] = M_out[idx_in[i]*m+12] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+13] = M_out[idx_in[i]*m+13] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+14] = M_out[idx_in[i]*m+14] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+15] = M_out[idx_in[i]*m+15] / M_out[idx_in[i]*m+0];
}<LOOP-END> <OMP-START>#pragma omp parallel for (parallel)<OMP-END> |
stefanomoriconi/libmpMuelMat/C-libs/mp_comp_MM_AIW.c | #pragma omp parallel for | 100 | dx_in[i]*m+11] , &M_out[idx_in[i]*m+15] );
} // End of #pragma omp parallel for (parallel)
<LOOP-START>for (int i=0; i<numel_in[0]; ++i) // for each pixel
{
nM_out[idx_in[i]*m+0] = 1.0;
nM_out[idx_in[i]*m+1] = M_out[idx_in[i]*m+1] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+2] = M_out[idx_in[i]*m+2] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+3] = M_out[idx_in[i]*m+3] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+4] = M_out[idx_in[i]*m+4] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+5] = M_out[idx_in[i]*m+5] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+6] = M_out[idx_in[i]*m+6] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+7] = M_out[idx_in[i]*m+7] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+8] = M_out[idx_in[i]*m+8] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+9] = M_out[idx_in[i]*m+9] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+10] = M_out[idx_in[i]*m+10] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+11] = M_out[idx_in[i]*m+11] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+12] = M_out[idx_in[i]*m+12] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+13] = M_out[idx_in[i]*m+13] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+14] = M_out[idx_in[i]*m+14] / M_out[idx_in[i]*m+0];
nM_out[idx_in[i]*m+15] = M_out[idx_in[i]*m+15] / M_out[idx_in[i]*m+0];
}<LOOP-END> <OMP-START>#pragma omp parallel for <OMP-END> |
stefanomoriconi/libmpMuelMat/C-libs/mp_comp_MM_eig_REls.c | #pragma omp parallel for | 100 | ueller Matrix coefficients as input! i.e. m11 equal to 1.0 everywhere
int l = 4;
int m = 16;
<LOOP-START>for (int i=0; i<numel_in[0]; ++i) // for each pixel
{
comp_MM_eig_REls( &elsR_out[idx_in[i]*l+0] , &elsR_out[idx_in[i]*l+1] , &elsR_out[idx_in[i]*l+2] , &elsR_out[idx_in[i]*l+3],
&elsRmsk_out[idx_in[i]] ,
&M_in[idx_in[i]*m+0] , &M_in[idx_in[i]*m+1] , &M_in[idx_in[i]*m+2] , &M_in[idx_in[i]*m+3],
&M_in[idx_in[i]*m+4] , &M_in[idx_in[i]*m+5] , &M_in[idx_in[i]*m+6] , &M_in[idx_in[i]*m+7],
&M_in[idx_in[i]*m+8] , &M_in[idx_in[i]*m+9] , &M_in[idx_in[i]*m+10] , &M_in[idx_in[i]*m+11],
&M_in[idx_in[i]*m+12] , &M_in[idx_in[i]*m+13] , &M_in[idx_in[i]*m+14] , &M_in[idx_in[i]*m+15],
nMag, elsR_thr );
}<LOOP-END> <OMP-START>#pragma omp parallel for <OMP-END> |
stefanomoriconi/libmpMuelMat/C-libs/test_openMP.c | #pragma omp parallel for | 100 | openMP()
{
printf(" Testing parallel-computing (openMP) libraries:... \n\n");
printf(" >> ");
<LOOP-START>for (int i=0; i<10; ++i)
{
printf("%d ",i);
}<LOOP-END> <OMP-START>#pragma omp parallel for <OMP-END> |
stefanomoriconi/libmpMuelMat/C-libs/mp_comp_MM_det.c | #pragma omp parallel for | 100 | *NORMALISED* Mueller Matrix coefficients as input! i.e. m11 equal to 1.0 everywhere
int m = 16;
<LOOP-START>for (int i=0; i<numel_in[0]; ++i) // for each pixel
{
compute_det4x4real( &Mdet_out[idx_in[i]],
&M_in[idx_in[i]*m+0] , &M_in[idx_in[i]*m+1] , &M_in[idx_in[i]*m+2] , &M_in[idx_in[i]*m+3],
&M_in[idx_in[i]*m+4] , &M_in[idx_in[i]*m+5] , &M_in[idx_in[i]*m+6] , &M_in[idx_in[i]*m+7],
&M_in[idx_in[i]*m+8] , &M_in[idx_in[i]*m+9] , &M_in[idx_in[i]*m+10] , &M_in[idx_in[i]*m+11],
&M_in[idx_in[i]*m+12], &M_in[idx_in[i]*m+13], &M_in[idx_in[i]*m+14] , &M_in[idx_in[i]*m+15] );
if (Mdet_out[idx_in[i]] < *MdetThr_in)
{MdetMsk_out[idx_in[i]]=0;}
else
{MdetMsk_out[idx_in[i]]=1;}
}<LOOP-END> <OMP-START>#pragma omp parallel for <OMP-END> |
stefanomoriconi/libmpMuelMat/C-libs/mp_comp_MM_pol_LuChipman.c | #pragma omp parallel for | 100 | *NORMALISED* Mueller Matrix coefficients as input! i.e. m11 equal to 1.0 everywhere
int m = 16;
<LOOP-START>for (int i=0; i<numel_in[0]; ++i) // for each pixel
{
// NB: Transposed Components! (MD is symmetric?)
compute_MM_polarLuChipman( M_in[idx_in[i]*m+0], M_in[idx_in[i]*m+4], M_in[idx_in[i]*m+8] , M_in[idx_in[i]*m+12],
M_in[idx_in[i]*m+1], M_in[idx_in[i]*m+5], M_in[idx_in[i]*m+9] , M_in[idx_in[i]*m+13],
M_in[idx_in[i]*m+2], M_in[idx_in[i]*m+6], M_in[idx_in[i]*m+10], M_in[idx_in[i]*m+14],
M_in[idx_in[i]*m+3], M_in[idx_in[i]*m+7], M_in[idx_in[i]*m+11], M_in[idx_in[i]*m+15],
&MD_out[idx_in[i]*m+0] , &MD_out[idx_in[i]*m+4] , &MD_out[idx_in[i]*m+8] , &MD_out[idx_in[i]*m+12],
&MD_out[idx_in[i]*m+1] , &MD_out[idx_in[i]*m+5] , &MD_out[idx_in[i]*m+9] , &MD_out[idx_in[i]*m+13],
&MD_out[idx_in[i]*m+2] , &MD_out[idx_in[i]*m+6] , &MD_out[idx_in[i]*m+10], &MD_out[idx_in[i]*m+14],
&MD_out[idx_in[i]*m+3] , &MD_out[idx_in[i]*m+7] , &MD_out[idx_in[i]*m+11], &MD_out[idx_in[i]*m+15],
&MR_out[idx_in[i]*m+0] , &MR_out[idx_in[i]*m+4] , &MR_out[idx_in[i]*m+8] , &MR_out[idx_in[i]*m+12],
&MR_out[idx_in[i]*m+1] , &MR_out[idx_in[i]*m+5] , &MR_out[idx_in[i]*m+9] , &MR_out[idx_in[i]*m+13],
&MR_out[idx_in[i]*m+2] , &MR_out[idx_in[i]*m+6] , &MR_out[idx_in[i]*m+10], &MR_out[idx_in[i]*m+14],
&MR_out[idx_in[i]*m+3] , &MR_out[idx_in[i]*m+7] , &MR_out[idx_in[i]*m+11], &MR_out[idx_in[i]*m+15],
&Mdelta_out[idx_in[i]*m+0] , &Mdelta_out[idx_in[i]*m+4] , &Mdelta_out[idx_in[i]*m+8] , &Mdelta_out[idx_in[i]*m+12],
&Mdelta_out[idx_in[i]*m+1] , &Mdelta_out[idx_in[i]*m+5] , &Mdelta_out[idx_in[i]*m+9] , &Mdelta_out[idx_in[i]*m+13],
&Mdelta_out[idx_in[i]*m+2] , &Mdelta_out[idx_in[i]*m+6] , &Mdelta_out[idx_in[i]*m+10], &Mdelta_out[idx_in[i]*m+14],
&Mdelta_out[idx_in[i]*m+3] , &Mdelta_out[idx_in[i]*m+7] , &Mdelta_out[idx_in[i]*m+11], &Mdelta_out[idx_in[i]*m+15] );
}<LOOP-END> <OMP-START>#pragma omp parallel for <OMP-END> |
NJU-TJL/OpenMP-MPI_Labs/Lab02/OpenMP/LU_OpenMP.c | #pragma omp parallel for | 100 | /计算L、U矩阵
for (int i = 0; i < N; i++) {
U[i][i] = A[i][i] - sum_i_j_K(i, i, i);
L[i][i] = 1;
<LOOP-START>for (int j = i+1; j < N; j++) {
//按照递推公式进行计算
U[i][j] = A[i][j] - sum_i_j_K(i, j, i);
L[j][i] = (A[j][i] - sum_i_j_K(j, i, i)) / U[i][i];
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
NJU-TJL/OpenMP-MPI_Labs/Lab01/OpenMP/MatrixMtp_OpenMP.c | #pragma omp parallel for | 100 | 线程数
omp_set_num_threads(n_threads);
//计时开始
double ts = omp_get_wtime();
//计算C
<LOOP-START>for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
for (int k = 0; k < n; k++) {
C[i][j] += A[i][k] * B[k][j];
}
}
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
NJU-TJL/OpenMP-MPI_Labs/Lab03/OpenMP/main.c | #pragma omp parallel for | 100 | ARG], &filenames);
// 分配存放所有文件的文档向量的空间
vectors = (int **)calloc(file_count, sizeof(int *));
<LOOP-START>for (int i = 0; i < file_count; ++i) {
vectors[i] = (int *)calloc(dict_size, sizeof(int));
// 读取文件并生成文档向量
make_profile(filenames[i], dict_size, vectors[i]);
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
5uso/HiPGMC/src/gmc_funs.c | #pragma omp parallel for | 100 | olumns vector
double * ssc;
if(!rank) {
ssc = malloc(m.w * sizeof(double));
<LOOP-START>for(int i = 0; i < m.w; i++)
ssc[i] = block_sum_col_sqr(m.data + i, m.h, m.w);
}
// Sequential section, faster on some setups
#ifdef SEQ_SQR
if(rank) return m;
matrix mt = new_matrix(m.w, m.w);
double done = 1.0, dzero = 0.0;
dsyrk_("L", "N", &m.w, &m.h, &done, m.data, &m.w, &dzero, mt.data, &m.w);
#else
// Distribute m
MPI_Bcast(&m, sizeof(matrix), MPI_BYTE, 0, comm);
int nb = BLOCK_SIZE, izero = 0, ione = 1, info;
int mp = numroc_(&m.w, &nb, &blacs_row, &izero, &blacs_height);
int nq = numroc_(&m.h, &nb, &blacs_col, &izero, &blacs_width);
matrix m_local = new_matrix(mp, nq);
gmc_distribute(m.w, m.h, m.data, m_local.data, rank, blacs_width, blacs_height, nb, comm);
arr_desc mlocald, mtlocald;
int lld_local = mp > 1 ? mp : 1;
descinit_(&mlocald, &m.w, &m.h, &nb, &nb, &izero, &izero, &blacs_ctx, &lld_local, &info);
nq = numroc_(&m.w, &nb, &blacs_col, &izero, &blacs_width);
descinit_(&mtlocald, &m.w, &m.w, &nb, &nb, &izero, &izero, &blacs_ctx, &lld_local, &info);
// Compute multiplication by transpose (upper triangular only)
matrix mt_local = new_matrix(mp, nq);
double done = 1.0, dzero = 0.0;
pdsyrk_("L", "N", &m.w, &m.h, &done, m_local.data, &ione, &ione, &mlocald, &dzero, mt_local.data, &ione, &ione, &mtlocald);
free_matrix(m_local);
// Collect mt
matrix mt;
if(!rank) mt = new_matrix(m.w, m.w);
gmc_collect(m.w, m.w, mt_local.data, mt.data, rank, blacs_width, blacs_height, nb, comm);
free_matrix(mt_local);
// Workers can return here
if(rank) return mt;
// Compute final matrix
#pragma omp parallel for
for(long long i = 0; i < m.w; i++) {
mt.data[i * m.w + i] = 0.0;
for(long long j = i + 1; j < m.w; j++) {
double mul = mt.data[i * m.w + j];
mt.data[j * m.w + i] = mt.data[i * m.w + j] = ssc[i] + ssc[j] - 2.0 * mul;
}
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
5uso/HiPGMC/src/gmc_funs.c | #pragma omp parallel for | 100 | // Workers can return here
if(rank) return mt;
#endif
// Compute final matrix
<LOOP-START>for(long long i = 0; i < m.w; i++) {
mt.data[i * m.w + i] = 0.0;
for(long long j = i + 1; j < m.w; j++) {
double mul = mt.data[i * m.w + j];
mt.data[j * m.w + i] = mt.data[i * m.w + j] = ssc[i] + ssc[j] - 2.0 * mul;
}
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
5uso/HiPGMC/src/gmc_scale.c | #pragma omp parallel for | 100 | PI_Bcast(&w, 1, MPI_INT, 0, comm);
MPI_Bcast(&h, 1, MPI_INT, 0, comm);
if(!rank) {
<LOOP-START>for(int r = 0; r < numprocs; r++) {
// Dimensions of r's local matrix
int blacs_col = r / blacs_height;
int blacs_row = r % blacs_height;
long long mp = numroc_(&w, &nb, &blacs_row, &izero, &blacs_height);
long long nq = numroc_(&h, &nb, &blacs_col, &izero, &blacs_width);
long long numbytes = mp * nq * sizeof(double);
// Set up block-cyclic distribution start
long long y = nb * blacs_col, x = (long long) (nb * blacs_row) * sizeof(double);
int y_blk = 0, x_blk = 0;
if(!r) {
// Self: copy into local buffer
_copy_cyclic(w, h, nb, blacs_width, blacs_height, blacs_col, blacs_row, a, b, LLONG_MAX, &y, &y_blk, &x, &x_blk);
continue;
}
// Send to process: split the message in chunks to control max size
double * buf = malloc(_minl(numbytes, MAX_MPI_MSG_BYTES));
for(long long pos = 0; pos < numbytes; pos += MAX_MPI_MSG_BYTES) {
_copy_cyclic(w, h, nb, blacs_width, blacs_height, blacs_col, blacs_row, a, buf, MAX_MPI_MSG_BYTES, &y, &y_blk, &x, &x_blk);
long long amt = _minl(numbytes - pos, MAX_MPI_MSG_BYTES);
MPI_Send(buf, (int) amt, MPI_BYTE, r, 2711, comm);
}
free(buf);
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
5uso/HiPGMC/src/gmc_scale.c | #pragma omp parallel for | 100 | PI_Bcast(&w, 1, MPI_INT, 0, comm);
MPI_Bcast(&h, 1, MPI_INT, 0, comm);
if(!rank) {
<LOOP-START>for(int r = 0; r < numprocs; r++) {
// Dimensions of r's local matrix
int blacs_col = r / blacs_height;
int blacs_row = r % blacs_height;
long long mp = numroc_(&w, &nb, &blacs_row, &izero, &blacs_height);
long long nq = numroc_(&h, &nb, &blacs_col, &izero, &blacs_width);
long long numbytes = mp * nq * sizeof(double);
// Set up block-cyclic distribution start
long long y = nb * blacs_col, x = (long long) (nb * blacs_row) * sizeof(double);
int y_blk = 0, x_blk = 0;
if(!r) {
// Self: place values from local buffer into global matrix
_fill_cyclic(w, h, nb, blacs_width, blacs_height, blacs_col, blacs_row, a, b, LLONG_MAX, &y, &y_blk, &x, &x_blk);
continue;
}
// Receive from process: receive matching chunks and place them into global matrix
double * buf = malloc(_minl(numbytes, MAX_MPI_MSG_BYTES));
for(long long pos = 0; pos < numbytes; pos += MAX_MPI_MSG_BYTES) {
long long amt = _minl(numbytes - pos, MAX_MPI_MSG_BYTES);
MPI_Recv(buf, (int) amt, MPI_BYTE, r, 2712, comm, MPI_STATUS_IGNORE);
_fill_cyclic(w, h, nb, blacs_width, blacs_height, blacs_col, blacs_row, buf, b, MAX_MPI_MSG_BYTES, &y, &y_blk, &x, &x_blk);
}
free(buf);
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
5uso/HiPGMC/src/gmc_scale.c | #pragma omp parallel for | 100 | I_Bcast(&w, 1, MPI_LONG, 0, comm);
MPI_Bcast(&h, 1, MPI_INT, 0, comm);
if(!rank) {
<LOOP-START>for(int r = 0; r < numprocs; r++) {
// Rows assigned to process
long long numrows = h / numprocs + (r < h % numprocs);
long long numbytes = numrows * w;
if(!r) {
// Self: copy directly into local
memcpy(b, a, numbytes);
continue;
}
// Send to process: split message in chunks
void * offset = a + ((long long) (h / numprocs) * (long long) r + _minl(h % numprocs, r)) * w;
for(long long pos = 0; pos < numbytes; pos += MAX_MPI_MSG_BYTES) {
long long amt = _minl(numbytes - pos, MAX_MPI_MSG_BYTES);
MPI_Send(offset + pos, (int) amt, MPI_BYTE, r, 2713, comm);
}
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
5uso/HiPGMC/src/gmc_scale.c | #pragma omp parallel for | 100 | I_Bcast(&w, 1, MPI_LONG, 0, comm);
MPI_Bcast(&h, 1, MPI_INT, 0, comm);
if(!rank) {
<LOOP-START>for(int r = 0; r < numprocs; r++) {
// Rows assigned to process
long long numrows = h / numprocs + (r < h % numprocs);
long long numbytes = numrows * w;
if(!r) {
// Self: copy directly from local
memcpy(b, a, numbytes);
continue;
}
// Receive matching chunks from process
void * offset = b + ((long long) (h / numprocs) * (long long) r + _minl(h % numprocs, r)) * w;
for(long long pos = 0; pos < numbytes; pos += MAX_MPI_MSG_BYTES) {
long long amt = _minl(numbytes - pos, MAX_MPI_MSG_BYTES);
MPI_Recv(offset + pos, (int) amt, MPI_BYTE, r, 2714, comm, MPI_STATUS_IGNORE);
}
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
5uso/HiPGMC/src/gmc.c | #pragma omp parallel for | 100 | nt m, int num) {
for(int v = 0; v < m; v++) {
long long h = X[v].h, w = X[v].w;
<LOOP-START>for(long long x = 0; x < w; x++) {
double mean = 0.0;
for(long long y = 0; y < h; y++) mean += X[v].data[y * w + x];
mean /= h;
double std = 0.0;
for(long long y = 0; y < h; y++) {
double dev = X[v].data[y * w + x] - mean;
std += dev * dev;
}
std /= h - 1;
std = sqrt(std);
if(std == 0) std = EPS;
for(long long y = 0; y < h; y++) X[v].data[y * w + x] = (X[v].data[y * w + x] - mean) / std;
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
5uso/HiPGMC/src/gmc.c | #pragma omp parallel for | 100 | trix(PN + 1, local_ted.h);
int s = displs[rank]; // Start pattern for this process
<LOOP-START>for(long long y = 0; y < pattern_cnts[rank]; y++) {
local_ted.data[y * num + s + y] = INFINITY;
heap h = new_heap(local_ted.data + y * num, PN + 1);
for(long long x = PN + 1; x < num; x++)
if(local_ted.data[y * num + x] < heap_max(h))
replace(&h, local_ted.data + y * num + x);
sums[v * pattern_cnts[rank] + y] = block_sum_ptr(h.data + 1, PN, 0);
double denominator = *h.data[0] * PN - sums[v * pattern_cnts[rank] + y] + EPS;
for(long long i = 0; i < PN + 1; i++) {
sprs_val val = {
.i = h.data[i] - (local_ted.data + y * num),
.value = ((*h.data[0] - *h.data[i]) / denominator) * (i > 0),
};
S0[v].data[y * (PN + 1) + i] = val;
ed[v].data[y * (PN + 1) + i] = *h.data[i];
}
free_heap(h);
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
5uso/HiPGMC/src/gmc.c | #pragma omp parallel for | 100 | s
memset(U.data, 0x00, (long long) num * (long long) pattern_cnts[rank] * sizeof(double));
<LOOP-START>for(long long y = 0; y < pattern_cnts[rank]; y++) {
double sum = 0.0;
for(long long i = 0; i < PN + 1; i++)
for(int v = 0; v < m; v++) {
sprs_val val = S0[v].data[y * (PN + 1) + i];
double t = val.value / m;
U.data[y * num + val.i] += t;
sum += t;
}
for(long long x = 0; x < num; x++) U.data[y * num + x] /= sum;
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
5uso/HiPGMC/src/gmc.c | #pragma omp parallel for | 100 | * sums) {
for(long long v = 0; v < m; v++) {
double weight = w.data[v] * 2.0;
<LOOP-START>for(long long y = 0; y < pattern_cnts[rank]; y++) {
double max = ed[v].data[(PN + 1) * y];
double maxU = U.data[y * num + S0[v].data[(PN + 1) * y].i];
double sumU = 0.0;
for(long long i = 1; i < PN + 1; i++) {
long long x = S0[v].data[y * (PN + 1) + i].i;
sumU += U.data[y * num + x];
}
double numerator = max - weight * maxU;
double denominator = PN * max - sums[v * pattern_cnts[rank] + y] + weight * (sumU - PN * maxU) + EPS;
for(long long i = 0; i < PN + 1; i++) {
long long x = S0[v].data[y * (PN + 1) + i].i;
double r = (numerator - ed[v].data[(PN + 1) * y + i] + weight * U.data[y * num + x]) / denominator;
S0[v].data[y * (PN + 1) + i].value = r * (r > 0.0);
}
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
5uso/HiPGMC/src/gmc.c | #pragma omp parallel for | 100 | .data, U.data, (long long) num * (long long) pattern_cnts[rank] * sizeof(double));
<LOOP-START>for(long long y = 0; y < pattern_cnts[rank]; y++)
for(long long i = 0; i < PN + 1; i++) {
sprs_val val = S0[v].data[y * (PN + 1) + i];
long long x = val.i;
US.data[y * num + x] -= val.value;
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
5uso/HiPGMC/src/gmc.c | #pragma omp parallel for | 100 | ), dist.h, dist.data, local_dist.data, rank, numprocs, comm);
if(!rank) free_matrix(dist);
<LOOP-START>for(long long y = 0; y < pattern_cnts[rank]; y++) {
int qw = 0;
int * idx = malloc((long long) num * sizeof(int));
#ifdef IS_LOCAL
memset(idx, 0x00, (long long) num * sizeof(int));
for(int v = 0; v < m; v++) {
for(long long i = 0; i < PN + 1; i++) {
sprs_val val = S0[v].data[y * (PN + 1) + i];
long long x = val.i;
qw -= idx[x];
idx[x] |= (val.value > 0);
qw += idx[x];
}
}
#else
memset(idx, 0x01, num * sizeof(int));
qw = num;
matrix q = new_matrix(qw, m);
for(long long x = 0, i = 0; x < num; x++) {
if(idx[x]) {
q.data[i] = *lambda * local_dist.data[y * num + x] / (double) m * -0.5;
i++;
idx[x] = i;
}
}
for(long long v = m - 1; v >= 0; v--)
for(long long i = 0; i < qw; i++)
q.data[v * qw + i] = q.data[i] / w.data[v];
for(long long v = m - 1; v >= 0; v--) {
for(long long i = 0; i < PN + 1; i++) {
sprs_val val = S0[v].data[y * (PN + 1) + i];
long long x = val.i;
if(idx[x]) q.data[v * qw + idx[x] - 1] += val.value;
}
}
q = update_u(q);
for(long long x = 0, i = 0; x < num; x++) {
if(idx[x]) {
U.data[y * num + x] = q.data[i];
i++;
} else U.data[y * num + x] = 0.0;
}
free_matrix(q);
free(idx);
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
5uso/HiPGMC/src/gmc.c | #pragma omp parallel for | 100 | C_STEP("End: symU");
bool * adj = malloc((long long) num * (long long) num * sizeof(bool));
<LOOP-START>for(long long j = 0; j < num; j++)
for(long long x = 0; x < j; x++)
adj[j * num + x] = (U.data[j * num + x] != 0.0) || (U.data[x * num + j] != 0.0);
// Final clustering. Find connected components on sU with Tarjan's algorithm
GMC_STEP("End: final clustering");
int * y = malloc((long long) num * sizeof(int));
int cluster_num = connected_comp(adj, y, num);
// Cleanup
GMC_STEP("End: cleanup");
free_matrix(F_old); free(adj);
// Build output struct
gmc_result result;
result.U = U; result.S0 = S0; result.F = F; result.evs = evs; result.y = y; result.n = num; result.m = m;
result.cluster_num = cluster_num; result.iterations = it + 1; result.lambda = lambda;
return result;
}
void free_gmc_result(gmc_result r) {
free_matrix(r.U);
for(int i = 0; i < r.m; i++) free_sparse(r.S0[i]);
free(r.S0);
free_matrix(r.F);
free_matrix(r.evs);
free(r.y);
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
UoB-HPC/miniBUDE/openmp/bude.c | #pragma omp parallel for | 100 | arams.nposes);
for(int p = 0; p < 6; p++){
poses[p] = malloc(sizeof(float) * params.nposes);
<LOOP-START>for(int i = 0; i < params.nposes; i++){
poses[p][i] = params.poses[p][i];
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
UoB-HPC/miniBUDE/openmp/bude.c | #pragma omp parallel for | 100 | for
for(int i = 0; i < params.nposes; i++){
poses[p][i] = params.poses[p][i];
}
}
<LOOP-START>for(int i = 0; i < params.nposes; i++){
buffer[i] = 0.f;
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
UoB-HPC/miniBUDE/openmp/bude.c | #pragma omp parallel for | 100 | }
}
#pragma omp parallel for
for(int i = 0; i < params.nposes; i++){
buffer[i] = 0.f;
}
<LOOP-START>for(int i = 0; i < params.natpro; i++){
protein[i] = params.protein[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
UoB-HPC/miniBUDE/openmp/bude.c | #pragma omp parallel for | 100 | omp parallel for
for(int i = 0; i < params.natpro; i++){
protein[i] = params.protein[i];
}
<LOOP-START>for(int i = 0; i < params.natlig; i++){
ligand[i] = params.ligand[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
UoB-HPC/miniBUDE/openmp/bude.c | #pragma omp parallel for | 100 | a omp parallel for
for(int i = 0; i < params.natlig; i++){
ligand[i] = params.ligand[i];
}
<LOOP-START>for(int i = 0; i < params.ntypes; i++){
forcefield[i] = params.forcefield[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
UoB-HPC/miniBUDE/openmp/bude.c | #pragma omp parallel for | 100 | i = 0; i < params.ntypes; i++){
forcefield[i] = params.forcefield[i];
}
// warm up 1 iter
<LOOP-START>for (unsigned group = 0; group < (params.nposes/WGSIZE); group++)
{
fasten_main(params.natlig, params.natpro, protein, ligand,
poses[0], poses[1], poses[2],
poses[3], poses[4], poses[5],
buffer, forcefield, group);
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
UoB-HPC/miniBUDE/makedeck/main.cpp | #pragma omp parallel for default(none) shared(ligand, protein, ffParams, poses, energies, totalPoses, completed, std::cout) | 100 | chrono::high_resolution_clock::now();
size_t completed = 0;
size_t totalPoses = config.poseSize;
<LOOP-START>for (size_t pose = 0; pose < totalPoses; pose++) {
bude::kernel::fasten_main(
ligand.first.size(), protein.first.size(),
protein.first, ligand.first,
poses.tilt, poses.roll, poses.pan,
poses.xTrans, poses.yTrans, poses.zTrans,
energies, ffParams, pose);
#pragma omp critical
{
completed++;
if (completed % 10 == 0) {
auto pct = static_cast<int>((static_cast<double>(completed) / totalPoses) * 100.0);
std::cout << "["
<< std::string(pct, '|') << std::string(100 - pct, ' ')
<< "] (" << totalPoses << "/" << completed << ") " << pct << "%\r" << std::flush;
}
};
}<LOOP-END> <OMP-START>#pragma omp parallel for default(none) shared(ligand, protein, ffParams, poses, energies, totalPoses, completed, std::cout)<OMP-END> |
ShadenSmith/splatt/src/mttkrp.c | #pragma omp parallel for | 100 | _t const * const restrict bv = B->vals + (r * B->I);
/* stretch out columns of A and B */
<LOOP-START>for(idx_t x=0; x < nnz; ++x) {
scratch[x] = vals[x] * av[indA[x]] * bv[indB[x]];
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
ShadenSmith/splatt/src/sort.c | #pragma omp parallel for schedule(dynamic) | 100 | nnz;
/* for 3/4D, we can use quicksort on only the leftover modes */
if(tt->nmodes == 3) {
<LOOP-START>for(idx_t i = 0; i < nslices; ++i) {
p_tt_quicksort2(tt, cmplt+1, histogram_array[i], histogram_array[i + 1]);
for(idx_t j = histogram_array[i]; j < histogram_array[i + 1]; ++j) {
tt->ind[m][j] = i;
}
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic)<OMP-END> |
ShadenSmith/splatt/src/sort.c | #pragma omp parallel for schedule(dynamic) | 100 | m_array[i + 1]; ++j) {
tt->ind[m][j] = i;
}
}
} else if(tt->nmodes == 4) {
<LOOP-START>for(idx_t i = 0; i < nslices; ++i) {
p_tt_quicksort3(tt, cmplt+1, histogram_array[i], histogram_array[i + 1]);
for(idx_t j = histogram_array[i]; j < histogram_array[i + 1]; ++j) {
tt->ind[m][j] = i;
}
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic)<OMP-END> |
ShadenSmith/splatt/src/sort.c | #pragma omp parallel for schedule(dynamic) | 100 | memmove(cmplt, cmplt+1, (tt->nmodes - 1) * sizeof(*cmplt));
cmplt[tt->nmodes-1] = saved;
<LOOP-START>for(idx_t i = 0; i < nslices; ++i) {
p_tt_quicksort(tt, cmplt, histogram_array[i], histogram_array[i + 1]);
for(idx_t j = histogram_array[i]; j < histogram_array[i + 1]; ++j) {
tt->ind[m][j] = i;
}
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic)<OMP-END> |
ShadenSmith/splatt/src/matrix.c | #pragma omp parallel for schedule(static) | 100 | N = B->J;
idx_t const Na = A->J;
/* tiled matrix multiplication */
idx_t const TILE = 16;
<LOOP-START>for(idx_t i=0; i < M; ++i) {
for(idx_t jt=0; jt < N; jt += TILE) {
for(idx_t kt=0; kt < Na; kt += TILE) {
idx_t const JSTOP = SS_MIN(jt+TILE, N);
for(idx_t j=jt; j < JSTOP; ++j) {
val_t accum = 0;
idx_t const KSTOP = SS_MIN(kt+TILE, Na);
for(idx_t k=kt; k < KSTOP; ++k) {
accum += av[k + (i*Na)] * bv[j + (k*N)];
}
cv[j + (i*N)] += accum;
}
}
}
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static)<OMP-END> |
ShadenSmith/splatt/src/sptensor.c | #pragma omp parallel for schedule(static) | 100 | t(hist, 0, tt->dims[mode] * sizeof(*hist));
idx_t const * const restrict inds = tt->ind[mode];
<LOOP-START>for(idx_t x=0; x < tt->nnz; ++x) {
#pragma omp atomic
++hist[inds[x]];
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static)<OMP-END> |
ShadenSmith/splatt/src/io.c | #pragma omp parallel for schedule(static) | 100 | t read_count = SS_MIN(BUF_LEN, count - n);
fread(ubuf, sizeof(*ubuf), read_count, fin);
<LOOP-START>for(idx_t i=0; i < read_count; ++i) {
buffer[n + i] = ubuf[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static)<OMP-END> |
ShadenSmith/splatt/src/io.c | #pragma omp parallel for schedule(static) | 100 | t read_count = SS_MIN(BUF_LEN, count - n);
fread(ubuf, sizeof(*ubuf), read_count, fin);
<LOOP-START>for(idx_t i=0; i < read_count; ++i) {
buffer[n + i] = ubuf[i];
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static)<OMP-END> |
ShadenSmith/splatt/src/ftensor.c | #pragma omp parallel for reduction(+:nfibs) | 100 | ttinds[nmodes-1][0];
ft->vals[0] = tt->vals[0];
/* count fibers in tt */
idx_t nfibs = 0;
<LOOP-START>for(idx_t n=1; n < nnz; ++n) {
for(idx_t m=0; m < nmodes-1; ++m) {
/* check for new fiber */
if(ttinds[m][n] != ttinds[m][n-1]) {
++nfibs;
break;
}
}
ft->inds[n] = ttinds[nmodes-1][n];
ft->vals[n] = tt->vals[n];
}<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:nfibs)<OMP-END> |
ShadenSmith/splatt/src/csf.c | #pragma omp parallel for schedule(static) | 100 | ices = csf->pt[tile_id].nfibs[0];
idx_t * weights = splatt_malloc(nslices * sizeof(*weights));
<LOOP-START>for(idx_t i=0; i < nslices; ++i) {
weights[i] = p_csf_count_nnz(csf->pt[tile_id].fptr, csf->nmodes, 0, i);
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static)<OMP-END> |
ShadenSmith/splatt/src/csf.c | #pragma omp parallel for schedule(static) | 100 | idx_t const ntiles = csf->ntiles;
idx_t * weights = splatt_malloc(ntiles * sizeof(*weights));
<LOOP-START>for(idx_t i=0; i < ntiles; ++i) {
weights[i] = csf->pt[i].nfibs[nmodes-1];
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static)<OMP-END> |
ShadenSmith/splatt/src/graph.c | #pragma omp parallel for | 100 | er */
case VTX_WT_FIB_NNZ:
hg->vwts = (idx_t *) splatt_malloc(hg->nvtxs * sizeof(idx_t));
<LOOP-START>for(idx_t v=0; v < hg->nvtxs; ++v) {
hg->vwts[v] = ft->fptr[v+1] - ft->fptr[v];
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
ShadenSmith/splatt/src/mpi/mpi_cpd.c | #pragma omp parallel for | 100 | al_t * const restrict gmatv = globalmat->vals;
/* copy my partial products into the sendbuf */
<LOOP-START>for(idx_t s=0; s < rinfo->nlocal2nbr[m]; ++s) {
idx_t const row = local2nbr_inds[s];
for(idx_t f=0; f < nfactors; ++f) {
local2nbr_buf[f + (s*nfactors)] = matv[f + (row*nfactors)];
}
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
ShadenSmith/splatt/src/mpi/mpi_io.c | #pragma omp parallel for schedule(static, 1) | 100 | p_rearrange_medium(
sptensor_t * const ttbuf,
idx_t * * ssizes,
rank_info * const rinfo)
{
<LOOP-START>for(idx_t m=0; m < ttbuf->nmodes; ++m) {
p_find_layer_boundaries(ssizes, m, rinfo);
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static, 1)<OMP-END> |
ShadenSmith/splatt/src/mpi/mpi_io.c | #pragma omp parallel for schedule(static) | 100 | o);
}
/* create partitioning */
int * parts = splatt_malloc(ttbuf->nnz * sizeof(*parts));
<LOOP-START>for(idx_t n=0; n < ttbuf->nnz; ++n) {
parts[n] = mpi_determine_med_owner(ttbuf, n, rinfo);
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static)<OMP-END> |
ShadenSmith/splatt/src/mpi/mpi_io.c | #pragma omp parallel for schedule(static, 1) | 100 | ssizes, rinfo);
/* now map tensor indices to local (layer) coordinates and fill in dims */
<LOOP-START>for(idx_t m=0; m < ttbuf->nmodes; ++m) {
tt->dims[m] = rinfo->layer_ends[m] - rinfo->layer_starts[m];
for(idx_t n=0; n < tt->nnz; ++n) {
assert(tt->ind[m][n] >= rinfo->layer_starts[m]);
assert(tt->ind[m][n] < rinfo->layer_ends[m]);
tt->ind[m][n] -= rinfo->layer_starts[m];
}
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static, 1)<OMP-END> |
ShadenSmith/splatt/src/mpi/mpi_io.c | #pragma omp parallel for schedule(static, 1) | 100 | ry_file(fin, comm);
break;
}
if(rank == 0) {
fclose(fin);
}
/* set dims info */
<LOOP-START>for(idx_t m=0; m < tt->nmodes; ++m) {
idx_t const * const inds = tt->ind[m];
idx_t dim = 1 +inds[0];
for(idx_t n=1; n < tt->nnz; ++n) {
dim = SS_MAX(dim, 1 + inds[n]);
}
tt->dims[m] = dim;
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static, 1)<OMP-END> |
ShadenSmith/splatt/src/mpi/mpi_io.c | #pragma omp parallel for schedule(static) | 100 | tor = mat_rand(rinfo->global_dims[mode], nfactors);
/* copy root's own matrix to output */
<LOOP-START>for(idx_t i=0; i < localdim; ++i) {
idx_t const gi = rinfo->mat_start[mode] + perm->iperms[mode][i];
for(idx_t f=0; f < nfactors; ++f) {
mymat->vals[f + (i*nfactors)] = full_factor->vals[f+(gi*nfactors)];
}
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static)<OMP-END> |
ShadenSmith/splatt/src/mpi/mpi_io.c | #pragma omp parallel for schedule(static) | 100 | ecv(loc_perm, nrows, SPLATT_MPI_IDX, p, 2, rinfo->comm_3d, &status);
/* fill buffer */
<LOOP-START>for(idx_t i=0; i < nrows; ++i) {
idx_t const gi = layerstart + loc_perm[i];
for(idx_t f=0; f < nfactors; ++f) {
vbuf[f + (i*nfactors)] = full_factor->vals[f+(gi*nfactors)];
}
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(static)<OMP-END> |
adammaj1/Mandelbrot-set-with-blended-gradients/src/d.c | #pragma omp parallel for schedule(dynamic) private(ix,iy, i, Cx, Cy) shared(A, ixMax , iyMax) | 100 | coordinate
fprintf(stderr, "compute image CheckOrientation\n");
// for all pixels of image
<LOOP-START>for (iy = iyMin; iy <= iyMax; ++iy){
fprintf (stderr, " %d from %d \r", iy, iyMax); //info
for (ix = ixMin; ix <= ixMax; ++ix){
// from screen to world coordinate
Cy = GiveCy(iy);
Cx = GiveCx(ix);
i = Give_i(ix, iy); /* compute index of 1D array from indices of 2D array */
if (Cx>0 && Cy>0) A[i]=255-A[i]; // check the orientation of Z-plane by marking first quadrant */
}
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic) private(ix,iy, i, Cx, Cy) shared(A, ixMax , iyMax) <OMP-END> |
adammaj1/Mandelbrot-set-with-blended-gradients/src/d.c | #pragma omp parallel for schedule(dynamic) private(ix,iy) shared(A, ixMax , iyMax) | 100 | int ix, iy; // pixel coordinate
//printf("compute image \n");
// for all pixels of image
<LOOP-START>for (iy = iyMin; iy <= iyMax; ++iy){
fprintf (stderr, " %d from %d \r", iy, iyMax); //info
for (ix = ixMin; ix <= ixMax; ++ix)
ComputePoint_dData(A, RepresentationFunction, ix, iy); //
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic) private(ix,iy) shared(A, ixMax , iyMax)<OMP-END> |
adammaj1/Mandelbrot-set-with-blended-gradients/src/d.c | #pragma omp parallel for schedule(dynamic) private(i) shared( D, C, iSize) | 100 | rr, "\nFill_rgbData_from_dData\n");
//printf("compute image \n");
// for all pixels of image
<LOOP-START>for (i = 0; i < iSize; ++i){
//fprintf (stderr, "rgb %d from %d \r", i, iSize); //info
ComputeAndSaveColor(i, D, RepresentationFunction, Gradient, C); //
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic) private(i) shared( D, C, iSize)<OMP-END> |
adammaj1/Mandelbrot-set-with-blended-gradients/src/d.c | #pragma omp parallel for schedule(dynamic) private(i) shared( C1, C2, C, iSize) | 100 | , "\nFill_rgbData_from_2_dData\n");
//printf("compute image \n");
// for all pixels of image
<LOOP-START>for (i = 0; i < iSize; ++i){
ComputeAndSaveBlendColor( C1, C2, Blend, i, C);
}<LOOP-END> <OMP-START>#pragma omp parallel for schedule(dynamic) private(i) shared( C1, C2, C, iSize)<OMP-END> |
trrt-good/NeuralNetworks.c/NeuralNetCPU/neural_net_legacy.c | #pragma omp parallel for | 100 | dense(nnet->weights[0], npl[1], npl[0], inputs, nnet->biases[0], activations[0]);
int i;
// <LOOP-START>for (i = 1; i < LAYERS; i++)
{
nnet_layer_function_dense(nnet->weights[i], npl[i + 1], npl[i], activations[i - 1], nnet->biases[i], activations[i]);
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
trrt-good/NeuralNetworks.c/NeuralNetCPU/neural_net_legacy.c | #pragma omp parallel for | 100 | training_set->num_examples));
for (batch = 0; batch < parallel_batches; batch++)
{
<LOOP-START>for (thread = 0; thread < MAX_THREADS; thread++)
{
for (int nthExample = (batch * MAX_THREADS + thread) * examples_per_thread; nthExample < (batch * MAX_THREADS + thread + 1) * examples_per_thread; nthExample++)
{
nnet_adjust_gradients(nnet, activations[thread], weight_gradients[thread], bias_gradients[thread], weight_product[thread], weight_product_buffer[thread], training_set->inputs[nthExample], training_set->outputs[nthExample]);
}
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
trrt-good/NeuralNetworks.c/NeuralNetCPU/neural_net.c | #pragma omp parallel for | 100 | t->num_examples));
for (batch = 0; batch < parallel_batches; batch++)
{
<LOOP-START>for (thread = 0; thread < MAX_THREADS; thread++)
{
for (int nthExample = (batch * MAX_THREADS + thread) * examples_per_thread; nthExample < (batch * MAX_THREADS + thread + 1) * examples_per_thread; nthExample++)
{
nnet_backprop(nnet, activations[thread], weight_gradients[thread], bias_gradients[thread], chain_rule_vector[thread], math_buffer[thread], training_set->inputs[nthExample], training_set->outputs[nthExample]);
}
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
ENCCS/intermediate-mpi/content/code/day-4/10_integrate-pi/solution/pi-integration.c | #pragma omp parallel for reduction(+:local_pi) | 100 | ntf("rank %d: start=%ld, end=%ld\n", rank, start, end);
double local_pi = 0.0;
long int i;
<LOOP-START>for (i = start; i < end; i++) {
double x = delta_x * ((double)(i) + 0.5);
local_pi += 1.0 / (1.0 + x * x);
}<LOOP-END> <OMP-START>#pragma omp parallel for reduction(+:local_pi)<OMP-END> |
ENCCS/intermediate-mpi/content/code/day-4/01_threading-funneled/threading-funneled.c | #pragma omp parallel for | 100 | tribute each
* iteration to a different thread. */
/* int local_work[] = FIXME; */
<LOOP-START>for (int k = 0; k != 2; k = k + 1)
{
/* compute_row(FIXME, working_data_set, next_working_data_set); */
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
ENCCS/intermediate-mpi/content/code/day-4/01_threading-funneled/threading-funneled.c | #pragma omp parallel for | 100 | ute each
* iteration to a different thread. */
/* int non_local_work[] = FIXME; */
<LOOP-START>for (int k = 0; k != 2; k = k + 1)
{
/* compute_row(FIXME, working_data_set, next_working_data_set); */
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
ENCCS/intermediate-mpi/content/code/day-4/01_threading-funneled/solution/threading-funneled.c | #pragma omp parallel for | 100 | l distribute each
* iteration to a different thread. */
int local_work[] = {2, 3};
<LOOP-START>for (int k = 0; k != 2; k = k + 1)
{
compute_row(local_work[k], working_data_set, next_working_data_set);
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
ENCCS/intermediate-mpi/content/code/day-4/01_threading-funneled/solution/threading-funneled.c | #pragma omp parallel for | 100 | stribute each
* iteration to a different thread. */
int non_local_work[] = {1, 4};
<LOOP-START>for (int k = 0; k != 2; k = k + 1)
{
compute_row(non_local_work[k], working_data_set, next_working_data_set);
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
ENCCS/intermediate-mpi/content/code/day-4/02_threading-multiple/threading-multiple.c | #pragma omp parallel for | 100 | cal computation. OpenMP will distribute each
* iteration to a different thread. */
<LOOP-START>for (int k = 0; k != 2; k = k + 1)
{
compute_row(/* FIXME */);
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
ENCCS/intermediate-mpi/content/code/day-4/02_threading-multiple/threading-multiple.c | #pragma omp parallel for | 100 | * iteration to a different thread. */
int non_local_work[] = /* FIXME */;
<LOOP-START>for (int k = 0; k != 2; k = k + 1)
{
compute_row(/* FIXME */);
}<LOOP-END> <OMP-START>#pragma omp parallel for<OMP-END> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.