Safe Haskell | None |
---|---|
Language | Haskell2010 |
Various utiliy signal processing functions
- class Mult a b where
- mult :: a -> b -> a
- interleavedIQUnsigned256ToFloat :: (Num a, Integral a, Num b, Fractional b, Vector v1 a, Vector v2 (Complex b)) => v1 a -> v2 (Complex b)
- interleavedIQUnsignedByteToFloat :: Vector CUChar -> Vector (Complex Float)
- interleavedIQUnsignedByteToFloatSSE :: Vector CUChar -> Vector (Complex Float)
- interleavedIQUnsignedByteToFloatAVX :: Vector CUChar -> Vector (Complex Float)
- interleavedIQUnsignedByteToFloatFast :: CPUInfo -> Vector CUChar -> Vector (Complex Float)
- interleavedIQSigned2048ToFloat :: (Num a, Integral a, Num b, Fractional b, Vector v1 a, Vector v2 (Complex b)) => v1 a -> v2 (Complex b)
- interleavedIQSignedWordToFloat :: Vector CShort -> Vector (Complex Float)
- interleavedIQSignedWordToFloatSSE :: Vector CShort -> Vector (Complex Float)
- interleavedIQSignedWordToFloatAVX :: Vector CShort -> Vector (Complex Float)
- scaleC :: Float -> Vector Float -> MVector RealWorld Float -> IO ()
- scaleCSSE :: Float -> Vector Float -> MVector RealWorld Float -> IO ()
- scaleCAVX :: Float -> Vector Float -> MVector RealWorld Float -> IO ()
- scaleFast :: CPUInfo -> Float -> Vector Float -> MVector RealWorld Float -> IO ()
- cplxMap :: (a -> b) -> Complex a -> Complex b
- quarterBandUp :: (Vector v (Complex n), Num n) => Int -> v (Complex n)
Classes
A class for things that can be multiplied by a scalar.
Conversion to Floating Point
interleavedIQUnsigned256ToFloat :: (Num a, Integral a, Num b, Fractional b, Vector v1 a, Vector v2 (Complex b)) => v1 a -> v2 (Complex b) Source
Create a vector of complex floating samples from a vector of interleaved I Q components. Each input element ranges from 0 to 255. This is the format that RTLSDR devices use.
interleavedIQUnsignedByteToFloat :: Vector CUChar -> Vector (Complex Float) Source
Same as interleavedIQUnsigned256ToFloat
but written in C and specialized for unsigned byte inputs and Float outputs.
interleavedIQUnsignedByteToFloatSSE :: Vector CUChar -> Vector (Complex Float) Source
Same as interleavedIQUnsigned256ToFloat
but written in C using SSE intrinsics and specialized for unsigned byte inputs and Float outputs.
interleavedIQUnsignedByteToFloatAVX :: Vector CUChar -> Vector (Complex Float) Source
Same as interleavedIQUnsigned256ToFloat
but written in C using AVX intrinsics and specialized for unsigned byte inputs and Float outputs.
interleavedIQUnsignedByteToFloatFast :: CPUInfo -> Vector CUChar -> Vector (Complex Float) Source
Same as interleavedIQUnsigned256ToFloat
but uses the fastest SIMD instruction set your processor supports and specialized for unsigned byte inputs and Float outputs.
interleavedIQSigned2048ToFloat :: (Num a, Integral a, Num b, Fractional b, Vector v1 a, Vector v2 (Complex b)) => v1 a -> v2 (Complex b) Source
Create a vector of complex float samples from a vector of interleaved I Q components. Each input element ranges from -2048 to 2047. This is the format that the BladeRF uses.
interleavedIQSignedWordToFloat :: Vector CShort -> Vector (Complex Float) Source
Same as interleavedIQUnsigned256ToFloat
but written in C and specialized for unsigned byte inputs and Float outputs.
interleavedIQSignedWordToFloatSSE :: Vector CShort -> Vector (Complex Float) Source
Same as interleavedIQUnsigned256ToFloat
but written in C using SSE intrinsics and specialized for unsigned byte inputs and Float outputs.
interleavedIQSignedWordToFloatAVX :: Vector CShort -> Vector (Complex Float) Source
Same as interleavedIQUnsigned256ToFloat
but written in C using AVX intrinsics and specialized for unsigned byte inputs and Float outputs.
Scaling
Scale a vector, written in C
Scale a vector, written in C using SSE intrinsics
Scale a vector, written in C using AVX intrinsics
scaleFast :: CPUInfo -> Float -> Vector Float -> MVector RealWorld Float -> IO () Source
Scale a vector. Uses the fastest SIMD instruction set your processor supports.
Misc Utils
Apply a function to both parts of a complex number