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 |
|
|