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