| 1118 | |
| 1119 | template<class View> |
| 1120 | ViewArray<View>::ViewArray(Space& home, const ViewArray<View>& a) |
| 1121 | : n(a.size()) { |
| 1122 | if (n>0) { |
| 1123 | x = home.alloc<View>(n); |
| 1124 | for (int i=0; i<n; i++) |
| 1125 | x[i] = a[i]; |
| 1126 | } else { |
| 1127 | x = nullptr; |
| 1128 | } |
| 1129 | } |
| 1130 | template<class View> |
| 1131 | ViewArray<View>::ViewArray(Region& r, const ViewArray<View>& a) |
| 1132 | : n(a.size()) { |