Skip to content

Commit

Permalink
Add fq_div and fq_is_invertible
Browse files Browse the repository at this point in the history
  • Loading branch information
mwhansen committed Nov 28, 2013
1 parent c31fd9f commit 9486d0d
Show file tree
Hide file tree
Showing 20 changed files with 735 additions and 0 deletions.
10 changes: 10 additions & 0 deletions fq.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,16 @@ void
fq_bit_unpack(fq_t rop, const fmpz_t f, mp_bitcnt_t bit_size,
const fq_ctx_t ctx);

#ifdef T
#undef T
#endif

#define T fq
#define CAP_T FQ
#include "fq_templates.h"
#undef CAP_T
#undef T

#ifdef __cplusplus
}
#endif
Expand Down
36 changes: 36 additions & 0 deletions fq/div.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.h"

#ifdef T
#undef T
#endif

#define T fq
#define CAP_T FQ
#include "fq_templates/div.c"
#undef CAP_T
#undef T
36 changes: 36 additions & 0 deletions fq/is_invertible.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.h"

#ifdef T
#undef T
#endif

#define T fq
#define CAP_T FQ
#include "fq_templates/is_invertible.c"
#undef CAP_T
#undef T
36 changes: 36 additions & 0 deletions fq/test/t-div.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.h"

#ifdef T
#undef T
#endif

#define T fq
#define CAP_T FQ
#include "fq_templates/test/t-div.c"
#undef CAP_T
#undef T
36 changes: 36 additions & 0 deletions fq/test/t-is_invertible.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.h"

#ifdef T
#undef T
#endif

#define T fq
#define CAP_T FQ
#include "fq_templates/test/t-is_invertible.c"
#undef CAP_T
#undef T
10 changes: 10 additions & 0 deletions fq_nmod.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,16 @@ void
fq_nmod_bit_unpack(fq_nmod_t rop, const fmpz_t f, mp_bitcnt_t bit_size,
const fq_nmod_ctx_t ctx);

#ifdef T
#undef T
#endif

#define T fq_nmod
#define CAP_T FQ_NMOD
#include "fq_templates.h"
#undef CAP_T
#undef T

#ifdef __cplusplus
}
#endif
Expand Down
36 changes: 36 additions & 0 deletions fq_nmod/div.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.h"

#ifdef T
#undef T
#endif

#define T fq_nmod
#define CAP_T FQ_NMOD
#include "fq_templates/div.c"
#undef CAP_T
#undef T
36 changes: 36 additions & 0 deletions fq_nmod/is_invertible.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.h"

#ifdef T
#undef T
#endif

#define T fq_nmod
#define CAP_T FQ_NMOD
#include "fq_templates/is_invertible.c"
#undef CAP_T
#undef T
36 changes: 36 additions & 0 deletions fq_nmod/test/t-div.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.h"

#ifdef T
#undef T
#endif

#define T fq_nmod
#define CAP_T FQ_NMOD
#include "fq_templates/test/t-div.c"
#undef CAP_T
#undef T
36 changes: 36 additions & 0 deletions fq_nmod/test/t-is_invertible.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.h"

#ifdef T
#undef T
#endif

#define T fq_nmod
#define CAP_T FQ_NMOD
#include "fq_templates/test/t-is_invertible.c"
#undef CAP_T
#undef T
38 changes: 38 additions & 0 deletions fq_templates.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*=============================================================================
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
******************************************************************************/

#ifdef T

#include "templates.h"

int
TEMPLATE(T, is_invertible)(const TEMPLATE(T, t) op,
const TEMPLATE(T, ctx_t) ctx);

void
TEMPLATE(T, div)(TEMPLATE(T, t) rop, const TEMPLATE(T, t) op1,
const TEMPLATE(T, t) op2, const TEMPLATE(T, ctx_t) ctx);

#endif
Loading

0 comments on commit 9486d0d

Please sign in to comment.