Back to home page

EIC code displayed by LXR

 
 

    


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

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 #ifndef FQ_NMOD_VEC_H
0013 #define FQ_NMOD_VEC_H
0014 
0015 #ifdef FQ_NMOD_VEC_INLINES_C
0016 #define FQ_VEC_TEMPLATES_INLINE
0017 #define FQ_NMOD_VEC_INLINE
0018 #else
0019 #define FQ_VEC_TEMPLATES_INLINE static inline
0020 #define FQ_NMOD_VEC_INLINE static inline
0021 #endif
0022 
0023 #include "fq_nmod_types.h"
0024 
0025 #define FQ_NMOD_VEC_NORM(vec, i, ctx)                    \
0026 do {                                                \
0027     while ((i) && fq_nmod_is_zero((vec) + (i) - 1, ctx)) \
0028         (i)--;                                      \
0029 } while (0)
0030 
0031 
0032 #define FQ_NMOD_VEC_SWAP(vec1, len1, vec2, len2)   \
0033 do {                                          \
0034     fq_nmod_struct *__t;                           \
0035     slong __tn;                               \
0036     __t    = (vec1);                          \
0037     (vec1) = (vec2);                          \
0038     (vec2) = __t;                             \
0039     __tn   = (len1);                          \
0040     (len1) = (len2);                          \
0041     (len2) = __tn;                            \
0042 } while (0);
0043 
0044 
0045 #define T fq_nmod
0046 #define CAP_T FQ_NMOD
0047 #include "fq_vec_templates.h"
0048 #undef CAP_T
0049 #undef T
0050 
0051 #endif