/[escript]/trunk/escript/src/Data.h
ViewVC logotype

Diff of /trunk/escript/src/Data.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2668 by gross, Thu Sep 17 04:04:09 2009 UTC revision 2716 by jfenwick, Tue Oct 13 04:58:08 2009 UTC
# Line 2411  C_TensorBinaryOperation(Data const &arg_ Line 2411  C_TensorBinaryOperation(Data const &arg_
2411        res.requireWrite();        res.requireWrite();
2412        #pragma omp parallel for private(sampleNo_0,dataPointNo_0) schedule(static)        #pragma omp parallel for private(sampleNo_0,dataPointNo_0) schedule(static)
2413        for (sampleNo_0 = 0; sampleNo_0 < numSamples_0; sampleNo_0++) {        for (sampleNo_0 = 0; sampleNo_0 < numSamples_0; sampleNo_0++) {
2414          for (dataPointNo_0 = 0; dataPointNo_0 < numDataPointsPerSample_0; dataPointNo_0++) {        dataPointNo_0=0;
2415    //        for (dataPointNo_0 = 0; dataPointNo_0 < numDataPointsPerSample_0; dataPointNo_0++) {
2416            int offset_0 = tmp_0->getPointOffset(sampleNo_0,dataPointNo_0);            int offset_0 = tmp_0->getPointOffset(sampleNo_0,dataPointNo_0);
2417            int offset_1 = tmp_1->getPointOffset(sampleNo_0,dataPointNo_0);            int offset_1 = tmp_1->getPointOffset(sampleNo_0,dataPointNo_0);
2418            int offset_2 = tmp_2->getPointOffset(sampleNo_0,dataPointNo_0);            int offset_2 = tmp_2->getPointOffset(sampleNo_0,dataPointNo_0);
2419            const double *ptr_0 = &(arg_0_Z.getDataAtOffsetRO(offset_0));            const double *ptr_0 = &(arg_0_Z.getDataAtOffsetRO(offset_0));
2420            const double *ptr_1 = &(arg_1_Z.getDataAtOffsetRO(offset_1));            const double *ptr_1 = &(arg_1_Z.getDataAtOffsetRO(offset_1));
2421            double *ptr_2 = &(res.getDataAtOffsetRW(offset_2));            double *ptr_2 = &(res.getDataAtOffsetRW(offset_2));
2422            tensor_binary_operation(size0, ptr_0, ptr_1, ptr_2, operation);            tensor_binary_operation(size0*numDataPointsPerSample_0, ptr_0, ptr_1, ptr_2, operation);
2423          }  //       }
2424        }        }
2425    
2426      }      }
# Line 2996  C_TensorUnaryOperation(Data const &arg_0 Line 2997  C_TensorUnaryOperation(Data const &arg_0
2997      int numDataPointsPerSample_0 = arg_0_Z.getNumDataPointsPerSample();      int numDataPointsPerSample_0 = arg_0_Z.getNumDataPointsPerSample();
2998      #pragma omp parallel for private(sampleNo_0,dataPointNo_0) schedule(static)      #pragma omp parallel for private(sampleNo_0,dataPointNo_0) schedule(static)
2999      for (sampleNo_0 = 0; sampleNo_0 < numSamples_0; sampleNo_0++) {      for (sampleNo_0 = 0; sampleNo_0 < numSamples_0; sampleNo_0++) {
3000        for (dataPointNo_0 = 0; dataPointNo_0 < numDataPointsPerSample_0; dataPointNo_0++) {      dataPointNo_0=0;
3001    //      for (dataPointNo_0 = 0; dataPointNo_0 < numDataPointsPerSample_0; dataPointNo_0++) {
3002          int offset_0 = tmp_0->getPointOffset(sampleNo_0,dataPointNo_0);          int offset_0 = tmp_0->getPointOffset(sampleNo_0,dataPointNo_0);
3003          int offset_2 = tmp_2->getPointOffset(sampleNo_0,dataPointNo_0);          int offset_2 = tmp_2->getPointOffset(sampleNo_0,dataPointNo_0);
3004          const double *ptr_0 = &(arg_0_Z.getDataAtOffsetRO(offset_0));          const double *ptr_0 = &(arg_0_Z.getDataAtOffsetRO(offset_0));
3005          double *ptr_2 = &(res.getDataAtOffsetRW(offset_2));          double *ptr_2 = &(res.getDataAtOffsetRW(offset_2));
3006          tensor_unary_operation(size0, ptr_0, ptr_2, operation);          tensor_unary_operation(size0*numDataPointsPerSample_0, ptr_0, ptr_2, operation);
3007        }  //      }
3008      }      }
3009    }    }
3010    else {    else {

Legend:
Removed from v.2668  
changed lines
  Added in v.2716

  ViewVC Help
Powered by ViewVC 1.1.26