iir1: iir/Common.h Source File

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# 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 <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