/[escript]/branches/arrayview_from_1695_trunk/escript/test/DataArrayViewTestCase.cpp
ViewVC logotype

Diff of /branches/arrayview_from_1695_trunk/escript/test/DataArrayViewTestCase.cpp

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

temp/escript/test/DataArrayViewTestCase.cpp revision 1387 by trankine, Fri Jan 11 07:45:26 2008 UTC branches/arrayview_from_1695_trunk/escript/test/DataArrayViewTestCase.cpp revision 1698 by jfenwick, Tue Aug 12 01:13:16 2008 UTC
# Line 19  Line 19 
19  #include "esysUtils/EsysException.h"  #include "esysUtils/EsysException.h"
20    
21  #include "DataArrayViewTestCase.h"  #include "DataArrayViewTestCase.h"
22    #include "escript/DataTypes.h"
23    
24  #include <iostream>  #include <iostream>
25    
# Line 44  void DataArrayViewTestCase::testResultSl Line 45  void DataArrayViewTestCase::testResultSl
45    cout << endl;    cout << endl;
46    cout << "\tTest getResultSliceShape method." << endl;    cout << "\tTest getResultSliceShape method." << endl;
47    
48    DataArrayView::RegionType region;    DataTypes::RegionType region;
49    DataArrayView::ShapeType resultShape;    DataTypes::ShapeType resultShape;
50    
51    region.push_back(DataArrayView::RegionType::value_type(1,5));    region.push_back(DataTypes::RegionType::value_type(1,5));
52    resultShape.push_back(4);    resultShape.push_back(4);
53    assert(DataArrayView::getResultSliceShape(region)==resultShape);    assert(DataArrayView::getResultSliceShape(region)==resultShape);
54    
55    region.push_back(DataArrayView::RegionType::value_type(2,5));    region.push_back(DataTypes::RegionType::value_type(2,5));
56    resultShape.push_back(3);    resultShape.push_back(3);
57    assert(DataArrayView::getResultSliceShape(region)==resultShape);    assert(DataArrayView::getResultSliceShape(region)==resultShape);
58    
59    region.push_back(DataArrayView::RegionType::value_type(3,9));    region.push_back(DataTypes::RegionType::value_type(3,9));
60    resultShape.push_back(6);    resultShape.push_back(6);
61    assert(DataArrayView::getResultSliceShape(region)==resultShape);    assert(DataArrayView::getResultSliceShape(region)==resultShape);
62    
63    region.push_back(DataArrayView::RegionType::value_type(1,7));    region.push_back(DataTypes::RegionType::value_type(1,7));
64    resultShape.push_back(6);    resultShape.push_back(6);
65    assert(DataArrayView::getResultSliceShape(region)==resultShape);    assert(DataArrayView::getResultSliceShape(region)==resultShape);
66    
# Line 72  void DataArrayViewTestCase::testSlicing( Line 73  void DataArrayViewTestCase::testSlicing(
73      cout << "\tSlice a scalar to a scalar.";      cout << "\tSlice a scalar to a scalar.";
74    
75      // Define slice region.      // Define slice region.
76      DataArrayView::RegionType region;      DataTypes::RegionType region;
77    
78      // Define shape of views.      // Define shape of views.
79      DataArrayView::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
80    
81      // Create source and target views.      // Create source and target views.
82      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
83      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
84      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
85      DataVector targetData(1, 2.0, 1);      DataVector targetData(1, 2.0, 1);
86      DataArrayView targetView(targetData, DataArrayView::ShapeType());      DataArrayView targetView(targetData, DataTypes::ShapeType());
87    
88      // Copy source view to target view.      // Copy source view to target view.
89      targetView.copySlice(sourceView,region);      targetView.copySlice(sourceView,region);
# Line 96  void DataArrayViewTestCase::testSlicing( Line 97  void DataArrayViewTestCase::testSlicing(
97      cout << "\tSlice a scalar from a scalar.";      cout << "\tSlice a scalar from a scalar.";
98    
99      // Define slice region.      // Define slice region.
100      DataArrayView::RegionType region;      DataTypes::RegionType region;
101    
102      // Define shape of views.      // Define shape of views.
103      DataArrayView::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
104    
105      // Create source and target views.      // Create source and target views.
106      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
107      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
108      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
109      DataVector targetData(1, 2.0, 1);      DataVector targetData(1, 2.0, 1);
110      DataArrayView targetView(targetData, DataArrayView::ShapeType());      DataArrayView targetView(targetData, DataTypes::ShapeType());
111    
112      // Copy source view to target view.      // Copy source view to target view.
113      targetView.copySliceFrom(sourceView,region);      targetView.copySliceFrom(sourceView,region);
# Line 120  void DataArrayViewTestCase::testSlicing( Line 121  void DataArrayViewTestCase::testSlicing(
121      cout << "\tSlice a 1 dimensional slice to a 1 dimensional array.";      cout << "\tSlice a 1 dimensional slice to a 1 dimensional array.";
122    
123      // Define slice region.      // Define slice region.
124      DataArrayView::RegionType region;      DataTypes::RegionType region;
125      region.push_back(DataArrayView::RegionType::value_type(2,4));      region.push_back(DataTypes::RegionType::value_type(2,4));
126    
127      // Define shapes of views.      // Define shapes of views.
128      DataArrayView::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
129      sourceShape.push_back(6);      sourceShape.push_back(6);
130      DataArrayView::ShapeType targetShape = DataArrayView::getResultSliceShape(region);      DataTypes::ShapeType targetShape = DataArrayView::getResultSliceShape(region);
131    
132      // Create source and target views.      // Create source and target views.
133      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
134      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
135      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
136      for (int i=0;i<sourceShape[0];i++) {      for (int i=0;i<sourceShape[0];i++) {
137        sourceView(i)=i;        sourceView(i)=i;
138      }      }
139    
140      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
141      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
142      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
143    
# Line 155  void DataArrayViewTestCase::testSlicing( Line 156  void DataArrayViewTestCase::testSlicing(
156      cout << "\tSlice a 1 dimensional slice to a scalar.";      cout << "\tSlice a 1 dimensional slice to a scalar.";
157    
158      // Define slice region.      // Define slice region.
159      DataArrayView::RegionType region;      DataTypes::RegionType region;
160      region.push_back(DataArrayView::RegionType::value_type(2,3));      region.push_back(DataTypes::RegionType::value_type(2,3));
161    
162      // Define shapes of views.      // Define shapes of views.
163      DataArrayView::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
164      sourceShape.push_back(6);      sourceShape.push_back(6);
165      DataArrayView::ShapeType targetShape;      DataTypes::ShapeType targetShape;
166    
167      // Create source and target views.      // Create source and target views.
168      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
169      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
170      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
171    
# Line 172  void DataArrayViewTestCase::testSlicing( Line 173  void DataArrayViewTestCase::testSlicing(
173        sourceView(i)=i;        sourceView(i)=i;
174      }      }
175    
176      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
177      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
178      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
179    
# Line 191  void DataArrayViewTestCase::testSlicing( Line 192  void DataArrayViewTestCase::testSlicing(
192      cout << "\tSlice a 1 dimensional slice from a 1 dimensional array.";      cout << "\tSlice a 1 dimensional slice from a 1 dimensional array.";
193    
194      // Define slice region.      // Define slice region.
195      DataArrayView::RegionType region;      DataTypes::RegionType region;
196      region.push_back(DataArrayView::RegionType::value_type(2,4));      region.push_back(DataTypes::RegionType::value_type(2,4));
197    
198      // Define shapes of views.      // Define shapes of views.
199      DataArrayView::ShapeType sourceShape = DataArrayView::getResultSliceShape(region);      DataTypes::ShapeType sourceShape = DataArrayView::getResultSliceShape(region);
200      DataArrayView::ShapeType targetShape;      DataTypes::ShapeType targetShape;
201      targetShape.push_back(6);      targetShape.push_back(6);
202    
203      // Create source and target views.      // Create source and target views.
204      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
205      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
206      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
207      for (int i=0;i<sourceShape[0];i++) {      for (int i=0;i<sourceShape[0];i++) {
208        sourceView(i)=i;        sourceView(i)=i;
209      }      }
210    
211      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
212      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
213      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
214    
# Line 226  void DataArrayViewTestCase::testSlicing( Line 227  void DataArrayViewTestCase::testSlicing(
227      cout << "\tSlice a 1 dimensional slice from a scalar.";      cout << "\tSlice a 1 dimensional slice from a scalar.";
228    
229      // Define slice region.      // Define slice region.
230      DataArrayView::RegionType region;      DataTypes::RegionType region;
231      region.push_back(DataArrayView::RegionType::value_type(2,4));      region.push_back(DataTypes::RegionType::value_type(2,4));
232    
233      // Define shapes of views.      // Define shapes of views.
234      DataArrayView::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
235      DataArrayView::ShapeType targetShape;      DataTypes::ShapeType targetShape;
236      targetShape.push_back(6);      targetShape.push_back(6);
237    
238      // Create source and target views.      // Create source and target views.
239      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
240      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
241      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
242      sourceView()=5;      sourceView()=5;
243    
244      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
245      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
246      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
247    
# Line 259  void DataArrayViewTestCase::testSlicing( Line 260  void DataArrayViewTestCase::testSlicing(
260      cout << "\tSlice a 2 dimensional slice to a 2 dimensional array.";      cout << "\tSlice a 2 dimensional slice to a 2 dimensional array.";
261    
262      // Define slice region.      // Define slice region.
263      DataArrayView::RegionType region;      DataTypes::RegionType region;
264      region.push_back(DataArrayView::RegionType::value_type(2,4));      region.push_back(DataTypes::RegionType::value_type(2,4));
265      region.push_back(DataArrayView::RegionType::value_type(0,2));      region.push_back(DataTypes::RegionType::value_type(0,2));
266    
267      // Define shapes of views.      // Define shapes of views.
268      DataArrayView::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
269      sourceShape.push_back(6);      sourceShape.push_back(6);
270      sourceShape.push_back(3);      sourceShape.push_back(3);
271      DataArrayView::ShapeType targetShape = DataArrayView::getResultSliceShape(region);      DataTypes::ShapeType targetShape = DataArrayView::getResultSliceShape(region);
272    
273      // Create source and target views.      // Create source and target views.
274      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
275      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
276      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
277      int val=0;      int val=0;
# Line 280  void DataArrayViewTestCase::testSlicing( Line 281  void DataArrayViewTestCase::testSlicing(
281        }        }
282      }      }
283    
284      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
285      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
286      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
287    
# Line 301  void DataArrayViewTestCase::testSlicing( Line 302  void DataArrayViewTestCase::testSlicing(
302      cout << "\tSlice a 2 dimensional slice to a 1 dimensional array.";      cout << "\tSlice a 2 dimensional slice to a 1 dimensional array.";
303    
304      // Define slice region.      // Define slice region.
305      DataArrayView::RegionType region;      DataTypes::RegionType region;
306      region.push_back(DataArrayView::RegionType::value_type(0,3));      region.push_back(DataTypes::RegionType::value_type(0,3));
307      region.push_back(DataArrayView::RegionType::value_type(1,2));      region.push_back(DataTypes::RegionType::value_type(1,2));
308    
309      // Define shapes of views.      // Define shapes of views.
310      DataArrayView::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
311      sourceShape.push_back(3);      sourceShape.push_back(3);
312      sourceShape.push_back(6);      sourceShape.push_back(6);
313      DataArrayView::ShapeType targetShape;      DataTypes::ShapeType targetShape;
314      targetShape.push_back(3);      targetShape.push_back(3);
315    
316      // Create source and target views.      // Create source and target views.
317      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
318      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
319      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
320      int val=0;      int val=0;
# Line 323  void DataArrayViewTestCase::testSlicing( Line 324  void DataArrayViewTestCase::testSlicing(
324        }        }
325      }      }
326    
327      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
328      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
329      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
330    
# Line 344  void DataArrayViewTestCase::testSlicing( Line 345  void DataArrayViewTestCase::testSlicing(
345      cout << "\tSlice a 2 dimensional slice to a scalar.";      cout << "\tSlice a 2 dimensional slice to a scalar.";
346    
347      // Define slice region.      // Define slice region.
348      DataArrayView::RegionType region;      DataTypes::RegionType region;
349      region.push_back(DataArrayView::RegionType::value_type(2,3));      region.push_back(DataTypes::RegionType::value_type(2,3));
350      region.push_back(DataArrayView::RegionType::value_type(1,2));      region.push_back(DataTypes::RegionType::value_type(1,2));
351    
352      // Define shapes of views.      // Define shapes of views.
353      DataArrayView::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
354      sourceShape.push_back(3);      sourceShape.push_back(3);
355      sourceShape.push_back(6);      sourceShape.push_back(6);
356      DataArrayView::ShapeType targetShape;      DataTypes::ShapeType targetShape;
357    
358      // Create source and target views.      // Create source and target views.
359      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
360      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
361      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
362      int val=0;      int val=0;
# Line 365  void DataArrayViewTestCase::testSlicing( Line 366  void DataArrayViewTestCase::testSlicing(
366        }        }
367      }      }
368    
369      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
370      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
371      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
372    
# Line 385  void DataArrayViewTestCase::testSlicing( Line 386  void DataArrayViewTestCase::testSlicing(
386      cout << "\tSlice a 2 dimensional slice from a 2 dimensional array.";      cout << "\tSlice a 2 dimensional slice from a 2 dimensional array.";
387    
388      // Define slice region.      // Define slice region.
389      DataArrayView::RegionType region;      DataTypes::RegionType region;
390      region.push_back(DataArrayView::RegionType::value_type(2,4));      region.push_back(DataTypes::RegionType::value_type(2,4));
391      region.push_back(DataArrayView::RegionType::value_type(0,2));      region.push_back(DataTypes::RegionType::value_type(0,2));
392    
393      // Define shapes of views.      // Define shapes of views.
394      DataArrayView::ShapeType sourceShape = DataArrayView::getResultSliceShape(region);      DataTypes::ShapeType sourceShape = DataArrayView::getResultSliceShape(region);
395      DataArrayView::ShapeType targetShape;      DataTypes::ShapeType targetShape;
396      targetShape.push_back(6);      targetShape.push_back(6);
397      targetShape.push_back(3);      targetShape.push_back(3);
398    
399      // Create source and target views.      // Create source and target views.
400      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
401      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
402      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
403      int val=0;      int val=0;
# Line 406  void DataArrayViewTestCase::testSlicing( Line 407  void DataArrayViewTestCase::testSlicing(
407        }        }
408      }      }
409    
410      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
411      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
412      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
413    
# Line 427  void DataArrayViewTestCase::testSlicing( Line 428  void DataArrayViewTestCase::testSlicing(
428      cout << "\tSlice a 2 dimensional slice from a scalar.";      cout << "\tSlice a 2 dimensional slice from a scalar.";
429    
430      // Define slice region.      // Define slice region.
431      DataArrayView::RegionType region;      DataTypes::RegionType region;
432      region.push_back(DataArrayView::RegionType::value_type(2,4));      region.push_back(DataTypes::RegionType::value_type(2,4));
433      region.push_back(DataArrayView::RegionType::value_type(0,2));      region.push_back(DataTypes::RegionType::value_type(0,2));
434    
435      // Define shapes of views.      // Define shapes of views.
436      DataArrayView::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
437      DataArrayView::ShapeType targetShape;      DataTypes::ShapeType targetShape;
438      targetShape.push_back(6);      targetShape.push_back(6);
439      targetShape.push_back(3);      targetShape.push_back(3);
440    
441      // Create source and target views.      // Create source and target views.
442      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
443      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
444      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
445      sourceView()=5;      sourceView()=5;
446    
447      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
448      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
449      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
450    
# Line 464  void DataArrayViewTestCase::testSlicing( Line 465  void DataArrayViewTestCase::testSlicing(
465      cout << "\tSlice a 3 dimensional slice to a 3 dimensional array.";      cout << "\tSlice a 3 dimensional slice to a 3 dimensional array.";
466    
467      // Define slice region.      // Define slice region.
468      DataArrayView::RegionType region;      DataTypes::RegionType region;
469      region.push_back(DataArrayView::RegionType::value_type(2,4));      region.push_back(DataTypes::RegionType::value_type(2,4));
470      region.push_back(DataArrayView::RegionType::value_type(0,2));      region.push_back(DataTypes::RegionType::value_type(0,2));
471      region.push_back(DataArrayView::RegionType::value_type(5,9));      region.push_back(DataTypes::RegionType::value_type(5,9));
472    
473      // Define shapes of views.      // Define shapes of views.
474      DataArrayView::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
475      sourceShape.push_back(6);      sourceShape.push_back(6);
476      sourceShape.push_back(3);      sourceShape.push_back(3);
477      sourceShape.push_back(13);      sourceShape.push_back(13);
478      DataArrayView::ShapeType targetShape = DataArrayView::getResultSliceShape(region);      DataTypes::ShapeType targetShape = DataArrayView::getResultSliceShape(region);
479    
480      // Create source and target views.      // Create source and target views.
481      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
482      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
483      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
484      int val=0;      int val=0;
# Line 489  void DataArrayViewTestCase::testSlicing( Line 490  void DataArrayViewTestCase::testSlicing(
490        }        }
491      }      }
492    
493      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
494      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
495      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
496    
# Line 512  void DataArrayViewTestCase::testSlicing( Line 513  void DataArrayViewTestCase::testSlicing(
513      cout << "\tSlice a 3 dimensional slice to a 2 dimensional array.";      cout << "\tSlice a 3 dimensional slice to a 2 dimensional array.";
514    
515      // Define slice region.      // Define slice region.
516      DataArrayView::RegionType region;      DataTypes::RegionType region;
517      region.push_back(DataArrayView::RegionType::value_type(2,4));      region.push_back(DataTypes::RegionType::value_type(2,4));
518      region.push_back(DataArrayView::RegionType::value_type(0,1));      region.push_back(DataTypes::RegionType::value_type(0,1));
519      region.push_back(DataArrayView::RegionType::value_type(5,9));      region.push_back(DataTypes::RegionType::value_type(5,9));
520    
521      // Define shapes of views.      // Define shapes of views.
522      DataArrayView::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
523      sourceShape.push_back(6);      sourceShape.push_back(6);
524      sourceShape.push_back(3);      sourceShape.push_back(3);
525      sourceShape.push_back(13);      sourceShape.push_back(13);
526      DataArrayView::ShapeType targetShape;      DataTypes::ShapeType targetShape;
527      targetShape.push_back(2);      targetShape.push_back(2);
528      targetShape.push_back(4);      targetShape.push_back(4);
529    
530      // Create source and target views.      // Create source and target views.
531      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
532      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
533      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
534      int val=0;      int val=0;
# Line 539  void DataArrayViewTestCase::testSlicing( Line 540  void DataArrayViewTestCase::testSlicing(
540        }        }
541      }      }
542    
543      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
544      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
545      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
546    
# Line 562  void DataArrayViewTestCase::testSlicing( Line 563  void DataArrayViewTestCase::testSlicing(
563      cout << "\tSlice a 3 dimensional slice to a 1 dimensional array.";      cout << "\tSlice a 3 dimensional slice to a 1 dimensional array.";
564    
565      // Define slice region.      // Define slice region.
566      DataArrayView::RegionType region;      DataTypes::RegionType region;
567      region.push_back(DataArrayView::RegionType::value_type(3,4));      region.push_back(DataTypes::RegionType::value_type(3,4));
568      region.push_back(DataArrayView::RegionType::value_type(0,1));      region.push_back(DataTypes::RegionType::value_type(0,1));
569      region.push_back(DataArrayView::RegionType::value_type(5,9));      region.push_back(DataTypes::RegionType::value_type(5,9));
570    
571      // Define shapes of views.      // Define shapes of views.
572      DataArrayView::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
573      sourceShape.push_back(6);      sourceShape.push_back(6);
574      sourceShape.push_back(3);      sourceShape.push_back(3);
575      sourceShape.push_back(13);      sourceShape.push_back(13);
576      DataArrayView::ShapeType targetShape;      DataTypes::ShapeType targetShape;
577      targetShape.push_back(4);      targetShape.push_back(4);
578    
579      // Create source and target views.      // Create source and target views.
580      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
581      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
582      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
583      int val=0;      int val=0;
# Line 588  void DataArrayViewTestCase::testSlicing( Line 589  void DataArrayViewTestCase::testSlicing(
589        }        }
590      }      }
591    
592      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
593      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
594      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
595    
# Line 611  void DataArrayViewTestCase::testSlicing( Line 612  void DataArrayViewTestCase::testSlicing(
612      cout << "\tSlice a 3 dimensional slice to a scalar.";      cout << "\tSlice a 3 dimensional slice to a scalar.";
613    
614      // Define slice region.      // Define slice region.
615      DataArrayView::RegionType region;      DataTypes::RegionType region;
616      region.push_back(DataArrayView::RegionType::value_type(3,4));      region.push_back(DataTypes::RegionType::value_type(3,4));
617      region.push_back(DataArrayView::RegionType::value_type(0,1));      region.push_back(DataTypes::RegionType::value_type(0,1));
618      region.push_back(DataArrayView::RegionType::value_type(5,6));      region.push_back(DataTypes::RegionType::value_type(5,6));
619    
620      // Define shapes of views.      // Define shapes of views.
621      DataArrayView::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
622      sourceShape.push_back(6);      sourceShape.push_back(6);
623      sourceShape.push_back(3);      sourceShape.push_back(3);
624      sourceShape.push_back(13);      sourceShape.push_back(13);
625      DataArrayView::ShapeType targetShape;      DataTypes::ShapeType targetShape;
626    
627      // Create source and target views.      // Create source and target views.
628      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
629      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
630      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
631      int val=0;      int val=0;
# Line 636  void DataArrayViewTestCase::testSlicing( Line 637  void DataArrayViewTestCase::testSlicing(
637        }        }
638      }      }
639    
640      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
641      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
642      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
643    
# Line 659  void DataArrayViewTestCase::testSlicing( Line 660  void DataArrayViewTestCase::testSlicing(
660      cout << "\tSlice a 3 dimensional slice from a 3 dimensional array.";      cout << "\tSlice a 3 dimensional slice from a 3 dimensional array.";
661    
662      // Define slice region.      // Define slice region.
663      DataArrayView::RegionType region;      DataTypes::RegionType region;
664      region.push_back(DataArrayView::RegionType::value_type(4,7));      region.push_back(DataTypes::RegionType::value_type(4,7));
665      region.push_back(DataArrayView::RegionType::value_type(2,5));      region.push_back(DataTypes::RegionType::value_type(2,5));
666      region.push_back(DataArrayView::RegionType::value_type(6,7));      region.push_back(DataTypes::RegionType::value_type(6,7));
667    
668      // Define shapes of views.      // Define shapes of views.
669      DataArrayView::ShapeType sourceShape = DataArrayView::getResultSliceShape(region);      DataTypes::ShapeType sourceShape = DataArrayView::getResultSliceShape(region);
670      DataArrayView::ShapeType targetShape;      DataTypes::ShapeType targetShape;
671      targetShape.push_back(11);      targetShape.push_back(11);
672      targetShape.push_back(8);      targetShape.push_back(8);
673      targetShape.push_back(9);      targetShape.push_back(9);
674    
675      // Create source and target views.      // Create source and target views.
676      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
677      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
678      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
679      int val=0;      int val=0;
# Line 684  void DataArrayViewTestCase::testSlicing( Line 685  void DataArrayViewTestCase::testSlicing(
685        }        }
686      }      }
687    
688      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
689      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
690      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
691    
# Line 707  void DataArrayViewTestCase::testSlicing( Line 708  void DataArrayViewTestCase::testSlicing(
708      cout << "\tSlice a 3 dimensional slice from a scalar.";      cout << "\tSlice a 3 dimensional slice from a scalar.";
709    
710      // Define slice region.      // Define slice region.
711      DataArrayView::RegionType region;      DataTypes::RegionType region;
712      region.push_back(DataArrayView::RegionType::value_type(4,7));      region.push_back(DataTypes::RegionType::value_type(4,7));
713      region.push_back(DataArrayView::RegionType::value_type(2,5));      region.push_back(DataTypes::RegionType::value_type(2,5));
714      region.push_back(DataArrayView::RegionType::value_type(6,7));      region.push_back(DataTypes::RegionType::value_type(6,7));
715    
716      // Define shapes of views.      // Define shapes of views.
717      DataArrayView::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
718      DataArrayView::ShapeType targetShape;      DataTypes::ShapeType targetShape;
719      targetShape.push_back(11);      targetShape.push_back(11);
720      targetShape.push_back(8);      targetShape.push_back(8);
721      targetShape.push_back(9);      targetShape.push_back(9);
722    
723      // Create source and target views.      // Create source and target views.
724      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
725      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
726      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
727      sourceView()=5;      sourceView()=5;
728    
729      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
730      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
731      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
732    
# Line 748  void DataArrayViewTestCase::testSlicing( Line 749  void DataArrayViewTestCase::testSlicing(
749      cout << "\tSlice a 4 dimensional slice to a 4 dimensional array.";      cout << "\tSlice a 4 dimensional slice to a 4 dimensional array.";
750    
751      // Define slice region.      // Define slice region.
752      DataArrayView::RegionType region;      DataTypes::RegionType region;
753      region.push_back(DataArrayView::RegionType::value_type(2,4));      region.push_back(DataTypes::RegionType::value_type(2,4));
754      region.push_back(DataArrayView::RegionType::value_type(0,2));      region.push_back(DataTypes::RegionType::value_type(0,2));
755      region.push_back(DataArrayView::RegionType::value_type(5,9));      region.push_back(DataTypes::RegionType::value_type(5,9));
756      region.push_back(DataArrayView::RegionType::value_type(3,5));      region.push_back(DataTypes::RegionType::value_type(3,5));
757    
758      // Define shapes of views.      // Define shapes of views.
759      DataArrayView::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
760      sourceShape.push_back(6);      sourceShape.push_back(6);
761      sourceShape.push_back(3);      sourceShape.push_back(3);
762      sourceShape.push_back(13);      sourceShape.push_back(13);
763      sourceShape.push_back(9);      sourceShape.push_back(9);
764      DataArrayView::ShapeType targetShape = DataArrayView::getResultSliceShape(region);      DataTypes::ShapeType targetShape = DataArrayView::getResultSliceShape(region);
765    
766      // Create source and target views.      // Create source and target views.
767      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
768      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
769      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
770      int val=0;      int val=0;
# Line 777  void DataArrayViewTestCase::testSlicing( Line 778  void DataArrayViewTestCase::testSlicing(
778        }        }
779      }      }
780    
781      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
782      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
783      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
784    
# Line 802  void DataArrayViewTestCase::testSlicing( Line 803  void DataArrayViewTestCase::testSlicing(
803      cout << "\tSlice a 4 dimensional slice to a 3 dimensional array.";      cout << "\tSlice a 4 dimensional slice to a 3 dimensional array.";
804    
805      // Define slice region.      // Define slice region.
806      DataArrayView::RegionType region;      DataTypes::RegionType region;
807      region.push_back(DataArrayView::RegionType::value_type(2,4));      region.push_back(DataTypes::RegionType::value_type(2,4));
808      region.push_back(DataArrayView::RegionType::value_type(0,2));      region.push_back(DataTypes::RegionType::value_type(0,2));
809      region.push_back(DataArrayView::RegionType::value_type(5,6));      region.push_back(DataTypes::RegionType::value_type(5,6));
810      region.push_back(DataArrayView::RegionType::value_type(3,5));      region.push_back(DataTypes::RegionType::value_type(3,5));
811    
812      // Define shapes of views.      // Define shapes of views.
813      DataArrayView::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
814      sourceShape.push_back(6);      sourceShape.push_back(6);
815      sourceShape.push_back(3);      sourceShape.push_back(3);
816      sourceShape.push_back(13);      sourceShape.push_back(13);
817      sourceShape.push_back(9);      sourceShape.push_back(9);
818      DataArrayView::ShapeType targetShape;      DataTypes::ShapeType targetShape;
819      targetShape.push_back(2);      targetShape.push_back(2);
820      targetShape.push_back(2);      targetShape.push_back(2);
821      targetShape.push_back(2);      targetShape.push_back(2);
822    
823      // Create source and target views.      // Create source and target views.
824      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
825      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
826      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
827      int val=0;      int val=0;
# Line 834  void DataArrayViewTestCase::testSlicing( Line 835  void DataArrayViewTestCase::testSlicing(
835        }        }
836      }      }
837    
838      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
839      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
840      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
841    
# Line 859  void DataArrayViewTestCase::testSlicing( Line 860  void DataArrayViewTestCase::testSlicing(
860      cout << "\tSlice a 4 dimensional slice to a 2 dimensional array.";      cout << "\tSlice a 4 dimensional slice to a 2 dimensional array.";
861    
862      // Define slice region.      // Define slice region.
863      DataArrayView::RegionType region;      DataTypes::RegionType region;
864      region.push_back(DataArrayView::RegionType::value_type(2,4));      region.push_back(DataTypes::RegionType::value_type(2,4));
865      region.push_back(DataArrayView::RegionType::value_type(0,2));      region.push_back(DataTypes::RegionType::value_type(0,2));
866      region.push_back(DataArrayView::RegionType::value_type(5,6));      region.push_back(DataTypes::RegionType::value_type(5,6));
867      region.push_back(DataArrayView::RegionType::value_type(4,5));      region.push_back(DataTypes::RegionType::value_type(4,5));
868    
869      // Define shapes of views.      // Define shapes of views.
870      DataArrayView::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
871      sourceShape.push_back(6);      sourceShape.push_back(6);
872      sourceShape.push_back(3);      sourceShape.push_back(3);
873      sourceShape.push_back(13);      sourceShape.push_back(13);
874      sourceShape.push_back(9);      sourceShape.push_back(9);
875      DataArrayView::ShapeType targetShape;      DataTypes::ShapeType targetShape;
876      targetShape.push_back(2);      targetShape.push_back(2);
877      targetShape.push_back(2);      targetShape.push_back(2);
878    
879      // Create source and target views.      // Create source and target views.
880      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
881      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
882      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
883      int val=0;      int val=0;
# Line 890  void DataArrayViewTestCase::testSlicing( Line 891  void DataArrayViewTestCase::testSlicing(
891        }        }
892      }      }
893    
894      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
895      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
896      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
897    
# Line 915  void DataArrayViewTestCase::testSlicing( Line 916  void DataArrayViewTestCase::testSlicing(
916      cout << "\tSlice a 4 dimensional slice to a 1 dimensional array.";      cout << "\tSlice a 4 dimensional slice to a 1 dimensional array.";
917    
918      // Define slice region.      // Define slice region.
919      DataArrayView::RegionType region;      DataTypes::RegionType region;
920      region.push_back(DataArrayView::RegionType::value_type(3,4));      region.push_back(DataTypes::RegionType::value_type(3,4));
921      region.push_back(DataArrayView::RegionType::value_type(0,2));      region.push_back(DataTypes::RegionType::value_type(0,2));
922      region.push_back(DataArrayView::RegionType::value_type(5,6));      region.push_back(DataTypes::RegionType::value_type(5,6));
923      region.push_back(DataArrayView::RegionType::value_type(4,5));      region.push_back(DataTypes::RegionType::value_type(4,5));
924    
925      // Define shapes of views.      // Define shapes of views.
926      DataArrayView::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
927      sourceShape.push_back(6);      sourceShape.push_back(6);
928      sourceShape.push_back(3);      sourceShape.push_back(3);
929      sourceShape.push_back(13);      sourceShape.push_back(13);
930      sourceShape.push_back(9);      sourceShape.push_back(9);
931      DataArrayView::ShapeType targetShape;      DataTypes::ShapeType targetShape;
932      targetShape.push_back(2);      targetShape.push_back(2);
933    
934      // Create source and target views.      // Create source and target views.
935      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
936      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
937      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
938      int val=0;      int val=0;
# Line 945  void DataArrayViewTestCase::testSlicing( Line 946  void DataArrayViewTestCase::testSlicing(
946        }        }
947      }      }
948    
949      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
950      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
951      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
952    
# Line 970  void DataArrayViewTestCase::testSlicing( Line 971  void DataArrayViewTestCase::testSlicing(
971      cout << "\tSlice a 4 dimensional slice to a scalar.";      cout << "\tSlice a 4 dimensional slice to a scalar.";
972    
973      // Define slice region.      // Define slice region.
974      DataArrayView::RegionType region;      DataTypes::RegionType region;
975      region.push_back(DataArrayView::RegionType::value_type(3,4));      region.push_back(DataTypes::RegionType::value_type(3,4));
976      region.push_back(DataArrayView::RegionType::value_type(1,2));      region.push_back(DataTypes::RegionType::value_type(1,2));
977      region.push_back(DataArrayView::RegionType::value_type(5,6));      region.push_back(DataTypes::RegionType::value_type(5,6));
978      region.push_back(DataArrayView::RegionType::value_type(4,5));      region.push_back(DataTypes::RegionType::value_type(4,5));
979    
980      // Define shapes of views.      // Define shapes of views.
981      DataArrayView::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
982      sourceShape.push_back(6);      sourceShape.push_back(6);
983      sourceShape.push_back(3);      sourceShape.push_back(3);
984      sourceShape.push_back(13);      sourceShape.push_back(13);
985      sourceShape.push_back(9);      sourceShape.push_back(9);
986      DataArrayView::ShapeType targetShape;      DataTypes::ShapeType targetShape;
987    
988      // Create source and target views.      // Create source and target views.
989      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
990      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
991      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
992      int val=0;      int val=0;
# Line 999  void DataArrayViewTestCase::testSlicing( Line 1000  void DataArrayViewTestCase::testSlicing(
1000        }        }
1001      }      }
1002    
1003      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
1004      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
1005      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
1006    
# Line 1024  void DataArrayViewTestCase::testSlicing( Line 1025  void DataArrayViewTestCase::testSlicing(
1025      cout << "\tSlice a 4 dimensional slice from a 4 dimensional array.";      cout << "\tSlice a 4 dimensional slice from a 4 dimensional array.";
1026    
1027      // Define slice region.      // Define slice region.
1028      DataArrayView::RegionType region;      DataTypes::RegionType region;
1029      region.push_back(DataArrayView::RegionType::value_type(14,37));      region.push_back(DataTypes::RegionType::value_type(14,37));
1030      region.push_back(DataArrayView::RegionType::value_type(22,57));      region.push_back(DataTypes::RegionType::value_type(22,57));
1031      region.push_back(DataArrayView::RegionType::value_type(63,71));      region.push_back(DataTypes::RegionType::value_type(63,71));
1032      region.push_back(DataArrayView::RegionType::value_type(23,51));      region.push_back(DataTypes::RegionType::value_type(23,51));
1033    
1034      // Define shapes of views.      // Define shapes of views.
1035      DataArrayView::ShapeType sourceShape = DataArrayView::getResultSliceShape(region);      DataTypes::ShapeType sourceShape = DataArrayView::getResultSliceShape(region);
1036      DataArrayView::ShapeType targetShape;      DataTypes::ShapeType targetShape;
1037      targetShape.push_back(50);      targetShape.push_back(50);
1038      targetShape.push_back(65);      targetShape.push_back(65);
1039      targetShape.push_back(80);      targetShape.push_back(80);
1040      targetShape.push_back(90);      targetShape.push_back(90);
1041    
1042      // Create source and target views.      // Create source and target views.
1043      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
1044      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
1045      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
1046      int val=0;      int val=0;
# Line 1053  void DataArrayViewTestCase::testSlicing( Line 1054  void DataArrayViewTestCase::testSlicing(
1054        }        }
1055      }      }
1056    
1057      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
1058      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
1059      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
1060    
# Line 1078  void DataArrayViewTestCase::testSlicing( Line 1079  void DataArrayViewTestCase::testSlicing(
1079      cout << "\tSlice a 4 dimensional slice from a scalar.";      cout << "\tSlice a 4 dimensional slice from a scalar.";
1080    
1081      // Define slice region.      // Define slice region.
1082      DataArrayView::RegionType region;      DataTypes::RegionType region;
1083      region.push_back(DataArrayView::RegionType::value_type(14,37));      region.push_back(DataTypes::RegionType::value_type(14,37));
1084      region.push_back(DataArrayView::RegionType::value_type(22,57));      region.push_back(DataTypes::RegionType::value_type(22,57));
1085      region.push_back(DataArrayView::RegionType::value_type(63,71));      region.push_back(DataTypes::RegionType::value_type(63,71));
1086      region.push_back(DataArrayView::RegionType::value_type(23,51));      region.push_back(DataTypes::RegionType::value_type(23,51));
1087    
1088      // Define shapes of views.      // Define shapes of views.
1089      DataArrayView::ShapeType sourceShape;      DataTypes::ShapeType sourceShape;
1090      DataArrayView::ShapeType targetShape;      DataTypes::ShapeType targetShape;
1091      targetShape.push_back(50);      targetShape.push_back(50);
1092      targetShape.push_back(65);      targetShape.push_back(65);
1093      targetShape.push_back(80);      targetShape.push_back(80);
1094      targetShape.push_back(90);      targetShape.push_back(90);
1095    
1096      // Create source and target views.      // Create source and target views.
1097      int len = DataArrayView::noValues(sourceShape);      int len = DataTypes::noValues(sourceShape);
1098      DataVector sourceData(len, 2.0, len);      DataVector sourceData(len, 2.0, len);
1099      DataArrayView sourceView(sourceData, sourceShape);      DataArrayView sourceView(sourceData, sourceShape);
1100      sourceView()=5;      sourceView()=5;
1101    
1102      len = DataArrayView::noValues(targetShape);      len = DataTypes::noValues(targetShape);
1103      DataVector targetData(len, 2.0, len);      DataVector targetData(len, 2.0, len);
1104      DataArrayView targetView(targetData, targetShape);      DataArrayView targetView(targetData, targetShape);
1105    
# Line 1127  void DataArrayViewTestCase::testShapeToS Line 1128  void DataArrayViewTestCase::testShapeToS
1128    cout << endl;    cout << endl;
1129    cout << "\tTest shapeToString for a variety of shapes." << endl;    cout << "\tTest shapeToString for a variety of shapes." << endl;
1130    
1131    DataArrayView::ShapeType shape;    DataTypes::ShapeType shape;
1132    assert(DataArrayView::shapeToString(shape)=="()");    assert(DataTypes::shapeToString(shape)=="()");
1133    shape.push_back(5);    shape.push_back(5);
1134    assert(DataArrayView::shapeToString(shape)=="(5)");    assert(DataTypes::shapeToString(shape)=="(5)");
1135    shape.push_back(2);    shape.push_back(2);
1136    assert(DataArrayView::shapeToString(shape)=="(5,2)");    assert(DataTypes::shapeToString(shape)=="(5,2)");
1137    shape.push_back(9);    shape.push_back(9);
1138    assert(DataArrayView::shapeToString(shape)=="(5,2,9)");    assert(DataTypes::shapeToString(shape)=="(5,2,9)");
1139    shape.push_back(4);    shape.push_back(4);
1140    assert(DataArrayView::shapeToString(shape)=="(5,2,9,4)");    assert(DataTypes::shapeToString(shape)=="(5,2,9,4)");
1141    
1142  }  }
1143    
# Line 1147  void DataArrayViewTestCase::testScalarVi Line 1148  void DataArrayViewTestCase::testScalarVi
1148    
1149    // Create a vector containing enough data for three scalars    // Create a vector containing enough data for three scalars
1150    // and check three scalar views return the appropriate data    // and check three scalar views return the appropriate data
1151    DataArrayView::ShapeType vShape;    DataTypes::ShapeType vShape;
1152    DataArrayView::ValueType vData(3);    DataTypes::ValueType vData(3);
1153    vData[0]=0;    vData[0]=0;
1154    vData[1]=1;    vData[1]=1;
1155    vData[2]=2;    vData[2]=2;
# Line 1212  void DataArrayViewTestCase::testAll() Line 1213  void DataArrayViewTestCase::testAll()
1213      assert(defView.getRank()==0);      assert(defView.getRank()==0);
1214      assert(defView.noValues()==0);      assert(defView.noValues()==0);
1215      assert(defView.getShape().empty());      assert(defView.getShape().empty());
1216      assert(defView.checkShape(DataArrayView::ShapeType()));      assert(defView.checkShape(DataTypes::ShapeType()));
1217    }    }
1218    
1219    {    {
# Line 1220  void DataArrayViewTestCase::testAll() Line 1221  void DataArrayViewTestCase::testAll()
1221      cout << "\tTest DataArrayView - shape (5).";      cout << "\tTest DataArrayView - shape (5).";
1222    
1223      // define the shape for the DataArrayView      // define the shape for the DataArrayView
1224      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
1225      shape.push_back(5);      shape.push_back(5);
1226    
1227      // allocate the data for the DataArrayView      // allocate the data for the DataArrayView
1228      DataArrayView::ValueType data(DataArrayView::noValues(shape),0);      DataTypes::ValueType data(DataTypes::noValues(shape),0);
1229    
1230      // constructor      // constructor
1231      int offset=0;      int offset=0;
# Line 1251  void DataArrayViewTestCase::testAll() Line 1252  void DataArrayViewTestCase::testAll()
1252      cout << "\tTest DataArrayView - shape (2,3).";      cout << "\tTest DataArrayView - shape (2,3).";
1253    
1254      // define the shape for the DataArrayView      // define the shape for the DataArrayView
1255      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
1256      shape.push_back(2);      shape.push_back(2);
1257      shape.push_back(3);      shape.push_back(3);
1258    
1259      // allocate the data for the DataArrayView      // allocate the data for the DataArrayView
1260      int npoints=4;      int npoints=4;
1261      DataArrayView::ValueType data(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data(DataTypes::noValues(shape)*npoints,0);
1262    
1263      // constructor      // constructor
1264      DataArrayView dataView(data,shape);      DataArrayView dataView(data,shape);
# Line 1296  void DataArrayViewTestCase::testAll() Line 1297  void DataArrayViewTestCase::testAll()
1297      cout << "\tTest DataArrayView - shape (4,7,9).";      cout << "\tTest DataArrayView - shape (4,7,9).";
1298    
1299      // define the shape for the DataArrayView      // define the shape for the DataArrayView
1300      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
1301      shape.push_back(4);      shape.push_back(4);
1302      shape.push_back(7);      shape.push_back(7);
1303      shape.push_back(9);      shape.push_back(9);
1304    
1305      // allocate the data for the DataArrayView      // allocate the data for the DataArrayView
1306      int npoints=10;      int npoints=10;
1307      DataArrayView::ValueType data(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data(DataTypes::noValues(shape)*npoints,0);
1308    
1309      // constructor      // constructor
1310      DataArrayView dataView(data,shape);      DataArrayView dataView(data,shape);
# Line 1344  void DataArrayViewTestCase::testAll() Line 1345  void DataArrayViewTestCase::testAll()
1345      cout << "\tTest DataArrayView - shape (12,4,5,14).";      cout << "\tTest DataArrayView - shape (12,4,5,14).";
1346    
1347      // define the shape for the DataArrayView      // define the shape for the DataArrayView
1348      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
1349      shape.push_back(12);      shape.push_back(12);
1350      shape.push_back(4);      shape.push_back(4);
1351      shape.push_back(5);      shape.push_back(5);
# Line 1352  void DataArrayViewTestCase::testAll() Line 1353  void DataArrayViewTestCase::testAll()
1353    
1354      // allocate the data for the DataArrayView      // allocate the data for the DataArrayView
1355      int npoints=100;      int npoints=100;
1356      DataArrayView::ValueType data(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data(DataTypes::noValues(shape)*npoints,0);
1357    
1358      // constructor      // constructor
1359      DataArrayView dataView(data,shape);      DataArrayView dataView(data,shape);
# Line 1395  void DataArrayViewTestCase::testAll() Line 1396  void DataArrayViewTestCase::testAll()
1396      cout << "\tTest DataArrayView copy constructor - shape (5).";      cout << "\tTest DataArrayView copy constructor - shape (5).";
1397    
1398      // define the shape for the DataArrayView      // define the shape for the DataArrayView
1399      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
1400      shape.push_back(5);      shape.push_back(5);
1401    
1402      // allocate the data for the DataArrayView      // allocate the data for the DataArrayView
1403      DataArrayView::ValueType data(DataArrayView::noValues(shape),0);      DataTypes::ValueType data(DataTypes::noValues(shape),0);
1404    
1405      // constructor      // constructor
1406      DataArrayView dataView(data,shape);      DataArrayView dataView(data,shape);
# Line 1428  void DataArrayViewTestCase::testAll() Line 1429  void DataArrayViewTestCase::testAll()
1429      cout << "\tTest DataArrayView copy constructor - shape (5,6,7).";      cout << "\tTest DataArrayView copy constructor - shape (5,6,7).";
1430    
1431      // define the shape for the DataArrayView      // define the shape for the DataArrayView
1432      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
1433      shape.push_back(5);      shape.push_back(5);
1434      shape.push_back(6);      shape.push_back(6);
1435      shape.push_back(7);      shape.push_back(7);
1436    
1437      // allocate the data for the DataArrayView      // allocate the data for the DataArrayView
1438      DataArrayView::ValueType data(DataArrayView::noValues(shape),0);      DataTypes::ValueType data(DataTypes::noValues(shape),0);
1439    
1440      // constructor      // constructor
1441      DataArrayView dataView(data,shape);      DataArrayView dataView(data,shape);
# Line 1463  void DataArrayViewTestCase::testAll() Line 1464  void DataArrayViewTestCase::testAll()
1464      cout << "\tTest DataArrayView copy method - shape (2,3).";      cout << "\tTest DataArrayView copy method - shape (2,3).";
1465    
1466      // define the shape for the DataArrayViews      // define the shape for the DataArrayViews
1467      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
1468      shape.push_back(2);      shape.push_back(2);
1469      shape.push_back(3);      shape.push_back(3);
1470    
1471      // allocate the data for the DataArrayViews      // allocate the data for the DataArrayViews
1472      int npoints=4;      int npoints=4;
1473      DataArrayView::ValueType data1(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data1(DataTypes::noValues(shape)*npoints,0);
1474      DataArrayView::ValueType data2(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data2(DataTypes::noValues(shape)*npoints,0);
1475    
1476      // construct two views      // construct two views
1477      DataArrayView dataView1(data1,shape);      DataArrayView dataView1(data1,shape);
# Line 1510  void DataArrayViewTestCase::testAll() Line 1511  void DataArrayViewTestCase::testAll()
1511      cout << "\tTest DataArrayView copy method - shape (2,3,8,9).";      cout << "\tTest DataArrayView copy method - shape (2,3,8,9).";
1512    
1513      // define the shape for the DataArrayViews      // define the shape for the DataArrayViews
1514      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
1515      shape.push_back(2);      shape.push_back(2);
1516      shape.push_back(3);      shape.push_back(3);
1517      shape.push_back(8);      shape.push_back(8);
# Line 1518  void DataArrayViewTestCase::testAll() Line 1519  void DataArrayViewTestCase::testAll()
1519    
1520      // allocate the data for the DataArrayViews      // allocate the data for the DataArrayViews
1521      int npoints=10;      int npoints=10;
1522      DataArrayView::ValueType data1(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data1(DataTypes::noValues(shape)*npoints,0);
1523      DataArrayView::ValueType data2(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data2(DataTypes::noValues(shape)*npoints,0);
1524    
1525      // construct two views      // construct two views
1526      DataArrayView dataView1(data1,shape);      DataArrayView dataView1(data1,shape);
# Line 1567  void DataArrayViewTestCase::testAll() Line 1568  void DataArrayViewTestCase::testAll()
1568      cout << "\tTest DataArrayView copy with offset method - shape (2,3).";      cout << "\tTest DataArrayView copy with offset method - shape (2,3).";
1569    
1570      // define the shape for the DataArrayViews      // define the shape for the DataArrayViews
1571      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
1572      shape.push_back(2);      shape.push_back(2);
1573      shape.push_back(3);      shape.push_back(3);
1574    
1575      // allocate the data for the DataArrayViews      // allocate the data for the DataArrayViews
1576      int npoints=4;      int npoints=4;
1577      DataArrayView::ValueType data1(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data1(DataTypes::noValues(shape)*npoints,0);
1578      DataArrayView::ValueType data2(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data2(DataTypes::noValues(shape)*npoints,0);
1579    
1580      // construct two views      // construct two views
1581      DataArrayView dataView1(data1,shape);      DataArrayView dataView1(data1,shape);
# Line 1605  void DataArrayViewTestCase::testAll() Line 1606  void DataArrayViewTestCase::testAll()
1606      cout << "\tTest DataArrayView copy with value method - shape (5,8).";      cout << "\tTest DataArrayView copy with value method - shape (5,8).";
1607    
1608      // define the shape for the DataArrayView      // define the shape for the DataArrayView
1609      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
1610      shape.push_back(5);      shape.push_back(5);
1611      shape.push_back(8);      shape.push_back(8);
1612    
1613      // allocate the data for the DataArrayView      // allocate the data for the DataArrayView
1614      int npoints=4;      int npoints=4;
1615      DataArrayView::ValueType data(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data(DataTypes::noValues(shape)*npoints,0);
1616    
1617      // construct view      // construct view
1618      DataArrayView dataView(data,shape);      DataArrayView dataView(data,shape);
# Line 1634  void DataArrayViewTestCase::testAll() Line 1635  void DataArrayViewTestCase::testAll()
1635      cout << endl;      cout << endl;
1636      cout << "\tTest too many indices for shape exception.";      cout << "\tTest too many indices for shape exception.";
1637    
1638      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
1639      DataArrayView::ValueType data(DataArrayView::noValues(shape),0);      DataTypes::ValueType data(DataTypes::noValues(shape),0);
1640      DataArrayView dataView(data,shape);      DataArrayView dataView(data,shape);
1641    
1642      // Should be a scalar      // Should be a scalar
# Line 1681  void DataArrayViewTestCase::testAll() Line 1682  void DataArrayViewTestCase::testAll()
1682      cout << endl;      cout << endl;
1683      cout << "\tTest invalid index exception.";      cout << "\tTest invalid index exception.";
1684    
1685      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
1686      shape.push_back(4);      shape.push_back(4);
1687      DataArrayView::ValueType data(DataArrayView::noValues(shape),0);      DataTypes::ValueType data(DataTypes::noValues(shape),0);
1688      DataArrayView dataView(data,shape);      DataArrayView dataView(data,shape);
1689    
1690      try {      try {
# Line 1700  void DataArrayViewTestCase::testAll() Line 1701  void DataArrayViewTestCase::testAll()
1701      cout << endl;      cout << endl;
1702      cout << "\tTest insufficient data exception.";      cout << "\tTest insufficient data exception.";
1703    
1704      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
1705      DataArrayView::ValueType data;      DataTypes::ValueType data;
1706    
1707      try {      try {
1708        DataArrayView dataView(data,shape);        DataArrayView dataView(data,shape);
1709        assert(false);        assert(false);
1710      }      }
1711      catch (EsysException& e) {      catch (EsysException&) {
1712        assert(true);        assert(true);
1713      }      }
1714    }    }
# Line 1723  void DataArrayViewTestCase::testMatMult( Line 1724  void DataArrayViewTestCase::testMatMult(
1724      cout << endl;      cout << endl;
1725      cout << "\tTest result shape." << endl;      cout << "\tTest result shape." << endl;
1726    
1727      DataArrayView::ShapeType leftShape;      DataTypes::ShapeType leftShape;
1728      leftShape.push_back(1);      leftShape.push_back(1);
1729      leftShape.push_back(3);      leftShape.push_back(3);
1730      DataArrayView::ValueType leftData(DataArrayView::noValues(leftShape),0);      DataTypes::ValueType leftData(DataTypes::noValues(leftShape),0);
1731      DataArrayView leftDataView(leftData,leftShape);      DataArrayView leftDataView(leftData,leftShape);
1732    
1733      DataArrayView::ShapeType rightShape;      DataTypes::ShapeType rightShape;
1734      rightShape.push_back(3);      rightShape.push_back(3);
1735      rightShape.push_back(2);      rightShape.push_back(2);
1736      DataArrayView::ValueType rightData(DataArrayView::noValues(rightShape),0);      DataTypes::ValueType rightData(DataTypes::noValues(rightShape),0);
1737      DataArrayView rightDataView(rightData,rightShape);      DataArrayView rightDataView(rightData,rightShape);
1738    
1739      DataArrayView::ShapeType resultShape=DataArrayView::determineResultShape(leftDataView,rightDataView);      DataTypes::ShapeType resultShape=DataArrayView::determineResultShape(leftDataView,rightDataView);
1740    
1741      assert(resultShape.size()==2);      assert(resultShape.size()==2);
1742      assert(resultShape[0]==1);      assert(resultShape[0]==1);
1743      assert(resultShape[1]==2);      assert(resultShape[1]==2);
1744    
1745      DataArrayView::ValueType resultData(DataArrayView::noValues(resultShape),0);      DataTypes::ValueType resultData(DataTypes::noValues(resultShape),0);
1746      DataArrayView resultDataView(resultData,resultShape);      DataArrayView resultDataView(resultData,resultShape);
1747    
1748      cout << "\tTest matrix multiplication.";      cout << "\tTest matrix multiplication.";
# Line 1777  void DataArrayViewTestCase::testUnaryOp( Line 1778  void DataArrayViewTestCase::testUnaryOp(
1778      cout << "\tTest unaryOp on scalar DataArrayView.";      cout << "\tTest unaryOp on scalar DataArrayView.";
1779    
1780      // define the shape for the DataArrayView      // define the shape for the DataArrayView
1781      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
1782    
1783      // allocate the data for the DataArrayView      // allocate the data for the DataArrayView
1784      int npoints=4;      int npoints=4;
1785      DataArrayView::ValueType data(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data(DataTypes::noValues(shape)*npoints,0);
1786    
1787      // constructor      // constructor
1788      DataArrayView dataView(data,shape);      DataArrayView dataView(data,shape);
# Line 1813  void DataArrayViewTestCase::testUnaryOp( Line 1814  void DataArrayViewTestCase::testUnaryOp(
1814      cout << "\tTest unaryOp on shape (2,3) DataArrayView.";      cout << "\tTest unaryOp on shape (2,3) DataArrayView.";
1815    
1816      // define the shape for the DataArrayView      // define the shape for the DataArrayView
1817      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
1818      shape.push_back(2);      shape.push_back(2);
1819      shape.push_back(3);      shape.push_back(3);
1820    
1821      // allocate the data for the DataArrayView      // allocate the data for the DataArrayView
1822      int npoints=4;      int npoints=4;
1823      DataArrayView::ValueType data(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data(DataTypes::noValues(shape)*npoints,0);
1824    
1825      // constructor      // constructor
1826      DataArrayView dataView(data,shape);      DataArrayView dataView(data,shape);
# Line 1857  void DataArrayViewTestCase::testUnaryOp( Line 1858  void DataArrayViewTestCase::testUnaryOp(
1858      cout << "\tTest unaryOp on shape (9,8,5,11) DataArrayView.";      cout << "\tTest unaryOp on shape (9,8,5,11) DataArrayView.";
1859    
1860      // define the shape for the DataArrayView      // define the shape for the DataArrayView
1861      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
1862      shape.push_back(9);      shape.push_back(9);
1863      shape.push_back(8);      shape.push_back(8);
1864      shape.push_back(5);      shape.push_back(5);
# Line 1865  void DataArrayViewTestCase::testUnaryOp( Line 1866  void DataArrayViewTestCase::testUnaryOp(
1866    
1867      // allocate the data for the DataArrayView      // allocate the data for the DataArrayView
1868      int npoints=4;      int npoints=4;
1869      DataArrayView::ValueType data(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data(DataTypes::noValues(shape)*npoints,0);
1870    
1871      // constructor      // constructor
1872      DataArrayView dataView(data,shape);      DataArrayView dataView(data,shape);
# Line 1922  void DataArrayViewTestCase::testBinaryOp Line 1923  void DataArrayViewTestCase::testBinaryOp
1923      cout << "\tTest binaryOp on scalar DataArrayViews.";      cout << "\tTest binaryOp on scalar DataArrayViews.";
1924    
1925      // define the shape for the DataArrayViews      // define the shape for the DataArrayViews
1926      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
1927    
1928      // allocate the data for the DataArrayViews      // allocate the data for the DataArrayViews
1929      int npoints=4;      int npoints=4;
1930      DataArrayView::ValueType data1(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data1(DataTypes::noValues(shape)*npoints,0);
1931      DataArrayView::ValueType data2(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data2(DataTypes::noValues(shape)*npoints,0);
1932    
1933      // constructor      // constructor
1934      DataArrayView dataView1(data1,shape);      DataArrayView dataView1(data1,shape);
# Line 1960  void DataArrayViewTestCase::testBinaryOp Line 1961  void DataArrayViewTestCase::testBinaryOp
1961      cout << "\tTest binaryOp on shape (2,3) DataArrayViews.";      cout << "\tTest binaryOp on shape (2,3) DataArrayViews.";
1962    
1963      // define the shape for the DataArrayViews      // define the shape for the DataArrayViews
1964      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
1965      shape.push_back(2);      shape.push_back(2);
1966      shape.push_back(3);      shape.push_back(3);
1967    
1968      // allocate the data for the DataArrayViews      // allocate the data for the DataArrayViews
1969      int npoints=4;      int npoints=4;
1970      DataArrayView::ValueType data1(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data1(DataTypes::noValues(shape)*npoints,0);
1971      DataArrayView::ValueType data2(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data2(DataTypes::noValues(shape)*npoints,0);
1972    
1973      // constructor      // constructor
1974      DataArrayView dataView1(data1,shape);      DataArrayView dataView1(data1,shape);
# Line 2008  void DataArrayViewTestCase::testBinaryOp Line 2009  void DataArrayViewTestCase::testBinaryOp
2009      cout << "\tTest binaryOp on shape (9,8,5,11) DataArrayViews.";      cout << "\tTest binaryOp on shape (9,8,5,11) DataArrayViews.";
2010    
2011      // define the shape for the DataArrayViews      // define the shape for the DataArrayViews
2012      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
2013      shape.push_back(9);      shape.push_back(9);
2014      shape.push_back(8);      shape.push_back(8);
2015      shape.push_back(5);      shape.push_back(5);
# Line 2016  void DataArrayViewTestCase::testBinaryOp Line 2017  void DataArrayViewTestCase::testBinaryOp
2017    
2018      // allocate the data for the DataArrayViews      // allocate the data for the DataArrayViews
2019      int npoints=4;      int npoints=4;
2020      DataArrayView::ValueType data1(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data1(DataTypes::noValues(shape)*npoints,0);
2021      DataArrayView::ValueType data2(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data2(DataTypes::noValues(shape)*npoints,0);
2022    
2023      // constructor      // constructor
2024      DataArrayView dataView1(data1,shape);      DataArrayView dataView1(data1,shape);
# Line 2066  void DataArrayViewTestCase::testBinaryOp Line 2067  void DataArrayViewTestCase::testBinaryOp
2067      cout << "\tTest binaryOp on scalar DataArrayView and single value.";      cout << "\tTest binaryOp on scalar DataArrayView and single value.";
2068    
2069      // define the shape for the DataArrayView      // define the shape for the DataArrayView
2070      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
2071    
2072      // allocate the data for the DataArrayView      // allocate the data for the DataArrayView
2073      int npoints=4;      int npoints=4;
2074      DataArrayView::ValueType data(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data(DataTypes::noValues(shape)*npoints,0);
2075    
2076      // constructor      // constructor
2077      DataArrayView dataView(data,shape);      DataArrayView dataView(data,shape);
# Line 2100  void DataArrayViewTestCase::testBinaryOp Line 2101  void DataArrayViewTestCase::testBinaryOp
2101      cout << "\tTest binaryOp on shape (2,3) DataArrayView and single value.";      cout << "\tTest binaryOp on shape (2,3) DataArrayView and single value.";
2102    
2103      // define the shape for the DataArrayView      // define the shape for the DataArrayView
2104      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
2105      shape.push_back(2);      shape.push_back(2);
2106      shape.push_back(3);      shape.push_back(3);
2107    
2108      // allocate the data for the DataArrayView      // allocate the data for the DataArrayView
2109      int npoints=4;      int npoints=4;
2110      DataArrayView::ValueType data(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data(DataTypes::noValues(shape)*npoints,0);
2111    
2112      // constructor      // constructor
2113      DataArrayView dataView(data,shape);      DataArrayView dataView(data,shape);
# Line 2146  void DataArrayViewTestCase::testBinaryOp Line 2147  void DataArrayViewTestCase::testBinaryOp
2147      cout << "\tTest binaryOp on shape (9,8,5,11) DataArrayView and single value.";      cout << "\tTest binaryOp on shape (9,8,5,11) DataArrayView and single value.";
2148    
2149      // define the shape for the DataArrayView      // define the shape for the DataArrayView
2150      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
2151      shape.push_back(9);      shape.push_back(9);
2152      shape.push_back(8);      shape.push_back(8);
2153      shape.push_back(5);      shape.push_back(5);
# Line 2154  void DataArrayViewTestCase::testBinaryOp Line 2155  void DataArrayViewTestCase::testBinaryOp
2155    
2156      // allocate the data for the DataArrayView      // allocate the data for the DataArrayView
2157      int npoints=4;      int npoints=4;
2158      DataArrayView::ValueType data(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data(DataTypes::noValues(shape)*npoints,0);
2159    
2160      // constructor      // constructor
2161      DataArrayView dataView(data,shape);      DataArrayView dataView(data,shape);
# Line 2209  void DataArrayViewTestCase::testReductio Line 2210  void DataArrayViewTestCase::testReductio
2210      cout << "\tTest reductionOp on scalar DataArrayView.";      cout << "\tTest reductionOp on scalar DataArrayView.";
2211    
2212      // define the shape for the DataArrayView      // define the shape for the DataArrayView
2213      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
2214    
2215      // allocate the data for the DataArrayView      // allocate the data for the DataArrayView
2216      int npoints=4;      int npoints=4;
2217      DataArrayView::ValueType data(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data(DataTypes::noValues(shape)*npoints,0);
2218    
2219      // constructor      // constructor
2220      DataArrayView dataView(data,shape);      DataArrayView dataView(data,shape);
# Line 2241  void DataArrayViewTestCase::testReductio Line 2242  void DataArrayViewTestCase::testReductio
2242      cout << "\tTest reductionOp on shape (2,3) DataArrayView.";      cout << "\tTest reductionOp on shape (2,3) DataArrayView.";
2243    
2244      // define the shape for the DataArrayView      // define the shape for the DataArrayView
2245      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
2246      shape.push_back(2);      shape.push_back(2);
2247      shape.push_back(3);      shape.push_back(3);
2248    
2249      // allocate the data for the DataArrayView      // allocate the data for the DataArrayView
2250      int npoints=4;      int npoints=4;
2251      DataArrayView::ValueType data(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data(DataTypes::noValues(shape)*npoints,0);
2252    
2253      // constructor      // constructor
2254      DataArrayView dataView(data,shape);      DataArrayView dataView(data,shape);
# Line 2279  void DataArrayViewTestCase::testReductio Line 2280  void DataArrayViewTestCase::testReductio
2280      cout << "\tTest reductionOp on shape (9,8,5,11) DataArrayView.";      cout << "\tTest reductionOp on shape (9,8,5,11) DataArrayView.";
2281    
2282      // define the shape for the DataArrayView      // define the shape for the DataArrayView
2283      DataArrayView::ShapeType shape;      DataTypes::ShapeType shape;
2284      shape.push_back(9);      shape.push_back(9);
2285      shape.push_back(8);      shape.push_back(8);
2286      shape.push_back(5);      shape.push_back(5);
# Line 2287  void DataArrayViewTestCase::testReductio Line 2288  void DataArrayViewTestCase::testReductio
2288    
2289      // allocate the data for the DataArrayView      // allocate the data for the DataArrayView
2290      int npoints=4;      int npoints=4;
2291      DataArrayView::ValueType data(DataArrayView::noValues(shape)*npoints,0);      DataTypes::ValueType data(DataTypes::noValues(shape)*npoints,0);
2292    
2293      // constructor      // constructor
2294      DataArrayView dataView(data,shape);      DataArrayView dataView(data,shape);

Legend:
Removed from v.1387  
changed lines
  Added in v.1698

  ViewVC Help
Powered by ViewVC 1.1.26