Chris@10: /* Chris@10: * Copyright (c) 2003, 2007-11 Matteo Frigo Chris@10: * Copyright (c) 2003, 2007-11 Massachusetts Institute of Technology Chris@10: * Chris@10: * This program is free software; you can redistribute it and/or modify Chris@10: * it under the terms of the GNU General Public License as published by Chris@10: * the Free Software Foundation; either version 2 of the License, or Chris@10: * (at your option) any later version. Chris@10: * Chris@10: * This program is distributed in the hope that it will be useful, Chris@10: * but WITHOUT ANY WARRANTY; without even the implied warranty of Chris@10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Chris@10: * GNU General Public License for more details. Chris@10: * Chris@10: * You should have received a copy of the GNU General Public License Chris@10: * along with this program; if not, write to the Free Software Chris@10: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Chris@10: * Chris@10: */ Chris@10: Chris@10: Chris@10: /* Chris@10: * This header file must include every file or define every Chris@10: * type or macro which is required to compile a codelet. Chris@10: */ Chris@10: Chris@10: #ifndef __DFT_CODELET_H__ Chris@10: #define __DFT_CODELET_H__ Chris@10: Chris@10: #include "ifftw.h" Chris@10: Chris@10: /************************************************************** Chris@10: * types of codelets Chris@10: **************************************************************/ Chris@10: Chris@10: /* DFT codelets */ Chris@10: typedef struct kdft_desc_s kdft_desc; Chris@10: Chris@10: typedef struct { Chris@10: int (*okp)( Chris@10: const kdft_desc *desc, Chris@10: const R *ri, const R *ii, const R *ro, const R *io, Chris@10: INT is, INT os, INT vl, INT ivs, INT ovs, Chris@10: const planner *plnr); Chris@10: INT vl; Chris@10: } kdft_genus; Chris@10: Chris@10: struct kdft_desc_s { Chris@10: INT sz; /* size of transform computed */ Chris@10: const char *nam; Chris@10: opcnt ops; Chris@10: const kdft_genus *genus; Chris@10: INT is; Chris@10: INT os; Chris@10: INT ivs; Chris@10: INT ovs; Chris@10: }; Chris@10: Chris@10: typedef void (*kdft) (const R *ri, const R *ii, R *ro, R *io, Chris@10: stride is, stride os, INT vl, INT ivs, INT ovs); Chris@10: void X(kdft_register)(planner *p, kdft codelet, const kdft_desc *desc); Chris@10: Chris@10: Chris@10: typedef struct ct_desc_s ct_desc; Chris@10: Chris@10: typedef struct { Chris@10: int (*okp)( Chris@10: const struct ct_desc_s *desc, Chris@10: const R *rio, const R *iio, Chris@10: INT rs, INT vs, INT m, INT mb, INT me, INT ms, Chris@10: const planner *plnr); Chris@10: INT vl; Chris@10: } ct_genus; Chris@10: Chris@10: struct ct_desc_s { Chris@10: INT radix; Chris@10: const char *nam; Chris@10: const tw_instr *tw; Chris@10: const ct_genus *genus; Chris@10: opcnt ops; Chris@10: INT rs; Chris@10: INT vs; Chris@10: INT ms; Chris@10: }; Chris@10: Chris@10: typedef void (*kdftw) (R *rioarray, R *iioarray, const R *W, Chris@10: stride ios, INT mb, INT me, INT ms); Chris@10: void X(kdft_dit_register)(planner *p, kdftw codelet, const ct_desc *desc); Chris@10: void X(kdft_dif_register)(planner *p, kdftw codelet, const ct_desc *desc); Chris@10: Chris@10: Chris@10: typedef void (*kdftwsq) (R *rioarray, R *iioarray, Chris@10: const R *W, stride is, stride vs, Chris@10: INT mb, INT me, INT ms); Chris@10: void X(kdft_difsq_register)(planner *p, kdftwsq codelet, const ct_desc *desc); Chris@10: Chris@10: Chris@10: extern const solvtab X(solvtab_dft_standard); Chris@10: extern const solvtab X(solvtab_dft_sse2); Chris@10: extern const solvtab X(solvtab_dft_avx); Chris@10: extern const solvtab X(solvtab_dft_altivec); Chris@10: extern const solvtab X(solvtab_dft_neon); Chris@10: Chris@10: #endif /* __DFT_CODELET_H__ */