BRL-CAD
dsp.h
Go to the documentation of this file.
1 /* D S P . H
2  * BRL-CAD
3  *
4  * Copyright (c) 2011-2014 United States Government as represented by
5  * the U.S. Army Research Laboratory.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License
9  * version 2.1 as published by the Free Software Foundation.
10  *
11  * This library is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this file; see the file named COPYING for more
18  * information.
19  */
20 /*
21  * Private header, only for dsp implementation use.
22  *
23  */
24 
25 #ifndef LIBRT_PRIMITIVES_DSP_DSP_H
26 #define LIBRT_PRIMITIVES_DSP_DSP_H
27 
28 /* access to the DSP data array */
29 # define DSP(_p, _x, _y) ( \
30  ((_p) && (_p)->dsp_buf) ? \
31  ((unsigned short *)((_p)->dsp_buf))[ \
32  (_y) * ((struct rt_dsp_internal *)_p)->dsp_xcnt + (_x) \
33  ] : 0)
34 
35 #endif /* LIBRT_PRIMITIVES_DSP_DSP_H */
36 
37 /*
38  * Local Variables:
39  * tab-width: 8
40  * mode: C
41  * indent-tabs-mode: t
42  * c-file-style: "stroustrup"
43  * End:
44  * ex: shiftwidth=4 tabstop=8
45  */