Commit 2ad915e8 authored by Mert Burkay Çöteli's avatar Mert Burkay Çöteli
Browse files

AIM integration 220621

parent adc6521c
#include "guru.h"
#include "plan-guru-dft-r2c.h"
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "api/api.h"
#include "rdft/rdft.h"
X(plan) XGURU(dft_r2c)(int rank, const IODIM *dims,
int howmany_rank,
const IODIM *howmany_dims,
R *in, C *out, unsigned flags)
{
R *ro, *io;
if (!GURU_KOSHERP(rank, dims, howmany_rank, howmany_dims)) return 0;
EXTRACT_REIM(FFT_SIGN, out, &ro, &io);
return X(mkapiplan)(
0, flags,
X(mkproblem_rdft2_d_3pointers)(
MKTENSOR_IODIMS(rank, dims, 1, 2),
MKTENSOR_IODIMS(howmany_rank, howmany_dims, 1, 2),
TAINT_UNALIGNED(in, flags),
TAINT_UNALIGNED(ro, flags),
TAINT_UNALIGNED(io, flags), R2HC));
}
#include "guru.h"
#include "plan-guru-dft.h"
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "api/api.h"
#include "dft/dft.h"
X(plan) XGURU(dft)(int rank, const IODIM *dims,
int howmany_rank, const IODIM *howmany_dims,
C *in, C *out, int sign, unsigned flags)
{
R *ri, *ii, *ro, *io;
if (!GURU_KOSHERP(rank, dims, howmany_rank, howmany_dims)) return 0;
EXTRACT_REIM(sign, in, &ri, &ii);
EXTRACT_REIM(sign, out, &ro, &io);
return X(mkapiplan)(
sign, flags,
X(mkproblem_dft_d)(MKTENSOR_IODIMS(rank, dims, 2, 2),
MKTENSOR_IODIMS(howmany_rank, howmany_dims,
2, 2),
TAINT_UNALIGNED(ri, flags),
TAINT_UNALIGNED(ii, flags),
TAINT_UNALIGNED(ro, flags),
TAINT_UNALIGNED(io, flags)));
}
#include "guru.h"
#include "plan-guru-r2r.h"
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "api/api.h"
#include "rdft/rdft.h"
X(plan) XGURU(r2r)(int rank, const IODIM *dims,
int howmany_rank,
const IODIM *howmany_dims,
R *in, R *out,
const X(r2r_kind) * kind, unsigned flags)
{
X(plan) p;
rdft_kind *k;
if (!GURU_KOSHERP(rank, dims, howmany_rank, howmany_dims)) return 0;
k = X(map_r2r_kind)(rank, kind);
p = X(mkapiplan)(
0, flags,
X(mkproblem_rdft_d)(MKTENSOR_IODIMS(rank, dims, 1, 1),
MKTENSOR_IODIMS(howmany_rank, howmany_dims,
1, 1),
TAINT_UNALIGNED(in, flags),
TAINT_UNALIGNED(out, flags), k));
X(ifree0)(k);
return p;
}
#include "guru.h"
#include "plan-guru-split-dft-c2r.h"
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "api/api.h"
#include "rdft/rdft.h"
X(plan) XGURU(split_dft_c2r)(int rank, const IODIM *dims,
int howmany_rank, const IODIM *howmany_dims,
R *ri, R *ii, R *out, unsigned flags)
{
if (!GURU_KOSHERP(rank, dims, howmany_rank, howmany_dims)) return 0;
if (out != ri)
flags |= FFTW_DESTROY_INPUT;
return X(mkapiplan)(
0, flags,
X(mkproblem_rdft2_d_3pointers)(
MKTENSOR_IODIMS(rank, dims, 1, 1),
MKTENSOR_IODIMS(howmany_rank, howmany_dims, 1, 1),
TAINT_UNALIGNED(out, flags),
TAINT_UNALIGNED(ri, flags),
TAINT_UNALIGNED(ii, flags), HC2R));
}
#include "guru.h"
#include "plan-guru-split-dft-r2c.h"
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "api/api.h"
#include "rdft/rdft.h"
X(plan) XGURU(split_dft_r2c)(int rank, const IODIM *dims,
int howmany_rank,
const IODIM *howmany_dims,
R *in, R *ro, R *io, unsigned flags)
{
if (!GURU_KOSHERP(rank, dims, howmany_rank, howmany_dims)) return 0;
return X(mkapiplan)(
0, flags,
X(mkproblem_rdft2_d_3pointers)(
MKTENSOR_IODIMS(rank, dims, 1, 1),
MKTENSOR_IODIMS(howmany_rank, howmany_dims, 1, 1),
TAINT_UNALIGNED(in, flags),
TAINT_UNALIGNED(ro, flags),
TAINT_UNALIGNED(io, flags), R2HC));
}
#include "guru.h"
#include "plan-guru-split-dft.h"
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "api/api.h"
#include "dft/dft.h"
X(plan) XGURU(split_dft)(int rank, const IODIM *dims,
int howmany_rank, const IODIM *howmany_dims,
R *ri, R *ii, R *ro, R *io, unsigned flags)
{
if (!GURU_KOSHERP(rank, dims, howmany_rank, howmany_dims)) return 0;
return X(mkapiplan)(
ii - ri == 1 && io - ro == 1 ? FFT_SIGN : -FFT_SIGN, flags,
X(mkproblem_dft_d)(MKTENSOR_IODIMS(rank, dims, 1, 1),
MKTENSOR_IODIMS(howmany_rank, howmany_dims,
1, 1),
TAINT_UNALIGNED(ri, flags),
TAINT_UNALIGNED(ii, flags),
TAINT_UNALIGNED(ro, flags),
TAINT_UNALIGNED(io, flags)));
}
#include "guru64.h"
#include "plan-guru-dft-c2r.h"
#include "guru64.h"
#include "plan-guru-dft-r2c.h"
#include "guru64.h"
#include "plan-guru-dft.h"
#include "guru64.h"
#include "plan-guru-r2r.h"
#include "guru64.h"
#include "plan-guru-split-dft-c2r.h"
#include "guru64.h"
#include "plan-guru-split-dft-r2c.h"
#include "guru64.h"
#include "plan-guru-split-dft.h"
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "api/api.h"
#include "rdft/rdft.h"
X(plan) X(plan_many_dft_c2r)(int rank, const int *n,
int howmany,
C *in, const int *inembed,
int istride, int idist,
R *out, const int *onembed,
int ostride, int odist, unsigned flags)
{
R *ri, *ii;
int *nfi, *nfo;
int inplace;
X(plan) p;
if (!X(many_kosherp)(rank, n, howmany)) return 0;
EXTRACT_REIM(FFT_SIGN, in, &ri, &ii);
inplace = out == ri;
if (!inplace)
flags |= FFTW_DESTROY_INPUT;
p = X(mkapiplan)(
0, flags,
X(mkproblem_rdft2_d_3pointers)(
X(mktensor_rowmajor)(
rank, n,
X(rdft2_pad)(rank, n, inembed, inplace, 1, &nfi),
X(rdft2_pad)(rank, n, onembed, inplace, 0, &nfo),
2 * istride, ostride),
X(mktensor_1d)(howmany, 2 * idist, odist),
TAINT_UNALIGNED(out, flags),
TAINT_UNALIGNED(ri, flags), TAINT_UNALIGNED(ii, flags),
HC2R));
X(ifree0)(nfi);
X(ifree0)(nfo);
return p;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment