Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

fftw_setup.c File Reference

#include <stdio.h>
#include "fftw.h"
#include "mrilib.h"

Go to the source code of this file.


Functions

int main (int argc, char *argv[])

Function Documentation

int main int    argc,
char *    argv[]
 

\** File : SUMA.c

Author:
: Ziad Saad Date : Thu Dec 27 16:21:01 EST 2001
Purpose :

Input paramters :

Parameters:
param  Usage : SUMA ( )
Returns :
Returns:
Support :
See also:
OpenGL prog. Guide 3rd edition , varray.c from book's sample code
Side effects :

Definition at line 7 of file fftw_setup.c.

References argc, COX_cpu_time(), FFTW_BACKWARD, fftw_create_plan(), fftw_destroy_plan(), fftw_export_wisdom_to_string(), FFTW_FORWARD, fftw_free, FFTW_MEASURE, FFTW_USE_WISDOM, and p.

00008 {
00009    fftw_plan p ;
00010    char fname[1024]="\0" , *w ;
00011    int ii , len[] = { 1024 , 3600 , 784 , 2000 , 864 , 0 } ;
00012    double cpu_old , cpu_new ;
00013 
00014    cpu_old = COX_cpu_time() ;
00015    for( ii=0 ; len[ii] > 1 ; ii++ ){
00016       fprintf(stderr,"FFTW calibrating N=%5d",len[ii]) ; fflush(stdout) ;
00017       p = fftw_create_plan(len[ii], FFTW_FORWARD , FFTW_MEASURE|FFTW_USE_WISDOM);
00018       fftw_destroy_plan(p) ;
00019       fprintf(stderr,".") ; fflush(stdout) ;
00020       p = fftw_create_plan(len[ii], FFTW_BACKWARD, FFTW_MEASURE|FFTW_USE_WISDOM);
00021       fftw_destroy_plan(p) ;
00022       fprintf(stderr,".") ; fflush(stdout) ;
00023       cpu_new = COX_cpu_time() ;
00024       fprintf(stderr," %.2f CPU s\n",cpu_new-cpu_old) ; cpu_old = cpu_new ;
00025    }
00026 
00027    w = fftw_export_wisdom_to_string() ;
00028    printf("%s\n",w) ;
00029    fftw_free(w) ;
00030    exit(0) ;
00031 }
 

Powered by Plone

This site conforms to the following standards: