@@ -20,7 +20,7 @@ use base::dimension::Dynamic;
2020use base:: dimension:: { Dim , DimName } ;
2121use base:: array_storage:: ArrayStorage ;
2222#[ cfg( any( feature = "std" , feature = "alloc" ) ) ]
23- use base:: matrix_vec :: MatrixVec ;
23+ use base:: vec_storage :: VecStorage ;
2424use base:: storage:: { Storage , StorageMut } ;
2525use base:: Scalar ;
2626
@@ -29,7 +29,7 @@ use base::Scalar;
2929 * Allocator.
3030 *
3131 */
32- /// An allocator based on `GenericArray` and `MatrixVec ` for statically-sized and dynamically-sized
32+ /// An allocator based on `GenericArray` and `VecStorage ` for statically-sized and dynamically-sized
3333/// matrices respectively.
3434pub struct DefaultAllocator ;
3535
7777// Dynamic - Dynamic
7878#[ cfg( any( feature = "std" , feature = "alloc" ) ) ]
7979impl < N : Scalar , C : Dim > Allocator < N , Dynamic , C > for DefaultAllocator {
80- type Buffer = MatrixVec < N , Dynamic , C > ;
80+ type Buffer = VecStorage < N , Dynamic , C > ;
8181
8282 #[ inline]
8383 unsafe fn allocate_uninitialized ( nrows : Dynamic , ncols : C ) -> Self :: Buffer {
@@ -86,7 +86,7 @@ impl<N: Scalar, C: Dim> Allocator<N, Dynamic, C> for DefaultAllocator {
8686 res. reserve_exact ( length) ;
8787 res. set_len ( length) ;
8888
89- MatrixVec :: new ( nrows, ncols, res)
89+ VecStorage :: new ( nrows, ncols, res)
9090 }
9191
9292 #[ inline]
@@ -101,14 +101,14 @@ impl<N: Scalar, C: Dim> Allocator<N, Dynamic, C> for DefaultAllocator {
101101 assert ! ( res. len( ) == nrows. value( ) * ncols. value( ) ,
102102 "Allocation from iterator error: the iterator did not yield the correct number of elements." ) ;
103103
104- MatrixVec :: new ( nrows, ncols, res)
104+ VecStorage :: new ( nrows, ncols, res)
105105 }
106106}
107107
108108// Static - Dynamic
109109#[ cfg( any( feature = "std" , feature = "alloc" ) ) ]
110110impl < N : Scalar , R : DimName > Allocator < N , R , Dynamic > for DefaultAllocator {
111- type Buffer = MatrixVec < N , R , Dynamic > ;
111+ type Buffer = VecStorage < N , R , Dynamic > ;
112112
113113 #[ inline]
114114 unsafe fn allocate_uninitialized ( nrows : R , ncols : Dynamic ) -> Self :: Buffer {
@@ -117,7 +117,7 @@ impl<N: Scalar, R: DimName> Allocator<N, R, Dynamic> for DefaultAllocator {
117117 res. reserve_exact ( length) ;
118118 res. set_len ( length) ;
119119
120- MatrixVec :: new ( nrows, ncols, res)
120+ VecStorage :: new ( nrows, ncols, res)
121121 }
122122
123123 #[ inline]
@@ -132,7 +132,7 @@ impl<N: Scalar, R: DimName> Allocator<N, R, Dynamic> for DefaultAllocator {
132132 assert ! ( res. len( ) == nrows. value( ) * ncols. value( ) ,
133133 "Allocation from iterator error: the iterator did not yield the correct number of elements." ) ;
134134
135- MatrixVec :: new ( nrows, ncols, res)
135+ VecStorage :: new ( nrows, ncols, res)
136136 }
137137}
138138
@@ -186,7 +186,7 @@ where
186186 rto : Dynamic ,
187187 cto : CTo ,
188188 buf : ArrayStorage < N , RFrom , CFrom > ,
189- ) -> MatrixVec < N , Dynamic , CTo >
189+ ) -> VecStorage < N , Dynamic , CTo >
190190 {
191191 let mut res = <Self as Allocator < N , Dynamic , CTo > >:: allocate_uninitialized ( rto, cto) ;
192192
@@ -215,7 +215,7 @@ where
215215 rto : RTo ,
216216 cto : Dynamic ,
217217 buf : ArrayStorage < N , RFrom , CFrom > ,
218- ) -> MatrixVec < N , RTo , Dynamic >
218+ ) -> VecStorage < N , RTo , Dynamic >
219219 {
220220 let mut res = <Self as Allocator < N , RTo , Dynamic > >:: allocate_uninitialized ( rto, cto) ;
221221
@@ -238,11 +238,11 @@ impl<N: Scalar, CFrom: Dim, CTo: Dim> Reallocator<N, Dynamic, CFrom, Dynamic, CT
238238 unsafe fn reallocate_copy (
239239 rto : Dynamic ,
240240 cto : CTo ,
241- buf : MatrixVec < N , Dynamic , CFrom > ,
242- ) -> MatrixVec < N , Dynamic , CTo >
241+ buf : VecStorage < N , Dynamic , CFrom > ,
242+ ) -> VecStorage < N , Dynamic , CTo >
243243 {
244244 let new_buf = buf. resize ( rto. value ( ) * cto. value ( ) ) ;
245- MatrixVec :: new ( rto, cto, new_buf)
245+ VecStorage :: new ( rto, cto, new_buf)
246246 }
247247}
248248
@@ -254,11 +254,11 @@ impl<N: Scalar, CFrom: Dim, RTo: DimName> Reallocator<N, Dynamic, CFrom, RTo, Dy
254254 unsafe fn reallocate_copy (
255255 rto : RTo ,
256256 cto : Dynamic ,
257- buf : MatrixVec < N , Dynamic , CFrom > ,
258- ) -> MatrixVec < N , RTo , Dynamic >
257+ buf : VecStorage < N , Dynamic , CFrom > ,
258+ ) -> VecStorage < N , RTo , Dynamic >
259259 {
260260 let new_buf = buf. resize ( rto. value ( ) * cto. value ( ) ) ;
261- MatrixVec :: new ( rto, cto, new_buf)
261+ VecStorage :: new ( rto, cto, new_buf)
262262 }
263263}
264264
@@ -270,11 +270,11 @@ impl<N: Scalar, RFrom: DimName, CTo: Dim> Reallocator<N, RFrom, Dynamic, Dynamic
270270 unsafe fn reallocate_copy (
271271 rto : Dynamic ,
272272 cto : CTo ,
273- buf : MatrixVec < N , RFrom , Dynamic > ,
274- ) -> MatrixVec < N , Dynamic , CTo >
273+ buf : VecStorage < N , RFrom , Dynamic > ,
274+ ) -> VecStorage < N , Dynamic , CTo >
275275 {
276276 let new_buf = buf. resize ( rto. value ( ) * cto. value ( ) ) ;
277- MatrixVec :: new ( rto, cto, new_buf)
277+ VecStorage :: new ( rto, cto, new_buf)
278278 }
279279}
280280
@@ -286,10 +286,10 @@ impl<N: Scalar, RFrom: DimName, RTo: DimName> Reallocator<N, RFrom, Dynamic, RTo
286286 unsafe fn reallocate_copy (
287287 rto : RTo ,
288288 cto : Dynamic ,
289- buf : MatrixVec < N , RFrom , Dynamic > ,
290- ) -> MatrixVec < N , RTo , Dynamic >
289+ buf : VecStorage < N , RFrom , Dynamic > ,
290+ ) -> VecStorage < N , RTo , Dynamic >
291291 {
292292 let new_buf = buf. resize ( rto. value ( ) * cto. value ( ) ) ;
293- MatrixVec :: new ( rto, cto, new_buf)
293+ VecStorage :: new ( rto, cto, new_buf)
294294 }
295295}
0 commit comments