Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-07 10:15:21

0001 /*
0002     Copyright (C) 2013 Mike Hansen
0003 
0004     This file is part of FLINT.
0005 
0006     FLINT is free software: you can redistribute it and/or modify it under
0007     the terms of the GNU Lesser General Public License (LGPL) as published
0008     by the Free Software Foundation; either version 3 of the License, or
0009     (at your option) any later version.  See <https://www.gnu.org/licenses/>.
0010 */
0011 
0012 #ifdef T
0013 
0014 #include "templates.h"
0015 
0016 void TEMPLATE(T, gcdinv)(TEMPLATE(T, t) rop, TEMPLATE(T, t) inv,
0017                     const TEMPLATE(T, t) op,
0018                     const TEMPLATE(T, ctx_t) ctx);
0019 
0020 int TEMPLATE(T, is_invertible)(const TEMPLATE(T, t) op,
0021                            const TEMPLATE(T, ctx_t) ctx);
0022 
0023 int TEMPLATE(T, is_invertible_f)(TEMPLATE(T, t) rop, const TEMPLATE(T, t) op,
0024                              const TEMPLATE(T, ctx_t) ctx);
0025 
0026 void TEMPLATE(T, div)(TEMPLATE(T, t) rop, const TEMPLATE(T, t) op1,
0027                  const TEMPLATE(T, t) op2, const TEMPLATE(T, ctx_t) ctx);
0028 
0029 int TEMPLATE(T, multiplicative_order)(fmpz * ord, const TEMPLATE(T, t) op,
0030                              const TEMPLATE(T, ctx_t) ctx);
0031 
0032 #ifdef B
0033 void TEMPLATE4(T, get, B, mat)(TEMPLATE(B, mat_t) col,
0034                                          const TEMPLATE(T, t) a,
0035                                          const TEMPLATE(T, ctx_t) ctx);
0036 void TEMPLATE4(T, set, B, mat)(TEMPLATE(T, t) a,
0037                                          const TEMPLATE(B, mat_t) col,
0038                                          const TEMPLATE(T, ctx_t) ctx);
0039 #endif
0040 
0041 
0042 FQ_TEMPLATES_INLINE
0043 int TEMPLATE(T, is_primitive)(const TEMPLATE(T, t) op, const TEMPLATE(T, ctx_t) ctx)
0044 {
0045     int ret;
0046     ret = TEMPLATE(T, multiplicative_order)(NULL, op, ctx) == 1;
0047     return ret;
0048 }
0049 
0050 #endif