iir1
Loading...
Searching...
No Matches
Common.h
1
35
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# ifndef _CRT_SECURE_NO_WARNINGS
46# define _CRT_SECURE_NO_WARNINGS
47# endif
48#endif
49
50// This exports the classes/structures to the windows DLL
51#if defined(_WIN32) && defined(iir_EXPORTS)
52#define IIR_EXPORT __declspec( dllexport )
53#else
54#define IIR_EXPORT
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 <array>
68#include <stdexcept> // for invalid_argument
69
70static const char orderTooHigh[] = "Requested order is too high. Provide a higher order for the template.";
71
72#define DEFAULT_FILTER_ORDER 4
73
79inline void throw_invalid_argument(const char* msg) {
80
81#ifndef IIR1_NO_EXCEPTIONS
82 throw std::invalid_argument(msg);
83#else
84 (void) msg; // Discard parameter
85 abort();
86#endif
87
88}
89
90#endif