iir1
Loading...
Searching...
No Matches
Common.h
1
36#ifndef IIR1_COMMON_H
37#define IIR1_COMMON_H
38
39//
40// This must be the first file included in every DspFilters header and source
41//
42
43#ifdef _MSC_VER
44# pragma warning (disable: 4100)
45#endif
46
47// This exports the classes/structures to the windows DLL
48#ifdef _WIN32
49# define DllExport __declspec( dllexport )
50# ifndef _CRT_SECURE_NO_WARNINGS
51# define _CRT_SECURE_NO_WARNINGS
52# endif
53#else
54# define DllExport
55#endif
56
57#include <stdlib.h>
58
59#include <cassert>
60#include <cfloat>
61#include <cmath>
62#include <complex>
63#include <cstring>
64#include <string>
65#include <limits>
66#include <vector>
67#include <stdexcept> // for invalid_argument
68
69static const char orderTooHigh[] = "Requested order is too high. Provide a higher order for the template.";
70
71#define DEFAULT_FILTER_ORDER 4
72
78inline void throw_invalid_argument(const char* msg) {
79
80#ifndef IIR1_NO_EXCEPTIONS
81 throw std::invalid_argument(msg);
82#else
83 (void) msg; // Discard parameter
84 abort();
85#endif
86
87}
88
89#endif