@@ -36,6 +36,8 @@ pub struct Plan<A, B, Plan: PlanSpec> {
36
36
phantom : PhantomData < ( A , B ) > ,
37
37
}
38
38
39
+ unsafe impl < A : Sync , B : Sync > Sync for Plan < A , B , Plan32 > { }
40
+ unsafe impl < A : Sync , B : Sync > Sync for Plan < A , B , Plan64 > { }
39
41
unsafe impl < A : Send , B : Send > Send for Plan < A , B , Plan32 > { }
40
42
unsafe impl < A : Send , B : Send > Send for Plan < A , B , Plan64 > { }
41
43
@@ -97,7 +99,7 @@ pub trait C2CPlan: Sized {
97
99
) -> Result < Self > ;
98
100
99
101
/// Execute complex-to-complex transform
100
- fn c2c ( & mut self , in_ : & mut [ Self :: Complex ] , out : & mut [ Self :: Complex ] ) -> Result < ( ) > ;
102
+ fn c2c ( & self , in_ : & mut [ Self :: Complex ] , out : & mut [ Self :: Complex ] ) -> Result < ( ) > ;
101
103
}
102
104
103
105
/// Trait for the plan of Real-to-Complex transformation
@@ -124,7 +126,7 @@ pub trait R2CPlan: Sized {
124
126
) -> Result < Self > ;
125
127
126
128
/// Execute real-to-complex transform
127
- fn r2c ( & mut self , in_ : & mut [ Self :: Real ] , out : & mut [ Self :: Complex ] ) -> Result < ( ) > ;
129
+ fn r2c ( & self , in_ : & mut [ Self :: Real ] , out : & mut [ Self :: Complex ] ) -> Result < ( ) > ;
128
130
}
129
131
130
132
/// Trait for the plan of Complex-to-Real transformation
@@ -151,7 +153,7 @@ pub trait C2RPlan: Sized {
151
153
) -> Result < Self > ;
152
154
153
155
/// Execute complex-to-real transform
154
- fn c2r ( & mut self , in_ : & mut [ Self :: Complex ] , out : & mut [ Self :: Real ] ) -> Result < ( ) > ;
156
+ fn c2r ( & self , in_ : & mut [ Self :: Complex ] , out : & mut [ Self :: Real ] ) -> Result < ( ) > ;
155
157
}
156
158
157
159
pub trait R2RPlan : Sized {
@@ -175,7 +177,7 @@ pub trait R2RPlan: Sized {
175
177
) -> Result < Self > ;
176
178
177
179
/// Execute complex-to-complex transform
178
- fn r2r ( & mut self , in_ : & mut [ Self :: Real ] , out : & mut [ Self :: Real ] ) -> Result < ( ) > ;
180
+ fn r2r ( & self , in_ : & mut [ Self :: Real ] , out : & mut [ Self :: Real ] ) -> Result < ( ) > ;
179
181
}
180
182
181
183
macro_rules! impl_c2c {
@@ -204,7 +206,7 @@ macro_rules! impl_c2c {
204
206
phantom: PhantomData ,
205
207
} )
206
208
}
207
- fn c2c( & mut self , in_: & mut [ Self :: Complex ] , out: & mut [ Self :: Complex ] ) -> Result <( ) > {
209
+ fn c2c( & self , in_: & mut [ Self :: Complex ] , out: & mut [ Self :: Complex ] ) -> Result <( ) > {
208
210
self . check( in_, out) ?;
209
211
unsafe { $exec( self . plan, in_. as_mut_ptr( ) , out. as_mut_ptr( ) ) } ;
210
212
Ok ( ( ) )
@@ -242,7 +244,7 @@ macro_rules! impl_r2c {
242
244
phantom: PhantomData ,
243
245
} )
244
246
}
245
- fn r2c( & mut self , in_: & mut [ Self :: Real ] , out: & mut [ Self :: Complex ] ) -> Result <( ) > {
247
+ fn r2c( & self , in_: & mut [ Self :: Real ] , out: & mut [ Self :: Complex ] ) -> Result <( ) > {
246
248
self . check( in_, out) ?;
247
249
unsafe { $exec( self . plan, in_. as_mut_ptr( ) , out. as_mut_ptr( ) ) } ;
248
250
Ok ( ( ) )
@@ -280,7 +282,7 @@ macro_rules! impl_c2r {
280
282
phantom: PhantomData ,
281
283
} )
282
284
}
283
- fn c2r( & mut self , in_: & mut [ Self :: Complex ] , out: & mut [ Self :: Real ] ) -> Result <( ) > {
285
+ fn c2r( & self , in_: & mut [ Self :: Complex ] , out: & mut [ Self :: Real ] ) -> Result <( ) > {
284
286
self . check( in_, out) ?;
285
287
unsafe { $exec( self . plan, in_. as_mut_ptr( ) , out. as_mut_ptr( ) ) } ;
286
288
Ok ( ( ) )
@@ -318,7 +320,7 @@ macro_rules! impl_r2r {
318
320
phantom: PhantomData ,
319
321
} )
320
322
}
321
- fn r2r( & mut self , in_: & mut [ Self :: Real ] , out: & mut [ Self :: Real ] ) -> Result <( ) > {
323
+ fn r2r( & self , in_: & mut [ Self :: Real ] , out: & mut [ Self :: Real ] ) -> Result <( ) > {
322
324
self . check( in_, out) ?;
323
325
unsafe { $exec( self . plan, in_. as_mut_ptr( ) , out. as_mut_ptr( ) ) } ;
324
326
Ok ( ( ) )
0 commit comments