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

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

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

revision 814 by gross, Wed Aug 23 09:31:10 2006 UTC revision 824 by ksteube, Tue Aug 29 05:22:50 2006 UTC
# Line 2592  escript::C_GeneralTensorProduct(Data& ar Line 2592  escript::C_GeneralTensorProduct(Data& ar
2592    #endif    #endif
2593    
2594    // Interpolate if necessary and find an appropriate function space    // Interpolate if necessary and find an appropriate function space
2595      Data arg_Z;
2596    if (arg_0.getFunctionSpace()!=arg_1.getFunctionSpace()) {    if (arg_0.getFunctionSpace()!=arg_1.getFunctionSpace()) {
2597      if (arg_0.probeInterpolation(arg_1.getFunctionSpace())) {      if (arg_0.probeInterpolation(arg_1.getFunctionSpace())) {
2598        Data arg_0_tmp = arg_0.interpolate(arg_1.getFunctionSpace());        arg_Z = arg_0.interpolate(arg_1.getFunctionSpace());
2599        arg_0=arg_0_tmp;        // arg_0=arg_Z;
2600      }      }
2601      else if (arg_1.probeInterpolation(arg_0.getFunctionSpace())) {      else if (arg_1.probeInterpolation(arg_0.getFunctionSpace())) {
2602        arg_1=arg_1.interpolate(arg_0.getFunctionSpace());        arg_1=arg_1.interpolate(arg_0.getFunctionSpace());
# Line 2605  escript::C_GeneralTensorProduct(Data& ar Line 2606  escript::C_GeneralTensorProduct(Data& ar
2606      }      }
2607    }    }
2608    // Get rank and shape of inputs    // Get rank and shape of inputs
2609    int rank0 = arg_0.getDataPointRank();    int rank0 = arg_Z.getDataPointRank();
2610    int rank1 = arg_1.getDataPointRank();    int rank1 = arg_1.getDataPointRank();
2611    DataArrayView::ShapeType shape0 = arg_0.getDataPointShape();    DataArrayView::ShapeType shape0 = arg_Z.getDataPointShape();
2612    DataArrayView::ShapeType shape1 = arg_1.getDataPointShape();    DataArrayView::ShapeType shape1 = arg_1.getDataPointShape();
2613    
2614    // Prepare for the loops of the product and verify compatibility of shapes    // Prepare for the loops of the product and verify compatibility of shapes
# Line 2654  escript::C_GeneralTensorProduct(Data& ar Line 2655  escript::C_GeneralTensorProduct(Data& ar
2655    
2656    // Define the shape of the output    // Define the shape of the output
2657    DataArrayView::ShapeType shape2;    DataArrayView::ShapeType shape2;
2658    for (int i=0; i<rank0-axis_offset; i++) { shape2.push_back(tmpShape0[i]); } // First part of arg_0    for (int i=0; i<rank0-axis_offset; i++) { shape2.push_back(tmpShape0[i]); } // First part of arg_Z
2659    for (int i=axis_offset; i<rank1; i++)   { shape2.push_back(tmpShape1[i]); } // Last part of arg_1    for (int i=axis_offset; i<rank1; i++)   { shape2.push_back(tmpShape1[i]); } // Last part of arg_1
2660    
2661    // Declare output Data object    // Declare output Data object
2662    Data arg_2;    Data arg_2;
2663    
2664    if      (arg_0.isConstant()   && arg_1.isConstant()) {    if      (arg_Z.isConstant()   && arg_1.isConstant()) {
2665      arg_2 = Data(0.0, shape2, arg_1.getFunctionSpace());    // DataConstant output      arg_2 = Data(0.0, shape2, arg_1.getFunctionSpace());    // DataConstant output
2666      double *ptr_0 = &((arg_0.getPointDataView().getData())[0]);      double *ptr_0 = &((arg_Z.getPointDataView().getData())[0]);
2667      double *ptr_1 = &((arg_1.getPointDataView().getData())[0]);      double *ptr_1 = &((arg_1.getPointDataView().getData())[0]);
2668      double *ptr_2 = &((arg_2.getPointDataView().getData())[0]);      double *ptr_2 = &((arg_2.getPointDataView().getData())[0]);
2669      matrix_matrix_product(SL, SM, SR, ptr_0, ptr_1, ptr_2, transpose);      matrix_matrix_product(SL, SM, SR, ptr_0, ptr_1, ptr_2, transpose);
2670    }    }
2671    else if (arg_0.isConstant()   && arg_1.isTagged()) {    else if (arg_Z.isConstant()   && arg_1.isTagged()) {
2672    
2673      // Prepare the DataConstant input      // Prepare the DataConstant input
2674      DataConstant* tmp_0=dynamic_cast<DataConstant*>(arg_0.borrowData());      DataConstant* tmp_0=dynamic_cast<DataConstant*>(arg_Z.borrowData());
2675      if (tmp_0==0) { throw DataException("GTP Programming error - casting to DataConstant."); }      if (tmp_0==0) { throw DataException("GTP Programming error - casting to DataConstant."); }
2676    
2677      // Borrow DataTagged input from Data object      // Borrow DataTagged input from Data object
# Line 2685  escript::C_GeneralTensorProduct(Data& ar Line 2686  escript::C_GeneralTensorProduct(Data& ar
2686    
2687      // Prepare offset into DataConstant      // Prepare offset into DataConstant
2688      int offset_0 = tmp_0->getPointOffset(0,0);      int offset_0 = tmp_0->getPointOffset(0,0);
2689      double *ptr_0 = &((arg_0.getPointDataView().getData())[offset_0]);      double *ptr_0 = &((arg_Z.getPointDataView().getData())[offset_0]);
2690      // Get the views      // Get the views
2691      DataArrayView view_1 = tmp_1->getDefaultValue();      DataArrayView view_1 = tmp_1->getDefaultValue();
2692      DataArrayView view_2 = tmp_2->getDefaultValue();      DataArrayView view_2 = tmp_2->getDefaultValue();
# Line 2707  escript::C_GeneralTensorProduct(Data& ar Line 2708  escript::C_GeneralTensorProduct(Data& ar
2708      }      }
2709    
2710    }    }
2711    else if (arg_0.isConstant()   && arg_1.isExpanded()) {    else if (arg_Z.isConstant()   && arg_1.isExpanded()) {
2712    
2713      arg_2 = Data(0.0, shape2, arg_1.getFunctionSpace(),true); // DataExpanded output      arg_2 = Data(0.0, shape2, arg_1.getFunctionSpace(),true); // DataExpanded output
2714      DataConstant* tmp_0=dynamic_cast<DataConstant*>(arg_0.borrowData());      DataConstant* tmp_0=dynamic_cast<DataConstant*>(arg_Z.borrowData());
2715      DataExpanded* tmp_1=dynamic_cast<DataExpanded*>(arg_1.borrowData());      DataExpanded* tmp_1=dynamic_cast<DataExpanded*>(arg_1.borrowData());
2716      DataExpanded* tmp_2=dynamic_cast<DataExpanded*>(arg_2.borrowData());      DataExpanded* tmp_2=dynamic_cast<DataExpanded*>(arg_2.borrowData());
2717      if (tmp_0==0) { throw DataException("GTP Programming error - casting to DataConstant."); }      if (tmp_0==0) { throw DataException("GTP Programming error - casting to DataConstant."); }
# Line 2725  escript::C_GeneralTensorProduct(Data& ar Line 2726  escript::C_GeneralTensorProduct(Data& ar
2726        for (dataPointNo_1 = 0; dataPointNo_1 < numDataPointsPerSample_1; dataPointNo_1++) {        for (dataPointNo_1 = 0; dataPointNo_1 < numDataPointsPerSample_1; dataPointNo_1++) {
2727          int offset_1 = tmp_1->getPointOffset(sampleNo_1,dataPointNo_1);          int offset_1 = tmp_1->getPointOffset(sampleNo_1,dataPointNo_1);
2728          int offset_2 = tmp_2->getPointOffset(sampleNo_1,dataPointNo_1);          int offset_2 = tmp_2->getPointOffset(sampleNo_1,dataPointNo_1);
2729          double *ptr_0 = &((arg_0.getPointDataView().getData())[offset_0]);          double *ptr_0 = &((arg_Z.getPointDataView().getData())[offset_0]);
2730          double *ptr_1 = &((arg_1.getPointDataView().getData())[offset_1]);          double *ptr_1 = &((arg_1.getPointDataView().getData())[offset_1]);
2731          double *ptr_2 = &((arg_2.getPointDataView().getData())[offset_2]);          double *ptr_2 = &((arg_2.getPointDataView().getData())[offset_2]);
2732          matrix_matrix_product(SL, SM, SR, ptr_0, ptr_1, ptr_2, transpose);          matrix_matrix_product(SL, SM, SR, ptr_0, ptr_1, ptr_2, transpose);
# Line 2733  escript::C_GeneralTensorProduct(Data& ar Line 2734  escript::C_GeneralTensorProduct(Data& ar
2734      }      }
2735    
2736    }    }
2737    else if (arg_0.isTagged()     && arg_1.isConstant()) {    else if (arg_Z.isTagged()     && arg_1.isConstant()) {
2738    
2739      // Borrow DataTagged input from Data object      // Borrow DataTagged input from Data object
2740      DataTagged* tmp_0=dynamic_cast<DataTagged*>(arg_0.borrowData());      DataTagged* tmp_0=dynamic_cast<DataTagged*>(arg_Z.borrowData());
2741      if (tmp_0==0) { throw DataException("GTP_0 Programming error - casting to DataTagged."); }      if (tmp_0==0) { throw DataException("GTP_0 Programming error - casting to DataTagged."); }
2742    
2743      // Prepare the DataConstant input      // Prepare the DataConstant input
# Line 2744  escript::C_GeneralTensorProduct(Data& ar Line 2745  escript::C_GeneralTensorProduct(Data& ar
2745      if (tmp_1==0) { throw DataException("GTP Programming error - casting to DataConstant."); }      if (tmp_1==0) { throw DataException("GTP Programming error - casting to DataConstant."); }
2746    
2747      // Prepare a DataTagged output 2      // Prepare a DataTagged output 2
2748      arg_2 = Data(0.0, shape2, arg_0.getFunctionSpace());    // DataTagged output      arg_2 = Data(0.0, shape2, arg_Z.getFunctionSpace());    // DataTagged output
2749      arg_2.tag();      arg_2.tag();
2750      DataTagged* tmp_2=dynamic_cast<DataTagged*>(arg_2.borrowData());      DataTagged* tmp_2=dynamic_cast<DataTagged*>(arg_2.borrowData());
2751      if (tmp_2==0) { throw DataException("GTP Programming error - casting to DataTagged."); }      if (tmp_2==0) { throw DataException("GTP Programming error - casting to DataTagged."); }
# Line 2773  escript::C_GeneralTensorProduct(Data& ar Line 2774  escript::C_GeneralTensorProduct(Data& ar
2774      }      }
2775    
2776    }    }
2777    else if (arg_0.isTagged()     && arg_1.isTagged()) {    else if (arg_Z.isTagged()     && arg_1.isTagged()) {
2778    
2779      // Borrow DataTagged input from Data object      // Borrow DataTagged input from Data object
2780      DataTagged* tmp_0=dynamic_cast<DataTagged*>(arg_0.borrowData());      DataTagged* tmp_0=dynamic_cast<DataTagged*>(arg_Z.borrowData());
2781      if (tmp_0==0) { throw DataException("GTP Programming error - casting to DataTagged."); }      if (tmp_0==0) { throw DataException("GTP Programming error - casting to DataTagged."); }
2782    
2783      // Borrow DataTagged input from Data object      // Borrow DataTagged input from Data object
# Line 2822  escript::C_GeneralTensorProduct(Data& ar Line 2823  escript::C_GeneralTensorProduct(Data& ar
2823      }      }
2824    
2825    }    }
2826    else if (arg_0.isTagged()     && arg_1.isExpanded()) {    else if (arg_Z.isTagged()     && arg_1.isExpanded()) {
2827    
2828      // After finding a common function space above the two inputs have the same numSamples and num DPPS      // After finding a common function space above the two inputs have the same numSamples and num DPPS
2829      arg_2 = Data(0.0, shape2, arg_1.getFunctionSpace(),true); // DataExpanded output      arg_2 = Data(0.0, shape2, arg_1.getFunctionSpace(),true); // DataExpanded output
2830      DataTagged*   tmp_0=dynamic_cast<DataTagged*>(arg_0.borrowData());      DataTagged*   tmp_0=dynamic_cast<DataTagged*>(arg_Z.borrowData());
2831      DataExpanded* tmp_1=dynamic_cast<DataExpanded*>(arg_1.borrowData());      DataExpanded* tmp_1=dynamic_cast<DataExpanded*>(arg_1.borrowData());
2832      DataExpanded* tmp_2=dynamic_cast<DataExpanded*>(arg_2.borrowData());      DataExpanded* tmp_2=dynamic_cast<DataExpanded*>(arg_2.borrowData());
2833      if (tmp_0==0) { throw DataException("GTP Programming error - casting to DataTagged."); }      if (tmp_0==0) { throw DataException("GTP Programming error - casting to DataTagged."); }
2834      if (tmp_1==0) { throw DataException("GTP Programming error - casting to DataExpanded."); }      if (tmp_1==0) { throw DataException("GTP Programming error - casting to DataExpanded."); }
2835      if (tmp_2==0) { throw DataException("GTP Programming error - casting to DataExpanded."); }      if (tmp_2==0) { throw DataException("GTP Programming error - casting to DataExpanded."); }
2836      int sampleNo_0,dataPointNo_0;      int sampleNo_0,dataPointNo_0;
2837      int numSamples_0 = arg_0.getNumSamples();      int numSamples_0 = arg_Z.getNumSamples();
2838      int numDataPointsPerSample_0 = arg_0.getNumDataPointsPerSample();      int numDataPointsPerSample_0 = arg_Z.getNumDataPointsPerSample();
2839      #pragma omp parallel for private(sampleNo_0,dataPointNo_0) schedule(static)      #pragma omp parallel for private(sampleNo_0,dataPointNo_0) schedule(static)
2840      for (sampleNo_0 = 0; sampleNo_0 < numSamples_0; sampleNo_0++) {      for (sampleNo_0 = 0; sampleNo_0 < numSamples_0; sampleNo_0++) {
2841        int offset_0 = tmp_0->getPointOffset(sampleNo_0,0); // They're all the same, so just use #0        int offset_0 = tmp_0->getPointOffset(sampleNo_0,0); // They're all the same, so just use #0
2842        double *ptr_0 = &((arg_0.getPointDataView().getData())[offset_0]);        double *ptr_0 = &((arg_Z.getPointDataView().getData())[offset_0]);
2843        for (dataPointNo_0 = 0; dataPointNo_0 < numDataPointsPerSample_0; dataPointNo_0++) {        for (dataPointNo_0 = 0; dataPointNo_0 < numDataPointsPerSample_0; dataPointNo_0++) {
2844          int offset_1 = tmp_1->getPointOffset(sampleNo_0,dataPointNo_0);          int offset_1 = tmp_1->getPointOffset(sampleNo_0,dataPointNo_0);
2845          int offset_2 = tmp_2->getPointOffset(sampleNo_0,dataPointNo_0);          int offset_2 = tmp_2->getPointOffset(sampleNo_0,dataPointNo_0);
# Line 2849  escript::C_GeneralTensorProduct(Data& ar Line 2850  escript::C_GeneralTensorProduct(Data& ar
2850      }      }
2851    
2852    }    }
2853    else if (arg_0.isExpanded()   && arg_1.isConstant()) {    else if (arg_Z.isExpanded()   && arg_1.isConstant()) {
2854    
2855      arg_2 = Data(0.0, shape2, arg_1.getFunctionSpace(),true); // DataExpanded output      arg_2 = Data(0.0, shape2, arg_1.getFunctionSpace(),true); // DataExpanded output
2856      DataExpanded* tmp_0=dynamic_cast<DataExpanded*>(arg_0.borrowData());      DataExpanded* tmp_0=dynamic_cast<DataExpanded*>(arg_Z.borrowData());
2857      DataConstant* tmp_1=dynamic_cast<DataConstant*>(arg_1.borrowData());      DataConstant* tmp_1=dynamic_cast<DataConstant*>(arg_1.borrowData());
2858      DataExpanded* tmp_2=dynamic_cast<DataExpanded*>(arg_2.borrowData());      DataExpanded* tmp_2=dynamic_cast<DataExpanded*>(arg_2.borrowData());
2859      if (tmp_0==0) { throw DataException("GTP Programming error - casting to DataExpanded."); }      if (tmp_0==0) { throw DataException("GTP Programming error - casting to DataExpanded."); }
2860      if (tmp_1==0) { throw DataException("GTP Programming error - casting to DataConstant."); }      if (tmp_1==0) { throw DataException("GTP Programming error - casting to DataConstant."); }
2861      if (tmp_2==0) { throw DataException("GTP Programming error - casting to DataExpanded."); }      if (tmp_2==0) { throw DataException("GTP Programming error - casting to DataExpanded."); }
2862      int sampleNo_0,dataPointNo_0;      int sampleNo_0,dataPointNo_0;
2863      int numSamples_0 = arg_0.getNumSamples();      int numSamples_0 = arg_Z.getNumSamples();
2864      int numDataPointsPerSample_0 = arg_0.getNumDataPointsPerSample();      int numDataPointsPerSample_0 = arg_Z.getNumDataPointsPerSample();
2865      int offset_1 = tmp_1->getPointOffset(0,0);      int offset_1 = tmp_1->getPointOffset(0,0);
2866      #pragma omp parallel for private(sampleNo_0,dataPointNo_0) schedule(static)      #pragma omp parallel for private(sampleNo_0,dataPointNo_0) schedule(static)
2867      for (sampleNo_0 = 0; sampleNo_0 < numSamples_0; sampleNo_0++) {      for (sampleNo_0 = 0; sampleNo_0 < numSamples_0; sampleNo_0++) {
2868        for (dataPointNo_0 = 0; dataPointNo_0 < numDataPointsPerSample_0; dataPointNo_0++) {        for (dataPointNo_0 = 0; dataPointNo_0 < numDataPointsPerSample_0; dataPointNo_0++) {
2869          int offset_0 = tmp_0->getPointOffset(sampleNo_0,dataPointNo_0);          int offset_0 = tmp_0->getPointOffset(sampleNo_0,dataPointNo_0);
2870          int offset_2 = tmp_2->getPointOffset(sampleNo_0,dataPointNo_0);          int offset_2 = tmp_2->getPointOffset(sampleNo_0,dataPointNo_0);
2871          double *ptr_0 = &((arg_0.getPointDataView().getData())[offset_0]);          double *ptr_0 = &((arg_Z.getPointDataView().getData())[offset_0]);
2872          double *ptr_1 = &((arg_1.getPointDataView().getData())[offset_1]);          double *ptr_1 = &((arg_1.getPointDataView().getData())[offset_1]);
2873          double *ptr_2 = &((arg_2.getPointDataView().getData())[offset_2]);          double *ptr_2 = &((arg_2.getPointDataView().getData())[offset_2]);
2874          matrix_matrix_product(SL, SM, SR, ptr_0, ptr_1, ptr_2, transpose);          matrix_matrix_product(SL, SM, SR, ptr_0, ptr_1, ptr_2, transpose);
# Line 2876  escript::C_GeneralTensorProduct(Data& ar Line 2877  escript::C_GeneralTensorProduct(Data& ar
2877    
2878    
2879    }    }
2880    else if (arg_0.isExpanded()   && arg_1.isTagged()) {    else if (arg_Z.isExpanded()   && arg_1.isTagged()) {
2881    
2882      // After finding a common function space above the two inputs have the same numSamples and num DPPS      // After finding a common function space above the two inputs have the same numSamples and num DPPS
2883      arg_2 = Data(0.0, shape2, arg_1.getFunctionSpace(),true); // DataExpanded output      arg_2 = Data(0.0, shape2, arg_1.getFunctionSpace(),true); // DataExpanded output
2884      DataExpanded* tmp_0=dynamic_cast<DataExpanded*>(arg_0.borrowData());      DataExpanded* tmp_0=dynamic_cast<DataExpanded*>(arg_Z.borrowData());
2885      DataTagged*   tmp_1=dynamic_cast<DataTagged*>(arg_1.borrowData());      DataTagged*   tmp_1=dynamic_cast<DataTagged*>(arg_1.borrowData());
2886      DataExpanded* tmp_2=dynamic_cast<DataExpanded*>(arg_2.borrowData());      DataExpanded* tmp_2=dynamic_cast<DataExpanded*>(arg_2.borrowData());
2887      if (tmp_0==0) { throw DataException("GTP Programming error - casting to DataExpanded."); }      if (tmp_0==0) { throw DataException("GTP Programming error - casting to DataExpanded."); }
2888      if (tmp_1==0) { throw DataException("GTP Programming error - casting to DataTagged."); }      if (tmp_1==0) { throw DataException("GTP Programming error - casting to DataTagged."); }
2889      if (tmp_2==0) { throw DataException("GTP Programming error - casting to DataExpanded."); }      if (tmp_2==0) { throw DataException("GTP Programming error - casting to DataExpanded."); }
2890      int sampleNo_0,dataPointNo_0;      int sampleNo_0,dataPointNo_0;
2891      int numSamples_0 = arg_0.getNumSamples();      int numSamples_0 = arg_Z.getNumSamples();
2892      int numDataPointsPerSample_0 = arg_0.getNumDataPointsPerSample();      int numDataPointsPerSample_0 = arg_Z.getNumDataPointsPerSample();
2893      #pragma omp parallel for private(sampleNo_0,dataPointNo_0) schedule(static)      #pragma omp parallel for private(sampleNo_0,dataPointNo_0) schedule(static)
2894      for (sampleNo_0 = 0; sampleNo_0 < numSamples_0; sampleNo_0++) {      for (sampleNo_0 = 0; sampleNo_0 < numSamples_0; sampleNo_0++) {
2895        int offset_1 = tmp_1->getPointOffset(sampleNo_0,0);        int offset_1 = tmp_1->getPointOffset(sampleNo_0,0);
# Line 2896  escript::C_GeneralTensorProduct(Data& ar Line 2897  escript::C_GeneralTensorProduct(Data& ar
2897        for (dataPointNo_0 = 0; dataPointNo_0 < numDataPointsPerSample_0; dataPointNo_0++) {        for (dataPointNo_0 = 0; dataPointNo_0 < numDataPointsPerSample_0; dataPointNo_0++) {
2898          int offset_0 = tmp_0->getPointOffset(sampleNo_0,dataPointNo_0);          int offset_0 = tmp_0->getPointOffset(sampleNo_0,dataPointNo_0);
2899          int offset_2 = tmp_2->getPointOffset(sampleNo_0,dataPointNo_0);          int offset_2 = tmp_2->getPointOffset(sampleNo_0,dataPointNo_0);
2900          double *ptr_0 = &((arg_0.getPointDataView().getData())[offset_0]);          double *ptr_0 = &((arg_Z.getPointDataView().getData())[offset_0]);
2901          double *ptr_2 = &((arg_2.getPointDataView().getData())[offset_2]);          double *ptr_2 = &((arg_2.getPointDataView().getData())[offset_2]);
2902          matrix_matrix_product(SL, SM, SR, ptr_0, ptr_1, ptr_2, transpose);          matrix_matrix_product(SL, SM, SR, ptr_0, ptr_1, ptr_2, transpose);
2903        }        }
2904      }      }
2905    
2906    }    }
2907    else if (arg_0.isExpanded()   && arg_1.isExpanded()) {    else if (arg_Z.isExpanded()   && arg_1.isExpanded()) {
2908    
2909      // After finding a common function space above the two inputs have the same numSamples and num DPPS      // After finding a common function space above the two inputs have the same numSamples and num DPPS
2910      arg_2 = Data(0.0, shape2, arg_1.getFunctionSpace(),true); // DataExpanded output      arg_2 = Data(0.0, shape2, arg_1.getFunctionSpace(),true); // DataExpanded output
2911      DataExpanded* tmp_0=dynamic_cast<DataExpanded*>(arg_0.borrowData());      DataExpanded* tmp_0=dynamic_cast<DataExpanded*>(arg_Z.borrowData());
2912      DataExpanded* tmp_1=dynamic_cast<DataExpanded*>(arg_1.borrowData());      DataExpanded* tmp_1=dynamic_cast<DataExpanded*>(arg_1.borrowData());
2913      DataExpanded* tmp_2=dynamic_cast<DataExpanded*>(arg_2.borrowData());      DataExpanded* tmp_2=dynamic_cast<DataExpanded*>(arg_2.borrowData());
2914      if (tmp_0==0) { throw DataException("GTP Programming error - casting to DataExpanded."); }      if (tmp_0==0) { throw DataException("GTP Programming error - casting to DataExpanded."); }
2915      if (tmp_1==0) { throw DataException("GTP Programming error - casting to DataExpanded."); }      if (tmp_1==0) { throw DataException("GTP Programming error - casting to DataExpanded."); }
2916      if (tmp_2==0) { throw DataException("GTP Programming error - casting to DataExpanded."); }      if (tmp_2==0) { throw DataException("GTP Programming error - casting to DataExpanded."); }
2917      int sampleNo_0,dataPointNo_0;      int sampleNo_0,dataPointNo_0;
2918      int numSamples_0 = arg_0.getNumSamples();      int numSamples_0 = arg_Z.getNumSamples();
2919      int numDataPointsPerSample_0 = arg_0.getNumDataPointsPerSample();      int numDataPointsPerSample_0 = arg_Z.getNumDataPointsPerSample();
2920      #pragma omp parallel for private(sampleNo_0,dataPointNo_0) schedule(static)      #pragma omp parallel for private(sampleNo_0,dataPointNo_0) schedule(static)
2921      for (sampleNo_0 = 0; sampleNo_0 < numSamples_0; sampleNo_0++) {      for (sampleNo_0 = 0; sampleNo_0 < numSamples_0; sampleNo_0++) {
2922        for (dataPointNo_0 = 0; dataPointNo_0 < numDataPointsPerSample_0; dataPointNo_0++) {        for (dataPointNo_0 = 0; dataPointNo_0 < numDataPointsPerSample_0; dataPointNo_0++) {
2923          int offset_0 = tmp_0->getPointOffset(sampleNo_0,dataPointNo_0);          int offset_0 = tmp_0->getPointOffset(sampleNo_0,dataPointNo_0);
2924          int offset_1 = tmp_1->getPointOffset(sampleNo_0,dataPointNo_0);          int offset_1 = tmp_1->getPointOffset(sampleNo_0,dataPointNo_0);
2925          int offset_2 = tmp_2->getPointOffset(sampleNo_0,dataPointNo_0);          int offset_2 = tmp_2->getPointOffset(sampleNo_0,dataPointNo_0);
2926          double *ptr_0 = &((arg_0.getPointDataView().getData())[offset_0]);          double *ptr_0 = &((arg_Z.getPointDataView().getData())[offset_0]);
2927          double *ptr_1 = &((arg_1.getPointDataView().getData())[offset_1]);          double *ptr_1 = &((arg_1.getPointDataView().getData())[offset_1]);
2928          double *ptr_2 = &((arg_2.getPointDataView().getData())[offset_2]);          double *ptr_2 = &((arg_2.getPointDataView().getData())[offset_2]);
2929          matrix_matrix_product(SL, SM, SR, ptr_0, ptr_1, ptr_2, transpose);          matrix_matrix_product(SL, SM, SR, ptr_0, ptr_1, ptr_2, transpose);

Legend:
Removed from v.814  
changed lines
  Added in v.824

  ViewVC Help
Powered by ViewVC 1.1.26