Skip to content

Commit

Permalink
Only include BuferPool.h in the necessary cpp files
Browse files Browse the repository at this point in the history
Don't include it in the DspObject header. It isn't needed in most
objects and simply adds compile-time overhead.
  • Loading branch information
mhroth committed Jul 23, 2012
1 parent 5a6013b commit ed967d1
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/DspInlet.cpp
Expand Up @@ -21,6 +21,7 @@
*/

#include "ArrayArithmetic.h"
#include "BufferPool.h"
#include "DspInlet.h"
#include "PdGraph.h"

Expand Down
1 change: 1 addition & 0 deletions src/DspObject.cpp
Expand Up @@ -21,6 +21,7 @@
*/

#include "ArrayArithmetic.h"
#include "BufferPool.h"
#include "DspImplicitAdd.h"
#include "DspObject.h"
#include "PdGraph.h"
Expand Down
7 changes: 1 addition & 6 deletions src/DspObject.h
Expand Up @@ -25,20 +25,15 @@

#include <queue>
#include "ArrayArithmetic.h"
#include "BufferPool.h"
#include "MessageObject.h"

#if __SSE__
// allocate memory aligned to 16-bytes memory boundary
#define ALLOC_ALIGNED_BUFFER(_numBytes) (float *) _mm_malloc(_numBytes, 16);
#define FREE_ALIGNED_BUFFER(_buffer) _mm_free(_buffer);
#else
// NOTE(mhroth): valloc seems to work well, but is deprecated!
#define ALLOC_ALIGNED_BUFFER(_numBytes) (float *) valloc(_numBytes);
#endif

#if __SSE__
#define FREE_ALIGNED_BUFFER(_buffer) _mm_free(_buffer);
#else
#define FREE_ALIGNED_BUFFER(_buffer) free(_buffer);
#endif

Expand Down
1 change: 1 addition & 0 deletions src/DspOutlet.cpp
Expand Up @@ -20,6 +20,7 @@
*
*/

#include "BufferPool.h"
#include "DspOutlet.h"
#include "PdGraph.h"

Expand Down
1 change: 1 addition & 0 deletions src/DspReceive.cpp
Expand Up @@ -20,6 +20,7 @@
*
*/

#include "BufferPool.h"
#include "DspReceive.h"
#include "PdGraph.h"

Expand Down
1 change: 1 addition & 0 deletions src/DspRfft.cpp
Expand Up @@ -21,6 +21,7 @@
*/

#include "ArrayArithmetic.h"
#include "BufferPool.h"
#include "DspRfft.h"
#include "PdGraph.h"

Expand Down

0 comments on commit ed967d1

Please sign in to comment.