Skip to content

Commit 59559fe

Browse files
author
Marius Isken
committed
planer: constant reference to plan
1 parent fdd5c3b commit 59559fe

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

fftw/src/plan.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pub trait C2CPlan: Sized {
9797
) -> Result<Self>;
9898

9999
/// Execute complex-to-complex transform
100-
fn c2c(&mut self, in_: &mut [Self::Complex], out: &mut [Self::Complex]) -> Result<()>;
100+
fn c2c(&self, in_: &mut [Self::Complex], out: &mut [Self::Complex]) -> Result<()>;
101101
}
102102

103103
/// Trait for the plan of Real-to-Complex transformation
@@ -124,7 +124,7 @@ pub trait R2CPlan: Sized {
124124
) -> Result<Self>;
125125

126126
/// Execute real-to-complex transform
127-
fn r2c(&mut self, in_: &mut [Self::Real], out: &mut [Self::Complex]) -> Result<()>;
127+
fn r2c(&self, in_: &mut [Self::Real], out: &mut [Self::Complex]) -> Result<()>;
128128
}
129129

130130
/// Trait for the plan of Complex-to-Real transformation
@@ -151,7 +151,7 @@ pub trait C2RPlan: Sized {
151151
) -> Result<Self>;
152152

153153
/// Execute complex-to-real transform
154-
fn c2r(&mut self, in_: &mut [Self::Complex], out: &mut [Self::Real]) -> Result<()>;
154+
fn c2r(&self, in_: &mut [Self::Complex], out: &mut [Self::Real]) -> Result<()>;
155155
}
156156

157157
pub trait R2RPlan: Sized {
@@ -175,7 +175,7 @@ pub trait R2RPlan: Sized {
175175
) -> Result<Self>;
176176

177177
/// Execute complex-to-complex transform
178-
fn r2r(&mut self, in_: &mut [Self::Real], out: &mut [Self::Real]) -> Result<()>;
178+
fn r2r(&self, in_: &mut [Self::Real], out: &mut [Self::Real]) -> Result<()>;
179179
}
180180

181181
macro_rules! impl_c2c {
@@ -204,7 +204,7 @@ macro_rules! impl_c2c {
204204
phantom: PhantomData,
205205
})
206206
}
207-
fn c2c(&mut self, in_: &mut [Self::Complex], out: &mut [Self::Complex]) -> Result<()> {
207+
fn c2c(&self, in_: &mut [Self::Complex], out: &mut [Self::Complex]) -> Result<()> {
208208
self.check(in_, out)?;
209209
unsafe { $exec(self.plan, in_.as_mut_ptr(), out.as_mut_ptr()) };
210210
Ok(())
@@ -242,7 +242,7 @@ macro_rules! impl_r2c {
242242
phantom: PhantomData,
243243
})
244244
}
245-
fn r2c(&mut self, in_: &mut [Self::Real], out: &mut [Self::Complex]) -> Result<()> {
245+
fn r2c(&self, in_: &mut [Self::Real], out: &mut [Self::Complex]) -> Result<()> {
246246
self.check(in_, out)?;
247247
unsafe { $exec(self.plan, in_.as_mut_ptr(), out.as_mut_ptr()) };
248248
Ok(())
@@ -280,7 +280,7 @@ macro_rules! impl_c2r {
280280
phantom: PhantomData,
281281
})
282282
}
283-
fn c2r(&mut self, in_: &mut [Self::Complex], out: &mut [Self::Real]) -> Result<()> {
283+
fn c2r(&self, in_: &mut [Self::Complex], out: &mut [Self::Real]) -> Result<()> {
284284
self.check(in_, out)?;
285285
unsafe { $exec(self.plan, in_.as_mut_ptr(), out.as_mut_ptr()) };
286286
Ok(())
@@ -318,7 +318,7 @@ macro_rules! impl_r2r {
318318
phantom: PhantomData,
319319
})
320320
}
321-
fn r2r(&mut self, in_: &mut [Self::Real], out: &mut [Self::Real]) -> Result<()> {
321+
fn r2r(&self, in_: &mut [Self::Real], out: &mut [Self::Real]) -> Result<()> {
322322
self.check(in_, out)?;
323323
unsafe { $exec(self.plan, in_.as_mut_ptr(), out.as_mut_ptr()) };
324324
Ok(())

0 commit comments

Comments
 (0)