/* TODO: revise this. */ static int applicable(const solver *ego_, const problem *p_, const planner *plnr, int *rp) { const S *ego = (const S *)ego_; if (!applicable0(ego_, p_, rp)) return 0; if (NO_RANK_SPLITSP(plnr) && (ego->spltrnk != ego->buddies[0])) return 0; if (NO_UGLYP(plnr)) { /* Heuristic: if the vector stride is greater than the transform sz, don't use (prefer to do the vector loop first with a vrank-geq1 plan). */ const problem_rdft *p = (const problem_rdft *) p_; if (p->vecsz->rnk > 0 && X(tensor_min_stride)(p->vecsz) > X(tensor_max_index)(p->sz)) return 0; } return 1; }
/* TODO: revise this. */ static int applicable(const solver *ego_, const problem *p_, const planner *plnr, int *rp) { const S *ego = (const S *)ego_; const problem_dft *p = (const problem_dft *) p_; if (!applicable0(ego_, p_, rp)) return 0; /* fixed spltrnk (unlike fftw2's spltrnk=1, default buddies[0] is spltrnk=0, which is an asymptotic "theoretical optimum" for an ideal cache; it's equivalent to spltrnk=1 for rnk < 4). */ if (NO_RANK_SPLITSP(plnr) && (ego->spltrnk != ego->buddies[0])) return 0; /* Heuristic: if the vector stride is greater than the transform sz, don't use (prefer to do the vector loop first with a vrank-geq1 plan). */ if (NO_UGLYP(plnr)) if (p->vecsz->rnk > 0 && X(tensor_min_stride)(p->vecsz) > X(tensor_max_index)(p->sz)) return 0; return 1; }