资源简介
fftw的源代码,以及vs工程,直接编译即可
代码片段和文件信息
/*
* Copyright (c) 2003 2007-8 Matteo Frigo
* Copyright (c) 2003 2007-8 Massachusetts Institute of Technology
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not write to the Free Software
* Foundation Inc. 59 Temple Place Suite 330 Boston MA 02111-1307 USA
*
*/
#include “api.h“
static plan *mkplan0(planner *plnr unsigned flags
const problem *prb int hash_info
wisdom_state_t wisdom_state)
WITH_ALIGNED_STACK({
/* map API flags into FFTW flags */
X(mapflags)(plnr flags);
plnr->flags.hash_info = hash_info;
plnr->wisdom_state = wisdom_state;
/* create plan */
return plnr->adt->mkplan(plnr prb);
})
static void aligned_awake(plan *ego enum wakefulness wakefulness)
WITH_ALIGNED_STACK({
X(plan_awake)(ego wakefulness);
})
static unsigned force_estimator(unsigned flags)
{
flags &= ~(FFTW_MEASURE | FFTW_PATIENT | FFTW_EXHAUSTIVE);
return (flags | FFTW_ESTIMATE);
}
static plan *mkplan(planner *plnr unsigned flags
const problem *prb int hash_info)
{
plan *pln;
pln = mkplan0(plnr flags prb hash_info WISDOM_NORMAL);
if (plnr->wisdom_state == WISDOM_NORMAL && !pln) {
/* maybe the planner failed because of inconsistent wisdom;
plan again ignoring infeasible wisdom */
pln = mkplan0(plnr force_estimator(flags) prb
hash_info WISDOM_IGNORE_INFEASIBLE);
}
if (plnr->wisdom_state == WISDOM_IS_BOGUS) {
/* if the planner detected a wisdom inconsistency
forget all wisdom and plan again */
plnr->adt->forget(plnr FORGET_EVERYTHING);
A(!pln);
pln = mkplan0(plnr flags prb hash_info WISDOM_NORMAL);
if (plnr->wisdom_state == WISDOM_IS_BOGUS) {
/* if it still fails plan without wisdom */
plnr->adt->forget(plnr FORGET_EVERYTHING);
A(!pln);
pln = mkplan0(plnr force_estimator(flags)
prb hash_info WISDOM_IGNORE_ALL);
}
}
return pln;
}
apiplan *X(mkapiplan)(int sign unsigned flags problem *prb)
{
apiplan *p = 0;
plan *pln;
unsigned flags_used_for_planning;
planner *plnr = X(the_planner)();
unsigned int pats[] = {FFTW_ESTIMATE FFTW_MEASURE
FFTW_PATIENT FFTW_EXHAUSTIVE};
int pat pat_max;
if (flags & FFTW_WISDOM_ONLY) {
/* Special mode that returns a plan only if wisdom is present
and returns 0 otherwise. This is now documented in the manua
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2946 2013-10-09 11:09 fftw-3.2.2\.svn\all-wcprops
文件 4359 2013-10-09 11:09 fftw-3.2.2\.svn\entries
文件 53 2013-10-09 11:08 fftw-3.2.2\.svn\prop-ba
文件 34470 2013-10-09 11:09 fftw-3.2.2\.svn\text-ba
文件 417 2013-10-09 11:07 fftw-3.2.2\.svn\text-ba
文件 1054 2013-10-09 11:07 fftw-3.2.2\.svn\text-ba
文件 677802 2013-10-09 11:08 fftw-3.2.2\.svn\text-ba
文件 46260 2013-10-09 11:07 fftw-3.2.2\.svn\text-ba
文件 10308 2013-10-09 11:08 fftw-3.2.2\.svn\text-ba
文件 11349 2013-10-09 11:07 fftw-3.2.2\.svn\text-ba
文件 33952 2013-10-09 11:07 fftw-3.2.2\.svn\text-ba
文件 19197 2013-10-09 11:08 fftw-3.2.2\.svn\text-ba
文件 857795 2013-10-09 11:07 fftw-3.2.2\.svn\text-ba
文件 2285 2013-10-09 11:08 fftw-3.2.2\.svn\text-ba
文件 18002 2013-10-09 11:08 fftw-3.2.2\.svn\text-ba
文件 837 2013-10-09 11:08 fftw-3.2.2\.svn\text-ba
文件 17867 2013-10-09 11:07 fftw-3.2.2\.svn\text-ba
文件 224 2013-10-09 11:09 fftw-3.2.2\.svn\text-ba
文件 16123 2013-10-09 11:08 fftw-3.2.2\.svn\text-ba
文件 13620 2013-10-09 11:09 fftw-3.2.2\.svn\text-ba
文件 11410 2013-10-09 11:08 fftw-3.2.2\.svn\text-ba
文件 3295194 2013-10-09 11:08 fftw-3.2.2\.svn\text-ba
文件 243452 2013-10-09 11:08 fftw-3.2.2\.svn\text-ba
文件 2003 2013-10-09 11:09 fftw-3.2.2\.svn\text-ba
文件 27891 2013-10-09 11:07 fftw-3.2.2\.svn\text-ba
文件 11135 2013-10-09 11:09 fftw-3.2.2\.svn\text-ba
文件 14374 2013-10-09 11:08 fftw-3.2.2\.svn\text-ba
文件 3972 2013-10-09 11:09 fftw-3.2.2\.svn\text-ba
文件 1338 2013-10-09 11:08 fftw-3.2.2\.svn\text-ba
文件 1124 2013-10-09 11:09 fftw-3.2.2\.svn\text-ba
............此处省略2618个文件信息
评论
共有 条评论