From e028fc4b8ba6db68a19ed7caefde4a231549211c Mon Sep 17 00:00:00 2001 From: kevin Date: Fri, 6 May 2022 16:08:10 -0400 Subject: [PATCH] cwVectOps.h : Minor changes to mul<> and ampl_to_db() to clarify types. --- cwVectOps.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cwVectOps.h b/cwVectOps.h index 3934792..55aa632 100644 --- a/cwVectOps.h +++ b/cwVectOps.h @@ -54,7 +54,7 @@ namespace cw void copy( T0* v0, const T1* v1, unsigned n ) { for(unsigned i=0; i @@ -151,7 +151,7 @@ namespace cw void mul( T0* v0, const T1* v1, unsigned n ) { for(unsigned i=0; i @@ -169,8 +169,8 @@ namespace cw v0[i] *= scalar; } - template< typename T0, typename T1 > - void mul( T0* y0, const T0* v0, const T1& scalar, unsigned n ) + template< typename T0, typename T1, typename T2 > + void mul( T0* y0, const T1* v0, const T2& scalar, unsigned n ) { for(unsigned i=0; i - T* ampl_to_db( T* dbp, const T* sbp, unsigned dn, T minDb=-1000 ) + template< typename T0, typename T1 > + T0* ampl_to_db( T0* dbp, const T1* sbp, unsigned dn, T0 minDb=-1000 ) { - T minVal = pow(10.0,minDb/20.0); - T* dp = dbp; - T* ep = dp + dn; + T0 minVal = pow(10.0,minDb/20.0); + T0* dp = dbp; + T0* ep = dp + dn; for(; dp