Skip to content

Commit

Permalink
fix spacings
Browse files Browse the repository at this point in the history
  • Loading branch information
videlec committed Oct 14, 2023
1 parent b37081b commit 97fe9ac
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
28 changes: 14 additions & 14 deletions doc/source/flint.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,20 @@ internal representation of numbers (using limb arrays).
Allocation Functions
-----------------------------------------------

.. function:: void * flint_malloc(size_t size)
.. function:: void * flint_malloc(size_t size)

Allocate ``size`` bytes of memory.

.. function:: void * flint_realloc(void * ptr, size_t size)
.. function:: void * flint_realloc(void * ptr, size_t size)

Reallocate an area of memory previously allocated by :func:`flint_malloc`,
:func:`flint_realloc`, or :func:`flint_calloc`.

.. function:: void * flint_calloc(size_t num, size_t size)
.. function:: void * flint_calloc(size_t num, size_t size)

Allocate ``num`` objects of ``size`` bytes each, and zero the allocated memory.

.. function :: void flint_free(void * ptr)
.. function:: void flint_free(void * ptr)

Free a section of memory allocated by :func:`flint_malloc`,
:func:`flint_realloc`, or :func:`flint_calloc`.
Expand All @@ -154,7 +154,7 @@ Random Numbers
The random state is not initialised.

.. function:: void flint_rand_free(flint_rand_s * state)

Frees a random state object as allocated using :func:`flint_rand_alloc`.


Expand Down Expand Up @@ -202,7 +202,7 @@ Thread functions
Assumes that the Flint thread pool is already set up.

The function returns the old number of worker threads that can be started.

The function can only be used to reduce the number of workers that can be
started from a thread. It cannot be used to increase the number. If a
higher number is passed, the function has no effect.
Expand All @@ -225,21 +225,21 @@ Thread functions
Input/Output
-----------------

.. function:: int flint_printf(const char * str, ...)
int flint_vprintf(const char * str, va_list ap)
int flint_fprintf(FILE * f, const char * str, ...)
int flint_sprintf(char * s, const char * str, ...)
.. function:: int flint_printf(const char * str, ...)
int flint_vprintf(const char * str, va_list ap)
int flint_fprintf(FILE * f, const char * str, ...)
int flint_sprintf(char * s, const char * str, ...)

These are equivalent to the standard library functions ``printf``,
``vprintf``, ``fprintf``, and ``sprintf`` with an additional length modifier
"w" for use with an :type:`mp_limb_t` type. This modifier can be used with
format specifiers "d", "x", or "u", thereby outputting the limb as a signed
decimal, hexadecimal, or unsigned decimal integer.

.. function:: int flint_scanf(const char * str, ...)
int flint_fscanf(FILE * f, const char * str, ...)
int flint_sscanf(const char * s, const char * str, ...)

.. function:: int flint_scanf(const char * str, ...)
int flint_fscanf(FILE * f, const char * str, ...)
int flint_sscanf(const char * s, const char * str, ...)

These are equivalent to the standard library functions ``scanf``,
``fscanf``, and ``sscanf`` with an additional length modifier "w" for
Expand Down
4 changes: 2 additions & 2 deletions doc/source/fmpz.rst
Original file line number Diff line number Diff line change
Expand Up @@ -409,13 +409,13 @@ Conversion
where `X = 2^{FLINT\_BITS}`, sets the corresponding elements of ``out``
so that this is true. It is assumed that ``n > 0``.

.. function::void fmpz_get_signed_ui_array(ulong * out, slong n, const fmpz_t in)
.. function:: void fmpz_get_signed_ui_array(ulong * out, slong n, const fmpz_t in)

Retrieves the value of `in` modulo `2^{n * FLINT\_BITS}` and puts the `n`
words of the result in ``out[0], ..., out[n-1]``. This will give a signed
two's complement representation of `in` (assuming `in` doesn't overflow the array).

.. function::void fmpz_get_signed_uiui(ulong * hi, ulong * lo, const fmpz_t in)
.. function:: void fmpz_get_signed_uiui(ulong * hi, ulong * lo, const fmpz_t in)

Retrieves the value of `in` modulo `2^{2 * FLINT\_BITS}` and puts the high
and low words into ``*hi`` and ``*lo`` respectively.
Expand Down
2 changes: 1 addition & 1 deletion doc/source/fmpz_mod_mat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Conversions

Set ``A`` to the matrix ``B`` reducing modulo the modulus of ``A``.

.. function:: void fmpz_mod_mat_get_fmpz_mat(fmpz_mat_t A, const fmpz_mod_mat_t B)
.. function:: void fmpz_mod_mat_get_fmpz_mat(fmpz_mat_t A, const fmpz_mod_mat_t B)

Set ``A`` to a lift of ``B``.

Expand Down
4 changes: 2 additions & 2 deletions doc/source/fmpz_mpoly.rst
Original file line number Diff line number Diff line change
Expand Up @@ -892,15 +892,15 @@ Vectors

A type holding a vector of :type:`fmpz_mpoly_t`.

.. macro:: fmpz_mpoly_vec_entry(vec, i)
.. macro:: fmpz_mpoly_vec_entry(vec, i)

Macro for accessing the entry at position *i* in *vec*.

.. function:: void fmpz_mpoly_vec_init(fmpz_mpoly_vec_t vec, slong len, const fmpz_mpoly_ctx_t ctx)

Initializes *vec* to a vector of length *len*, setting all entries to the zero polynomial.

.. function::void fmpz_mpoly_vec_clear(fmpz_mpoly_vec_t vec, const fmpz_mpoly_ctx_t ctx)
.. function:: void fmpz_mpoly_vec_clear(fmpz_mpoly_vec_t vec, const fmpz_mpoly_ctx_t ctx)

Clears *vec*, freeing its allocated memory.

Expand Down
2 changes: 1 addition & 1 deletion doc/source/fq_default_mat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Basic properties and manipulation

Sets the entry in ``mat`` in row `i` and column `j` to ``x``.

.. function:: void fq_default_mat_entry_set_fmpz(fq_default_mat_t mat, slong i, slong j, const fmpz_t x, const fq_default_ctx_t ctx)
.. function:: void fq_default_mat_entry_set_fmpz(fq_default_mat_t mat, slong i, slong j, const fmpz_t x, const fq_default_ctx_t ctx)

Sets the entry in ``mat`` in row `i` and column `j` to ``x``.

Expand Down

0 comments on commit 97fe9ac

Please sign in to comment.