Пример #1
0
void fftw_wisdom_add(int n, int flags, fftw_direction dir,
		   enum fftw_node_type type,
		   int signature)
{
     struct wisdom *p;

     if (!(flags & FFTW_USE_WISDOM))
	  return;		/* simply ignore if wisdom is disabled */

     if (!(flags & FFTW_MEASURE))
	  return;  /* only measurements produce wisdom */

     if (fftw_wisdom_lookup(n, flags, dir, &type, &signature, 1))
	  return;		/* wisdom overwrote old wisdom */

     p = (struct wisdom *) fftw_malloc(sizeof(struct wisdom));

     p->n = n;
     p->flags = flags;
     p->dir = dir;
     p->type = type;
     p->signature = signature;

     /* remember this wisdom */
     p->next = wisdom_list;
     wisdom_list = p;
}
Пример #2
0
void fftw_wisdom_add(int n, int flags, fftw_direction dir,
		     enum fftw_wisdom_category category,
		     int istride, int ostride,
		     enum fftw_node_type type,
		     int signature,
		     fftw_recurse_kind recurse_kind)
{
     struct wisdom *p;

     if ((flags & FFTW_NO_VECTOR_RECURSE) && 
	 recurse_kind == FFTW_VECTOR_RECURSE)
	  fftw_die("bug in planner (conflicting plan options)\n");

     if (!(flags & FFTW_USE_WISDOM))
	  return;		/* simply ignore if wisdom is disabled */

     if (!(flags & FFTW_MEASURE))
	  return;		/* only measurements produce wisdom */

     if (fftw_wisdom_lookup(n, flags, dir, category, istride, ostride,
			    &type, &signature, &recurse_kind, 1))
	  return;		/* wisdom overwrote old wisdom */

     p = (struct wisdom *) fftw_malloc(sizeof(struct wisdom));

     p->n = n;
     p->flags = flags;
     p->dir = dir;
     p->category = category;
     p->istride = istride;
     p->ostride = ostride;
     p->type = type;
     p->signature = signature;
     p->recurse_kind = recurse_kind;

     /* remember this wisdom */
     p->next = wisdom_list;
     wisdom_list = p;
}