aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-10-16 06:31:56 -0700
committerChris Robinson <[email protected]>2023-10-16 06:31:56 -0700
commitc5af96992543c76c249f1c67478733fff96fc952 (patch)
tree24ada23ae17c4cc5025806062a02a3055f81a4d5 /common
parent9f6ab01087a117842b26fda74fecfd2869c0993e (diff)
Constify some parameters
Diffstat (limited to 'common')
-rw-r--r--common/pffft.cpp33
-rw-r--r--common/pffft.h10
2 files changed, 24 insertions, 19 deletions
diff --git a/common/pffft.cpp b/common/pffft.cpp
index ea93dfc8..fd9f240a 100644
--- a/common/pffft.cpp
+++ b/common/pffft.cpp
@@ -1773,7 +1773,7 @@ NEVER_INLINE(void) pffft_real_preprocess(const size_t Ncvec, const v4sf *in, v4s
}
-void pffft_transform_internal(PFFFT_Setup *setup, const v4sf *vinput, v4sf *voutput,
+void pffft_transform_internal(const PFFFT_Setup *setup, const v4sf *vinput, v4sf *voutput,
v4sf *scratch, const pffft_direction_t direction, const bool ordered)
{
assert(scratch != nullptr);
@@ -1850,7 +1850,8 @@ void pffft_transform_internal(PFFFT_Setup *setup, const v4sf *vinput, v4sf *vout
} // namespace
-void pffft_zreorder(PFFFT_Setup *setup, const float *in, float *out, pffft_direction_t direction)
+void pffft_zreorder(const PFFFT_Setup *setup, const float *in, float *out,
+ pffft_direction_t direction)
{
assert(in != out);
@@ -1902,8 +1903,8 @@ void pffft_zreorder(PFFFT_Setup *setup, const float *in, float *out, pffft_direc
}
}
-void pffft_zconvolve_scale_accumulate(PFFFT_Setup *s, const float *a, const float *b, float *ab,
- float scaling)
+void pffft_zconvolve_scale_accumulate(const PFFFT_Setup *s, const float *a, const float *b,
+ float *ab, float scaling)
{
const size_t Ncvec{s->Ncvec};
const v4sf *RESTRICT va{reinterpret_cast<const v4sf*>(a)};
@@ -2004,7 +2005,7 @@ void pffft_zconvolve_scale_accumulate(PFFFT_Setup *s, const float *a, const floa
}
}
-void pffft_zconvolve_accumulate(PFFFT_Setup *s, const float *a, const float *b, float *ab)
+void pffft_zconvolve_accumulate(const PFFFT_Setup *s, const float *a, const float *b, float *ab)
{
const size_t Ncvec{s->Ncvec};
const v4sf *RESTRICT va{reinterpret_cast<const v4sf*>(a)};
@@ -2058,7 +2059,8 @@ void pffft_zconvolve_accumulate(PFFFT_Setup *s, const float *a, const float *b,
}
-void pffft_transform(PFFFT_Setup *setup, const float *input, float *output, float *work, pffft_direction_t direction)
+void pffft_transform(const PFFFT_Setup *setup, const float *input, float *output, float *work,
+ pffft_direction_t direction)
{
assert(VALIGNED(input) && VALIGNED(output) && VALIGNED(work));
pffft_transform_internal(setup, reinterpret_cast<const v4sf*>(al::assume_aligned<16>(input)),
@@ -2066,7 +2068,8 @@ void pffft_transform(PFFFT_Setup *setup, const float *input, float *output, floa
reinterpret_cast<v4sf*>(al::assume_aligned<16>(work)), direction, false);
}
-void pffft_transform_ordered(PFFFT_Setup *setup, const float *input, float *output, float *work, pffft_direction_t direction)
+void pffft_transform_ordered(const PFFFT_Setup *setup, const float *input, float *output,
+ float *work, pffft_direction_t direction)
{
assert(VALIGNED(input) && VALIGNED(output) && VALIGNED(work));
pffft_transform_internal(setup, reinterpret_cast<const v4sf*>(al::assume_aligned<16>(input)),
@@ -2081,7 +2084,7 @@ void pffft_transform_ordered(PFFFT_Setup *setup, const float *input, float *outp
namespace {
#define pffft_transform_internal_nosimd pffft_transform_internal
-void pffft_transform_internal_nosimd(PFFFT_Setup *setup, const float *input, float *output,
+void pffft_transform_internal_nosimd(const PFFFT_Setup *setup, const float *input, float *output,
float *scratch, const pffft_direction_t direction, bool ordered)
{
const size_t Ncvec{setup->Ncvec};
@@ -2138,7 +2141,7 @@ void pffft_transform_internal_nosimd(PFFFT_Setup *setup, const float *input, flo
} // namespace
#define pffft_zreorder_nosimd pffft_zreorder
-void pffft_zreorder_nosimd(PFFFT_Setup *setup, const float *in, float *out,
+void pffft_zreorder_nosimd(const PFFFT_Setup *setup, const float *in, float *out,
pffft_direction_t direction)
{
const size_t N{setup->N};
@@ -2166,8 +2169,8 @@ void pffft_zreorder_nosimd(PFFFT_Setup *setup, const float *in, float *out,
}
}
-void pffft_zconvolve_scale_accumulate(PFFFT_Setup *s, const float *a, const float *b, float *ab,
- float scaling)
+void pffft_zconvolve_scale_accumulate(const PFFFT_Setup *s, const float *a, const float *b,
+ float *ab, float scaling)
{
size_t Ncvec{s->Ncvec};
@@ -2188,7 +2191,7 @@ void pffft_zconvolve_scale_accumulate(PFFFT_Setup *s, const float *a, const floa
}
}
-void pffft_zconvolve_accumulate(PFFFT_Setup *s, const float *a, const float *b, float *ab)
+void pffft_zconvolve_accumulate(const PFFFT_Setup *s, const float *a, const float *b, float *ab)
{
size_t Ncvec{s->Ncvec};
@@ -2210,12 +2213,14 @@ void pffft_zconvolve_accumulate(PFFFT_Setup *s, const float *a, const float *b,
}
-void pffft_transform(PFFFT_Setup *setup, const float *input, float *output, float *work, pffft_direction_t direction)
+void pffft_transform(const PFFFT_Setup *setup, const float *input, float *output, float *work,
+ pffft_direction_t direction)
{
pffft_transform_internal(setup, input, output, work, direction, false);
}
-void pffft_transform_ordered(PFFFT_Setup *setup, const float *input, float *output, float *work, pffft_direction_t direction)
+void pffft_transform_ordered(const PFFFT_Setup *setup, const float *input, float *output,
+ float *work, pffft_direction_t direction)
{
pffft_transform_internal(setup, input, output, work, direction, true);
}
diff --git a/common/pffft.h b/common/pffft.h
index 4bc3ebb6..9cff9e54 100644
--- a/common/pffft.h
+++ b/common/pffft.h
@@ -126,7 +126,7 @@ void pffft_destroy_setup(PFFFT_Setup *setup);
*
* The input and output parameters may alias.
*/
-void pffft_transform(PFFFT_Setup *setup, const float *input, float *output, float *work, pffft_direction_t direction);
+void pffft_transform(const PFFFT_Setup *setup, const float *input, float *output, float *work, pffft_direction_t direction);
/**
* Similar to pffft_transform, but handles the complex values in the usual form
@@ -138,7 +138,7 @@ void pffft_transform(PFFFT_Setup *setup, const float *input, float *output, floa
*
* The input and output parameters may alias.
*/
-void pffft_transform_ordered(PFFFT_Setup *setup, const float *input, float *output, float *work, pffft_direction_t direction);
+void pffft_transform_ordered(const PFFFT_Setup *setup, const float *input, float *output, float *work, pffft_direction_t direction);
/**
* Reorder the z-domain data. For PFFFT_FORWARD, it reorders from the internal
@@ -149,7 +149,7 @@ void pffft_transform_ordered(PFFFT_Setup *setup, const float *input, float *outp
*
* The input and output parameters should not alias.
*/
-void pffft_zreorder(PFFFT_Setup *setup, const float *input, float *output, pffft_direction_t direction);
+void pffft_zreorder(const PFFFT_Setup *setup, const float *input, float *output, pffft_direction_t direction);
/**
* Perform a multiplication of the z-domain data in dft_a and dft_b, and scale
@@ -162,7 +162,7 @@ void pffft_zreorder(PFFFT_Setup *setup, const float *input, float *output, pffft
*
* The dft_a, dft_b, and dft_ab parameters may alias.
*/
-void pffft_zconvolve_scale_accumulate(PFFFT_Setup *setup, const float *dft_a, const float *dft_b, float *dft_ab, float scaling);
+void pffft_zconvolve_scale_accumulate(const PFFFT_Setup *setup, const float *dft_a, const float *dft_b, float *dft_ab, float scaling);
/**
* Perform a multiplication of the z-domain data in dft_a and dft_b, and
@@ -172,7 +172,7 @@ void pffft_zconvolve_scale_accumulate(PFFFT_Setup *setup, const float *dft_a, co
*
* The dft_a, dft_b, and dft_ab parameters may alias.
*/
-void pffft_zconvolve_accumulate(PFFFT_Setup *setup, const float *dft_a, const float *dft_b, float *dft_ab);
+void pffft_zconvolve_accumulate(const PFFFT_Setup *setup, const float *dft_a, const float *dft_b, float *dft_ab);
/**
* The float buffers must have the correct alignment (16-byte boundary on intel