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 output real input single precision version *
35
* ( complex float out float in) *
36
**************************************************************************/
38
#define TYPEOUT cfloat
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_fcf_noop
47
#include "filter-func-template.c"
50
unsigned int filtfunc(hfilter filt, const void* x, void* y, unsigned int ns)
53
if ( (filt->dispatch_code == 1)
54
&& !(((uintptr_t)x) % (4*sizeof(float)))
55
&& !(((uintptr_t)y) % (4*sizeof(float))) )
56
filter_fcf_sse3(filt, x, y, ns);
58
#endif //SUPPORT_SSE3_SET
59
filter_fcf_noop(filt, x, y, ns);
65
void set_filterfn_fcf(struct rtf_filter* filt)
67
filt->filter_fn = filtfunc;
70
// Check that sample can be aligned on 16 byte boundaries
71
if (cputest_sse3() && !(filt->num_chann%4))
72
filt->dispatch_code = 1;
73
#endif //SUPPORT_SSE3_SET