2
Copyright (C) 2010-2011 Nicolas Bourdaud <nicolas.bourdaud@epfl.ch>
4
This file is part of the rtfilter library
6
The rtfilter library is free software: you can redistribute it and/or
7
modify it under the terms of the version 3 of the GNU Lesser General
8
Public License as published by the Free Software Foundation.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU Lesser General Public License for more details.
15
You should have received a copy of the GNU Lesser General Public License
16
along with this program. If not, see <http://www.gnu.org/licenses/>.
28
#include "filter-internal.h"
29
#include "filter-funcs.h"
30
#include "probesimd.h"
33
/**************************************************************************
34
* Complex double precision version *
35
* ( complex double ) *
36
**************************************************************************/
37
#define TYPEIN cdouble
38
#define TYPEOUT cdouble
39
#define add_dat(d1,d2) ((d1)+(d2))
40
#define mul_in_dat(d1,d2,part) ((d1)*(d2))
41
#define mul_dat(d1,d2) ((d1)*(d2))
42
#define zero_dat() (0)
43
#define set1_dat(data) (data)
44
#define TYPEIN_LOCAL TYPEIN
45
#define TYPEOUT_LOCAL TYPEOUT
46
#define FILTER_DATADEP_FUNC filter_cd_noop
47
#include "filter-func-template.c"
50
unsigned int filtfunc(hfilter filt, const void* x, void* y, unsigned int ns)
53
if ( !(((uintptr_t)x) % (2*sizeof(double)))
54
&& !(((uintptr_t)y) % (2*sizeof(double))) )
55
filter_cd_sse3(filt, x, y, ns);
57
#endif //SUPPORT_SSE3_SET
58
filter_cd_noop(filt, x, y, ns);
64
void set_filterfn_cd(struct rtf_filter* filt)
66
filt->filter_fn = filtfunc;
67
filt->dispatch_code = cputest_sse3() ? 1 : 0;