Style and adding some ITA headers

parent 312ef727
/*
* ----------------------------------------------------------------
*
* ITA core libs
* (c) Copyright Institute of Technical Acoustics (ITA)
* RWTH Aachen University, Germany, 2015-2017
*
* ----------------------------------------------------------------
* ____ __________ _______
* // / //__ ___/ // _ |
* // / // / // /_| |
* // / // / // ___ |
* //__/ //__/ //__/ |__|
*
* ----------------------------------------------------------------
*
*/
* ----------------------------------------------------------------
*
* ITA core libs
* (c) Copyright Institute of Technical Acoustics (ITA)
* RWTH Aachen University, Germany, 2015-2018
*
* ----------------------------------------------------------------
* ____ __________ _______
* // / //__ ___/ // _ |
* // / // / // /_| |
* // / // / // ___ |
* //__/ //__/ //__/ |__|
*
* ----------------------------------------------------------------
*
*/
#ifndef INCLUDE_WATCHER_ITA_FFT
#define INCLUDE_WATCHER_ITA_FFT
......
......@@ -3,7 +3,7 @@
*
* ITA core libs
* (c) Copyright Institute of Technical Acoustics (ITA)
* RWTH Aachen University, Germany, 2015-2017
* RWTH Aachen University, Germany, 2015-2018
*
* ----------------------------------------------------------------
* ____ __________ _______
......
......@@ -3,7 +3,7 @@
*
* ITA core libs
* (c) Copyright Institute of Technical Acoustics (ITA)
* RWTH Aachen University, Germany, 2015-2017
* RWTH Aachen University, Germany, 2015-2018
*
* ----------------------------------------------------------------
* ____ __________ _______
......
......@@ -15,10 +15,14 @@
#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) {
plan(type, size, in, out, iPlannungMethod);
ITAFFT::ITAFFT( int type, int size, float* in, float* out, int iPlannungMethod )
: m_pRealization( NULL )
{
plan( type, size, in, out, iPlannungMethod );
}
ITAFFT::~ITAFFT()
......@@ -26,18 +30,20 @@ ITAFFT::~ITAFFT()
delete m_pRealization;
}
bool ITAFFT::isPlanned() {
return (m_pRealization != NULL);
bool ITAFFT::isPlanned()
{
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
delete m_pRealization;
unsigned int uiFlags = 0;
if (iPlannungMethod == PLAN_USING_MEASUREMENT)
if( iPlannungMethod == PLAN_USING_MEASUREMENT )
uiFlags |= FFTW_MEASURE;
if (iPlannungMethod == PLAN_USING_ESTIMATION)
if( iPlannungMethod == PLAN_USING_ESTIMATION )
uiFlags |= FFTW_ESTIMATE;
#ifdef ITAFFT_WITH_FFTW3
......@@ -45,26 +51,27 @@ void ITAFFT::plan(int type, int size, float* in, float* out, int iPlannungMethod
#endif
#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
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)
ITA_EXCEPT1(MODAL_EXCEPTION, "Attempt to execute unplanned ITAFFT");
if( m_pRealization == NULL )
ITA_EXCEPT1( MODAL_EXCEPTION, "Attempt to execute unplanned ITAFFT" );
m_pRealization->execute();
}
void ITAFFT::execute(float* in, float* out)
void ITAFFT::execute( float* in, float* out )
{
if (m_pRealization == NULL)
ITA_EXCEPT1(MODAL_EXCEPTION, "Attempt to execute unplanned ITAFFT");
m_pRealization->execute(in, out);
if( m_pRealization == NULL )
ITA_EXCEPT1( MODAL_EXCEPTION, "Attempt to execute unplanned ITAFFT" );
m_pRealization->execute( in, out );
}
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
#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
#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
#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 __MKL10_BACKEND_H__
#define __MKL10_BACKEND_H__
#ifndef IW_MKL10_BACKEND
#define IW_MKL10_BACKEND
#ifdef WITH_MKL10
#ifdef ITAFFT_WITH_FFTW3
// Hinweis: Diese Implementierung nutzt derzeit das FFTW3-Interface der MKL
......@@ -20,7 +27,8 @@
#include <ITAFFTBackend.h>
#include <ITAFFTRealization.h>
class MKL10Realization : public ITAFFTRealization {
class MKL10Realization : public ITAFFTRealization
{
public:
MKL10Realization(int type, int size, float* in, float* out);
~MKL10Realization();
......@@ -38,7 +46,8 @@ private:
std::string m_sInfo;
};
class MKL10Backend : public ITAFFTBackend {
class MKL10Backend : public ITAFFTBackend
{
public:
static MKL10Backend* getInstance();
......@@ -48,10 +57,6 @@ private:
static MKL10Backend* m_pInstance; // Singleton-Instanz
};
#endif // WITH_MKL10
#endif // __MKL10_BACKEND_H__
#endif // ITAFFT_WITH_FFTW3
#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