Commit 50a3588d authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Style and adding some ITA headers

parent 312ef727
/* /*
* ---------------------------------------------------------------- * ----------------------------------------------------------------
* *
* ITA core libs * ITA core libs
* (c) Copyright Institute of Technical Acoustics (ITA) * (c) Copyright Institute of Technical Acoustics (ITA)
* RWTH Aachen University, Germany, 2015-2017 * RWTH Aachen University, Germany, 2015-2018
* *
* ---------------------------------------------------------------- * ----------------------------------------------------------------
* ____ __________ _______ * ____ __________ _______
* // / //__ ___/ // _ | * // / //__ ___/ // _ |
* // / // / // /_| | * // / // / // /_| |
* // / // / // ___ | * // / // / // ___ |
* //__/ //__/ //__/ |__| * //__/ //__/ //__/ |__|
* *
* ---------------------------------------------------------------- * ----------------------------------------------------------------
* *
*/ */
#ifndef INCLUDE_WATCHER_ITA_FFT #ifndef INCLUDE_WATCHER_ITA_FFT
#define INCLUDE_WATCHER_ITA_FFT #define INCLUDE_WATCHER_ITA_FFT
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* ITA core libs * ITA core libs
* (c) Copyright Institute of Technical Acoustics (ITA) * (c) Copyright Institute of Technical Acoustics (ITA)
* RWTH Aachen University, Germany, 2015-2017 * RWTH Aachen University, Germany, 2015-2018
* *
* ---------------------------------------------------------------- * ----------------------------------------------------------------
* ____ __________ _______ * ____ __________ _______
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* ITA core libs * ITA core libs
* (c) Copyright Institute of Technical Acoustics (ITA) * (c) Copyright Institute of Technical Acoustics (ITA)
* RWTH Aachen University, Germany, 2015-2017 * RWTH Aachen University, Germany, 2015-2018
* *
* ---------------------------------------------------------------- * ----------------------------------------------------------------
* ____ __________ _______ * ____ __________ _______
......
...@@ -15,10 +15,14 @@ ...@@ -15,10 +15,14 @@
#endif #endif
ITAFFT::ITAFFT() : m_pRealization(NULL) {} ITAFFT::ITAFFT() : m_pRealization( NULL )
{
}
ITAFFT::ITAFFT(int type, int size, float* in, float* out, int iPlannungMethod) : m_pRealization(NULL) { ITAFFT::ITAFFT( int type, int size, float* in, float* out, int iPlannungMethod )
plan(type, size, in, out, iPlannungMethod); : m_pRealization( NULL )
{
plan( type, size, in, out, iPlannungMethod );
} }
ITAFFT::~ITAFFT() ITAFFT::~ITAFFT()
...@@ -26,18 +30,20 @@ ITAFFT::~ITAFFT() ...@@ -26,18 +30,20 @@ ITAFFT::~ITAFFT()
delete m_pRealization; delete m_pRealization;
} }
bool ITAFFT::isPlanned() { bool ITAFFT::isPlanned()
return (m_pRealization != NULL); {
return ( m_pRealization != NULL );
} }
void ITAFFT::plan(int type, int size, float* in, float* out, int iPlannungMethod) { void ITAFFT::plan( int type, int size, float* in, float* out, int iPlannungMethod )
{
// Falls bereits geplant wurde, wird der alte Plan verworfen // Falls bereits geplant wurde, wird der alte Plan verworfen
delete m_pRealization; delete m_pRealization;
unsigned int uiFlags = 0; unsigned int uiFlags = 0;
if (iPlannungMethod == PLAN_USING_MEASUREMENT) if( iPlannungMethod == PLAN_USING_MEASUREMENT )
uiFlags |= FFTW_MEASURE; uiFlags |= FFTW_MEASURE;
if (iPlannungMethod == PLAN_USING_ESTIMATION) if( iPlannungMethod == PLAN_USING_ESTIMATION )
uiFlags |= FFTW_ESTIMATE; uiFlags |= FFTW_ESTIMATE;
#ifdef ITAFFT_WITH_FFTW3 #ifdef ITAFFT_WITH_FFTW3
...@@ -45,26 +51,27 @@ void ITAFFT::plan(int type, int size, float* in, float* out, int iPlannungMethod ...@@ -45,26 +51,27 @@ void ITAFFT::plan(int type, int size, float* in, float* out, int iPlannungMethod
#endif #endif
#ifdef ITAFFT_WITH_MKL10 #ifdef ITAFFT_WITH_MKL10
m_pRealization = MKL10Backend::getInstance()->plan(type, size, in, out, uiFlags); m_pRealization = MKL10Backend::getInstance()->plan( type, size, in, out, uiFlags );
#endif #endif
if (m_pRealization == NULL) ITA_EXCEPT1(UNKNOWN, "Planning of the FFT failed"); if( m_pRealization == NULL )
ITA_EXCEPT1( UNKNOWN, "Planning of the FFT failed" );
} }
void ITAFFT::execute() void ITAFFT::execute()
{ {
if (m_pRealization == NULL) if( m_pRealization == NULL )
ITA_EXCEPT1(MODAL_EXCEPTION, "Attempt to execute unplanned ITAFFT"); ITA_EXCEPT1( MODAL_EXCEPTION, "Attempt to execute unplanned ITAFFT" );
m_pRealization->execute(); m_pRealization->execute();
} }
void ITAFFT::execute(float* in, float* out) void ITAFFT::execute( float* in, float* out )
{ {
if (m_pRealization == NULL) if( m_pRealization == NULL )
ITA_EXCEPT1(MODAL_EXCEPTION, "Attempt to execute unplanned ITAFFT"); ITA_EXCEPT1( MODAL_EXCEPTION, "Attempt to execute unplanned ITAFFT" );
m_pRealization->execute(in, out); m_pRealization->execute( in, out );
} }
std::string ITAFFT::toString() { std::string ITAFFT::toString() {
return (m_pRealization == NULL ? std::string("unplanned ITAFFT") : m_pRealization->toString()); return ( m_pRealization == NULL ? std::string( "unplanned ITAFFT" ) : m_pRealization->toString() );
} }
/* /*
* ITAFFT, eine Wrapper-Bibliothek fr schnelle Fouriertransformationen * ----------------------------------------------------------------
* *
* Autor: Frank Wefers (Frank.Wefers@akustik.rwth-aachen.de) * ITA core libs
* (c) Copyright Institute of Technical Acoustics (ITA)
* RWTH Aachen University, Germany, 2015-2018
* *
* (c) Copyright Institut fr Technische Akustik (ITA), RWTH Aachen * ----------------------------------------------------------------
* ____ __________ _______
* // / //__ ___/ // _ |
* // / // / // /_| |
* // / // / // ___ |
* //__/ //__/ //__/ |__|
*
* ----------------------------------------------------------------
* *
*/ */
// $Id: ITAFFTBackend.h,v 1.2 2009-02-10 22:37:42 stienen Exp $
#ifndef INCLUDE_WATCHER_ITA_FFT_BACKEND #ifndef INCLUDE_WATCHER_ITA_FFT_BACKEND
#define INCLUDE_WATCHER_ITA_FFT_BACKEND #define INCLUDE_WATCHER_ITA_FFT_BACKEND
......
/* /*
* ITAFFT, eine Wrapper-Bibliothek fr schnelle Fouriertransformationen * ----------------------------------------------------------------
* *
* Autor: Frank Wefers (Frank.Wefers@akustik.rwth-aachen.de) * ITA core libs
* (c) Copyright Institute of Technical Acoustics (ITA)
* RWTH Aachen University, Germany, 2015-2018
* *
* (c) Copyright 2008 Institut fr Technische Akustik (ITA), RWTH Aachen * ----------------------------------------------------------------
* ____ __________ _______
* // / //__ ___/ // _ |
* // / // / // /_| |
* // / // / // ___ |
* //__/ //__/ //__/ |__|
*
* ----------------------------------------------------------------
* *
*/ */
// $Id: ITAFFTFactory.h,v 1.1 2008-02-07 19:14:44 fwefers Exp $
#ifndef INCLUDE_WATCHER_ITA_FFT_FACTORY #ifndef INCLUDE_WATCHER_ITA_FFT_FACTORY
#define INCLUDE_WATCHER_ITA_FFT_FACTORY #define INCLUDE_WATCHER_ITA_FFT_FACTORY
......
/* /*
* ITAFFT, eine Wrapper-Bibliothek für schnelle Fouriertransformationen * ----------------------------------------------------------------
* *
* Autor: Frank Wefers (Frank.Wefers@akustik.rwth-aachen.de) * ITA core libs
* (c) Copyright Institute of Technical Acoustics (ITA)
* RWTH Aachen University, Germany, 2015-2018
* *
* (c) Copyright Institut für Technische Akustik (ITA), RWTH Aachen * ----------------------------------------------------------------
* ____ __________ _______
* // / //__ ___/ // _ |
* // / // / // /_| |
* // / // / // ___ |
* //__/ //__/ //__/ |__|
*
* ----------------------------------------------------------------
* *
*/ */
// $Id: ITAFFTRealization.h,v 1.2 2009-02-10 22:37:42 stienen Exp $
#ifndef INCLUDE_WATCHER_ITA_FFT_REALIZATION #ifndef INCLUDE_WATCHER_ITA_FFT_REALIZATION
#define INCLUDE_WATCHER_ITA_FFT_REALIZATION #define INCLUDE_WATCHER_ITA_FFT_REALIZATION
......
/* /*
* ITAFFT, eine Wrapper-Bibliothek fr schnelle Fouriertransformationen * ----------------------------------------------------------------
* *
* Autor: Frank Wefers (Frank.Wefers@akustik.rwth-aachen.de) * ITA core libs
* (c) Copyright Institute of Technical Acoustics (ITA)
* RWTH Aachen University, Germany, 2015-2018
* *
* (c) Copyright Institut fr Technische Akustik (ITA), RWTH Aachen * ----------------------------------------------------------------
* ____ __________ _______
* // / //__ ___/ // _ |
* // / // / // /_| |
* // / // / // ___ |
* //__/ //__/ //__/ |__|
*
* ----------------------------------------------------------------
* *
*/ */
// $Id: MKL10Backend.h,v 1.1 2009-12-14 10:19:17 fwefers Exp $ #ifndef IW_MKL10_BACKEND
#define IW_MKL10_BACKEND
#ifndef __MKL10_BACKEND_H__
#define __MKL10_BACKEND_H__
#ifdef WITH_MKL10 #ifdef ITAFFT_WITH_FFTW3
// Hinweis: Diese Implementierung nutzt derzeit das FFTW3-Interface der MKL // Hinweis: Diese Implementierung nutzt derzeit das FFTW3-Interface der MKL
...@@ -20,7 +27,8 @@ ...@@ -20,7 +27,8 @@
#include <ITAFFTBackend.h> #include <ITAFFTBackend.h>
#include <ITAFFTRealization.h> #include <ITAFFTRealization.h>
class MKL10Realization : public ITAFFTRealization { class MKL10Realization : public ITAFFTRealization
{
public: public:
MKL10Realization(int type, int size, float* in, float* out); MKL10Realization(int type, int size, float* in, float* out);
~MKL10Realization(); ~MKL10Realization();
...@@ -38,7 +46,8 @@ private: ...@@ -38,7 +46,8 @@ private:
std::string m_sInfo; std::string m_sInfo;
}; };
class MKL10Backend : public ITAFFTBackend { class MKL10Backend : public ITAFFTBackend
{
public: public:
static MKL10Backend* getInstance(); static MKL10Backend* getInstance();
...@@ -48,10 +57,6 @@ private: ...@@ -48,10 +57,6 @@ private:
static MKL10Backend* m_pInstance; // Singleton-Instanz static MKL10Backend* m_pInstance; // Singleton-Instanz
}; };
#endif // WITH_MKL10 #endif // ITAFFT_WITH_FFTW3
#endif // __MKL10_BACKEND_H__
#endif // IW_MKL10_BACKEND
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment