Skip to content

Commit

Permalink
Add fq_poly_mulhigh and friends
Browse files Browse the repository at this point in the history
  • Loading branch information
mwhansen committed Nov 28, 2013
1 parent 9486d0d commit 01c7e4c
Show file tree
Hide file tree
Showing 22 changed files with 1,112 additions and 0 deletions.
36 changes: 36 additions & 0 deletions fq_nmod_poly/mulhigh.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*=============================================================================
This file is part of FLINT.
FLINT 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.
FLINT 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 FLINT; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
=============================================================================*/
/******************************************************************************
Copyright (C) 2013 Mike Hansen
******************************************************************************/

#include "fq_nmod_poly.h"

#ifdef T
#undef T
#endif

#define T fq_nmod
#define CAP_T FQ_NMOD
#include "fq_poly_templates/mulhigh.c"
#undef CAP_T
#undef T
36 changes: 36 additions & 0 deletions fq_nmod_poly/mulhigh_classical.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*=============================================================================
This file is part of FLINT.
FLINT 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.
FLINT 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 FLINT; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
=============================================================================*/
/******************************************************************************
Copyright (C) 2013 Mike Hansen
******************************************************************************/

#include "fq_nmod_poly.h"

#ifdef T
#undef T
#endif

#define T fq_nmod
#define CAP_T FQ_NMOD
#include "fq_poly_templates/mulhigh_classical.c"
#undef CAP_T
#undef T
36 changes: 36 additions & 0 deletions fq_nmod_poly/test/t-mulhigh.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*=============================================================================
This file is part of FLINT.
FLINT 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.
FLINT 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 FLINT; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
=============================================================================*/
/******************************************************************************
Copyright (C) 2013 Mike Hansen
******************************************************************************/

#include "fq_nmod_poly.h"

#ifdef T
#undef T
#endif

#define T fq_nmod
#define CAP_T FQ_NMOD
#include "fq_poly_templates/test/t-mulhigh.c"
#undef CAP_T
#undef T
36 changes: 36 additions & 0 deletions fq_nmod_poly/test/t-mulhigh_classical.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*=============================================================================
This file is part of FLINT.
FLINT 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.
FLINT 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 FLINT; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
=============================================================================*/
/******************************************************************************
Copyright (C) 2013 Mike Hansen
******************************************************************************/

#include "fq_nmod_poly.h"

#ifdef T
#undef T
#endif

#define T fq_nmod
#define CAP_T FQ_NMOD
#include "fq_poly_templates/test/t-mulhigh_classical.c"
#undef CAP_T
#undef T
36 changes: 36 additions & 0 deletions fq_nmod_vec/scalar_mul_fq.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*=============================================================================
This file is part of FLINT.
FLINT 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.
FLINT 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 FLINT; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
=============================================================================*/
/******************************************************************************
Copyright (C) 2013 Mike Hansen
******************************************************************************/

#include "fq_nmod_vec.h"

#ifdef T
#undef T
#endif

#define T fq_nmod
#define CAP_T FQ_NMOD
#include "fq_vec_templates/scalar_mul_fq.c"
#undef CAP_T
#undef T
36 changes: 36 additions & 0 deletions fq_poly/mulhigh.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*=============================================================================
This file is part of FLINT.
FLINT 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.
FLINT 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 FLINT; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
=============================================================================*/
/******************************************************************************
Copyright (C) 2013 Mike Hansen
******************************************************************************/

#include "fq_poly.h"

#ifdef T
#undef T
#endif

#define T fq
#define CAP_T FQ
#include "fq_poly_templates/mulhigh.c"
#undef CAP_T
#undef T
36 changes: 36 additions & 0 deletions fq_poly/mulhigh_classical.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*=============================================================================
This file is part of FLINT.
FLINT 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.
FLINT 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 FLINT; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
=============================================================================*/
/******************************************************************************
Copyright (C) 2013 Mike Hansen
******************************************************************************/

#include "fq_poly.h"

#ifdef T
#undef T
#endif

#define T fq
#define CAP_T FQ
#include "fq_poly_templates/mulhigh_classical.c"
#undef CAP_T
#undef T
36 changes: 36 additions & 0 deletions fq_poly/test/t-mulhigh.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*=============================================================================
This file is part of FLINT.
FLINT 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.
FLINT 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 FLINT; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
=============================================================================*/
/******************************************************************************
Copyright (C) 2013 Mike Hansen
******************************************************************************/

#include "fq_poly.h"

#ifdef T
#undef T
#endif

#define T fq
#define CAP_T FQ
#include "fq_poly_templates/test/t-mulhigh.c"
#undef CAP_T
#undef T
36 changes: 36 additions & 0 deletions fq_poly/test/t-mulhigh_classical.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*=============================================================================
This file is part of FLINT.
FLINT 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.
FLINT 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 FLINT; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
=============================================================================*/
/******************************************************************************
Copyright (C) 2013 Mike Hansen
******************************************************************************/

#include "fq_poly.h"

#ifdef T
#undef T
#endif

#define T fq
#define CAP_T FQ
#include "fq_poly_templates/test/t-mulhigh_classical.c"
#undef CAP_T
#undef T
24 changes: 24 additions & 0 deletions fq_poly_templates.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,30 @@ void TEMPLATE(T, poly_mullow)(TEMPLATE(T, poly_t) rop,
const TEMPLATE(T, poly_t) op1, const TEMPLATE(T, poly_t) op2, slong n,
const TEMPLATE(T, ctx_t) ctx);

void
_TEMPLATE(T, poly_mulhigh_classical)(TEMPLATE(T, struct)* rop,
const TEMPLATE(T, struct)* op1, slong len1,
const TEMPLATE(T, struct)* op2, slong len2,
slong start, const TEMPLATE(T, ctx_t) ctx);

void
TEMPLATE(T, poly_mulhigh_classical)(TEMPLATE(T, poly_t) rop,
const TEMPLATE(T, poly_t) op1,
const TEMPLATE(T, poly_t) op2,
slong start, const TEMPLATE(T, ctx_t) ctx);

void
_TEMPLATE(T, poly_mulhigh)(TEMPLATE(T, struct)* res,
const TEMPLATE(T, struct)* poly1, slong len1,
const TEMPLATE(T, struct)* poly2, slong len2,
slong n, TEMPLATE(T, ctx_t) ctx);

void
TEMPLATE(T, poly_mulhigh)(TEMPLATE(T, poly_t) rop,
const TEMPLATE(T, poly_t) op1,
const TEMPLATE(T, poly_t) op2, slong start,
const TEMPLATE(T, ctx_t) ctx);

void _TEMPLATE(T, poly_mulmod)(TEMPLATE(T, struct) * res,
const TEMPLATE(T, struct) * poly1, slong len1,
const TEMPLATE(T, struct) * poly2, slong len2,
Expand Down
Loading

0 comments on commit 01c7e4c

Please sign in to comment.