summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/include/gnuradio/gr_complex.h
blob: a88862c2a3746579cc169cb8deea999d5839bfcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/* -*- c++ -*- */
/*
 * Copyright 2004,2018 Free Software Foundation, Inc.
 *
 * This file is part of GNU Radio
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 *
 */

#ifndef INCLUDED_GR_COMPLEX_H
#define INCLUDED_GR_COMPLEX_H

#include <complex>
typedef std::complex<float> gr_complex;
typedef std::complex<double> gr_complexd;

inline bool is_complex(gr_complex x)
{
    (void)x;
    return true;
}
inline bool is_complex(gr_complexd x)
{
    (void)x;
    return true;
}
inline bool is_complex(float x)
{
    (void)x;
    return false;
}
inline bool is_complex(double x)
{
    (void)x;
    return false;
}
inline bool is_complex(int x)
{
    (void)x;
    return false;
}
inline bool is_complex(char x)
{
    (void)x;
    return false;
}
inline bool is_complex(short x)
{
    (void)x;
    return false;
}

#endif /* INCLUDED_GR_COMPLEX_H */