/[escript]/branches/arrayview_from_1695_trunk/escript/src/JoelMods.cpp_
ViewVC logotype

Diff of /branches/arrayview_from_1695_trunk/escript/src/JoelMods.cpp_

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

revision 1709 by jfenwick, Thu Aug 14 05:35:32 2008 UTC revision 1710 by jfenwick, Fri Aug 15 06:24:20 2008 UTC
# Line 94  escript::C_GeneralTensorProduct_J(Data& Line 94  escript::C_GeneralTensorProduct_J(Data&
94      SR *= tmpShape1[i];      SR *= tmpShape1[i];
95    }    }
96    
97    // Define the shape of the output    // Define the shape of the output (rank of shape is the sum of the loop ranges below)
98    DataTypes::ShapeType shape2;    DataTypes::ShapeType shape2(rank0+rank1-2*axis_offset);  
   shape2.reserve(rank0+rank1-2*axis_offset);    // add the loop ranges together  
 //   for (int i=0; i<rank0-axis_offset; i++) { shape2.push_back(tmpShape0[i]); } // First part of arg_0_Z  
 //   for (int i=axis_offset; i<rank1; i++)   { shape2.push_back(tmpShape1[i]); } // Last part of arg_1_Z  
99    {         // block to limit the scope of out_index    {         // block to limit the scope of out_index
100       int out_index=0;       int out_index=0;
101       for (int i=0; i<rank0-axis_offset; i++, ++out_index) { shape2[out_index]=tmpShape0[i]; } // First part of arg_0_Z       for (int i=0; i<rank0-axis_offset; i++, ++out_index) { shape2[out_index]=tmpShape0[i]; } // First part of arg_0_Z
102       for (int i=axis_offset; i<rank1; i++, ++out_index)   { shape2[out_index]=tmpShape1[i]; } // Last part of arg_1_Z       for (int i=axis_offset; i<rank1; i++, ++out_index)   { shape2[out_index]=tmpShape1[i]; } // Last part of arg_1_Z
103    }    }
104    
   
105    // Declare output Data object    // Declare output Data object
106    Data res;    Data res;
107    

Legend:
Removed from v.1709  
changed lines
  Added in v.1710

  ViewVC Help
Powered by ViewVC 1.1.26