Skip to content

Commit

Permalink
update function signatures in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
balos1 committed Dec 13, 2023
1 parent 70776b8 commit 3016cdc
Show file tree
Hide file tree
Showing 15 changed files with 352 additions and 516 deletions.
58 changes: 22 additions & 36 deletions doc/shared/nvectors/NVector_CUDA.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,76 +211,62 @@ operations enabled/disabled as cloned vectors inherit the same enable/disable
options as the vector they are cloned from while vectors created with
:c:func:`N_VNew_Cuda` will have the default settings for the NVECTOR_CUDA module.
.. c:function:: int N_VEnableFusedOps_Cuda(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableFusedOps_Cuda(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) all fused and
vector array operations in the CUDA vector. The return value is ``0`` for
success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``.
vector array operations in the CUDA vector. The return value is a :c:type:`SUNErrCode`.
.. c:function:: int N_VEnableLinearCombination_Cuda(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableLinearCombination_Cuda(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear
combination fused operation in the CUDA vector. The return value is ``0`` for
success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``.
combination fused operation in the CUDA vector. The return value is a :c:type:`SUNErrCode`.
.. c:function:: int N_VEnableScaleAddMulti_Cuda(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableScaleAddMulti_Cuda(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the scale and
add a vector to multiple vectors fused operation in the CUDA vector. The
return value is ``0`` for success and ``-1`` if the input vector or its
``ops`` structure are ``NULL``.
return value is a :c:type:`SUNErrCode`.
.. c:function:: int N_VEnableDotProdMulti_Cuda(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableDotProdMulti_Cuda(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the multiple
dot products fused operation in the CUDA vector. The return value is ``0``
for success and ``-1`` if the input vector or its ``ops`` structure are
``NULL``.
dot products fused operation in the CUDA vector. The return value is a :c:type:`SUNErrCode`.
.. c:function:: int N_VEnableLinearSumVectorArray_Cuda(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableLinearSumVectorArray_Cuda(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear sum
operation for vector arrays in the CUDA vector. The return value is ``0`` for
success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``.
operation for vector arrays in the CUDA vector. The return value is a :c:type:`SUNErrCode`.
.. c:function:: int N_VEnableScaleVectorArray_Cuda(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableScaleVectorArray_Cuda(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the scale
operation for vector arrays in the CUDA vector. The return value is ``0`` for
success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``.
operation for vector arrays in the CUDA vector. The return value is a :c:type:`SUNErrCode`.
.. c:function:: int N_VEnableConstVectorArray_Cuda(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableConstVectorArray_Cuda(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the const
operation for vector arrays in the CUDA vector. The return value is ``0`` for
success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``.
operation for vector arrays in the CUDA vector. The return value is a :c:type:`SUNErrCode`.
.. c:function:: int N_VEnableWrmsNormVectorArray_Cuda(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableWrmsNormVectorArray_Cuda(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the WRMS norm
operation for vector arrays in the CUDA vector. The return value is ``0`` for
success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``.
operation for vector arrays in the CUDA vector. The return value is a :c:type:`SUNErrCode`.
.. c:function:: int N_VEnableWrmsNormMaskVectorArray_Cuda(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableWrmsNormMaskVectorArray_Cuda(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the masked WRMS
norm operation for vector arrays in the CUDA vector. The return value is
``0`` for success and ``-1`` if the input vector or its ``ops`` structure are
``NULL``.
norm operation for vector arrays in the CUDA vector. The return value is a :c:type:`SUNErrCode`.
.. c:function:: int N_VEnableScaleAddMultiVectorArray_Cuda(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableScaleAddMultiVectorArray_Cuda(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the scale and
add a vector array to multiple vector arrays operation in the CUDA vector. The
return value is ``0`` for success and ``-1`` if the input vector or its
``ops`` structure are ``NULL``.
return value is a :c:type:`SUNErrCode`.
.. c:function:: int N_VEnableLinearCombinationVectorArray_Cuda(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableLinearCombinationVectorArray_Cuda(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear
combination operation for vector arrays in the CUDA vector. The return value
is ``0`` for success and ``-1`` if the input vector or its ``ops`` structure
are ``NULL``.
combination operation for vector arrays in the CUDA vector. The return value is a :c:type:`SUNErrCode`.
**Notes**
Expand Down
117 changes: 59 additions & 58 deletions doc/shared/nvectors/NVector_Description.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,64 +49,67 @@ defined as
.. code-block:: c
struct _generic_N_Vector_Ops {
N_Vector_ID (*nvgetvectorid)(N_Vector);
N_Vector (*nvclone)(N_Vector);
N_Vector (*nvcloneempty)(N_Vector);
void (*nvdestroy)(N_Vector);
void (*nvspace)(N_Vector, sunindextype *, sunindextype *);
N_Vector_ID (*nvgetvectorid)(N_Vector);
N_Vector (*nvclone)(N_Vector);
N_Vector (*nvcloneempty)(N_Vector);
void (*nvdestroy)(N_Vector);
void (*nvspace)(N_Vector, sunindextype*, sunindextype*);
sunrealtype* (*nvgetarraypointer)(N_Vector);
sunrealtype* (*nvgetdevicearraypointer)(N_Vector);
void (*nvsetarraypointer)(sunrealtype *, N_Vector);
SUNComm (*nvgetcommunicator)(N_Vector);
void (*nvsetarraypointer)(sunrealtype*, N_Vector);
SUNComm (*nvgetcommunicator)(N_Vector);
sunindextype (*nvgetlength)(N_Vector);
sunindextype (*nvgetlocallength)(N_Vector);
void (*nvlinearsum)(sunrealtype, N_Vector, sunrealtype, N_Vector, N_Vector);
void (*nvconst)(sunrealtype, N_Vector);
void (*nvprod)(N_Vector, N_Vector, N_Vector);
void (*nvdiv)(N_Vector, N_Vector, N_Vector);
void (*nvscale)(sunrealtype, N_Vector, N_Vector);
void (*nvabs)(N_Vector, N_Vector);
void (*nvinv)(N_Vector, N_Vector);
void (*nvaddconst)(N_Vector, sunrealtype, N_Vector);
sunrealtype (*nvdotprod)(N_Vector, N_Vector);
sunrealtype (*nvmaxnorm)(N_Vector);
sunrealtype (*nvwrmsnorm)(N_Vector, N_Vector);
sunrealtype (*nvwrmsnormmask)(N_Vector, N_Vector, N_Vector);
sunrealtype (*nvmin)(N_Vector);
sunrealtype (*nvwl2norm)(N_Vector, N_Vector);
sunrealtype (*nvl1norm)(N_Vector);
void (*nvcompare)(sunrealtype, N_Vector, N_Vector);
sunbooleantype (*nvinvtest)(N_Vector, N_Vector);
sunbooleantype (*nvconstrmask)(N_Vector, N_Vector, N_Vector);
sunrealtype (*nvminquotient)(N_Vector, N_Vector);
int (*nvlinearcombination)(int, sunrealtype *, N_Vector *, N_Vector);
int (*nvscaleaddmulti)(int, sunrealtype *, N_Vector, N_Vector *, N_Vector *);
int (*nvdotprodmulti)(int, N_Vector, N_Vector *, sunrealtype *);
int (*nvlinearsumvectorarray)(int, sunrealtype, N_Vector *, sunrealtype,
N_Vector *, N_Vector *);
int (*nvscalevectorarray)(int, sunrealtype *, N_Vector *, N_Vector *);
int (*nvconstvectorarray)(int, sunrealtype, N_Vector *);
int (*nvwrmsnomrvectorarray)(int, N_Vector *, N_Vector *, sunrealtype *);
int (*nvwrmsnomrmaskvectorarray)(int, N_Vector *, N_Vector *, N_Vector,
sunrealtype *);
int (*nvscaleaddmultivectorarray)(int, int, sunrealtype *, N_Vector *,
N_Vector **, N_Vector **);
int (*nvlinearcombinationvectorarray)(int, int, sunrealtype *, N_Vector **,
N_Vector *);
sunrealtype (*nvdotprodlocal)(N_Vector, N_Vector);
sunrealtype (*nvmaxnormlocal)(N_Vector);
sunrealtype (*nvminlocal)(N_Vector);
sunrealtype (*nvl1normlocal)(N_Vector);
sunbooleantype (*nvinvtestlocal)(N_Vector, N_Vector);
sunbooleantype (*nvconstrmasklocal)(N_Vector, N_Vector, N_Vector);
sunrealtype (*nvminquotientlocal)(N_Vector, N_Vector);
sunrealtype (*nvwsqrsumlocal)(N_Vector, N_Vector);
sunrealtype (*nvwsqrsummasklocal(N_Vector, N_Vector, N_Vector);
int (*nvdotprodmultilocal)(int, N_Vector, N_Vector *, sunrealtype *);
int (*nvdotprodmultiallreduce)(int, N_Vector, sunrealtype *);
int (*nvbufsize)(N_Vector, sunindextype *);
int (*nvbufpack)(N_Vector, void*);
int (*nvbufunpack)(N_Vector, void*);
void (*nvlinearsum)(sunrealtype, N_Vector, sunrealtype, N_Vector, N_Vector);
void (*nvconst)(sunrealtype, N_Vector);
void (*nvprod)(N_Vector, N_Vector, N_Vector);
void (*nvdiv)(N_Vector, N_Vector, N_Vector);
void (*nvscale)(sunrealtype, N_Vector, N_Vector);
void (*nvabs)(N_Vector, N_Vector);
void (*nvinv)(N_Vector, N_Vector);
void (*nvaddconst)(N_Vector, sunrealtype, N_Vector);
sunrealtype (*nvdotprod)(N_Vector, N_Vector);
sunrealtype (*nvmaxnorm)(N_Vector);
sunrealtype (*nvwrmsnorm)(N_Vector, N_Vector);
sunrealtype (*nvwrmsnormmask)(N_Vector, N_Vector, N_Vector);
sunrealtype (*nvmin)(N_Vector);
sunrealtype (*nvwl2norm)(N_Vector, N_Vector);
sunrealtype (*nvl1norm)(N_Vector);
void (*nvcompare)(sunrealtype, N_Vector, N_Vector);
sunbooleantype (*nvinvtest)(N_Vector, N_Vector);
sunbooleantype (*nvconstrmask)(N_Vector, N_Vector, N_Vector);
sunrealtype (*nvminquotient)(N_Vector, N_Vector);
SUNErrCode (*nvlinearcombination)(int, sunrealtype*, N_Vector*, N_Vector);
SUNErrCode (*nvscaleaddmulti)(int, sunrealtype*, N_Vector, N_Vector*,
N_Vector*);
SUNErrCode (*nvdotprodmulti)(int, N_Vector, N_Vector*, sunrealtype*);
SUNErrCode (*nvlinearsumvectorarray)(int, sunrealtype, N_Vector*, sunrealtype,
N_Vector*, N_Vector*);
SUNErrCode (*nvscalevectorarray)(int, sunrealtype*, N_Vector*, N_Vector*);
SUNErrCode (*nvconstvectorarray)(int, sunrealtype, N_Vector*);
SUNErrCode (*nvwrmsnormvectorarray)(int, N_Vector*, N_Vector*, sunrealtype*);
SUNErrCode (*nvwrmsnormmaskvectorarray)(int, N_Vector*, N_Vector*, N_Vector,
sunrealtype*);
SUNErrCode (*nvscaleaddmultivectorarray)(int, int, sunrealtype*, N_Vector*,
N_Vector**, N_Vector**);
SUNErrCode (*nvlinearcombinationvectorarray)(int, int, sunrealtype*,
N_Vector**, N_Vector*);
sunrealtype (*nvdotprodlocal)(N_Vector, N_Vector);
sunrealtype (*nvmaxnormlocal)(N_Vector);
sunrealtype (*nvminlocal)(N_Vector);
sunrealtype (*nvl1normlocal)(N_Vector);
sunbooleantype (*nvinvtestlocal)(N_Vector, N_Vector);
sunbooleantype (*nvconstrmasklocal)(N_Vector, N_Vector, N_Vector);
sunrealtype (*nvminquotientlocal)(N_Vector, N_Vector);
sunrealtype (*nvwsqrsumlocal)(N_Vector, N_Vector);
sunrealtype (*nvwsqrsummasklocal)(N_Vector, N_Vector, N_Vector);
SUNErrCode (*nvdotprodmultilocal)(int, N_Vector, N_Vector*, sunrealtype*);
SUNErrCode (*nvdotprodmultiallreduce)(int, N_Vector, sunrealtype*);
SUNErrCode (*nvbufsize)(N_Vector, sunindextype*);
SUNErrCode (*nvbufpack)(N_Vector, void*);
SUNErrCode (*nvbufunpack)(N_Vector, void*);
void (*nvprint)(N_Vector);
void (*nvprintfile)(N_Vector, FILE*);
};
Expand Down Expand Up @@ -345,7 +348,7 @@ to be set, and that all operations are copied when cloning a vector.
**Arguments:**
* *v* -- an N_Vector object
.. c:function:: int N_VCopyOps(N_Vector w, N_Vector v)
.. c:function:: SUNErrCode N_VCopyOps(N_Vector w, N_Vector v)
This function copies the function pointers in the ``ops`` structure of ``w``
into the ``ops`` structure of ``v``.
Expand All @@ -354,9 +357,7 @@ to be set, and that all operations are copied when cloning a vector.
* *w* -- the vector to copy operations from
* *v* -- the vector to copy operations to
**Return value:** If successful, this function returns ``0``. If either of
the inputs are ``NULL`` or the ``ops`` structure of either input is ``NULL``,
then is function returns a non-zero value.
**Return value:** Returns a :c:type:`SUNErrCode`.
Each NVECTOR implementation included in SUNDIALS has a unique
identifier specified in enumeration and shown in
Expand Down
58 changes: 22 additions & 36 deletions doc/shared/nvectors/NVector_HIP.rst
Original file line number Diff line number Diff line change
Expand Up @@ -194,76 +194,62 @@ operations enabled/disabled as cloned vectors inherit the same enable/disable
options as the vector they are cloned from while vectors created with
:c:func:`N_VNew_Hip` will have the default settings for the NVECTOR_HIP module.
.. c:function:: int N_VEnableFusedOps_Hip(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableFusedOps_Hip(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) all fused and
vector array operations in the HIP vector. The return value is ``0`` for
success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``.
vector array operations in the HIP vector. The return value is a :c:type:`SUNErrCode`.
.. c:function:: int N_VEnableLinearCombination_Hip(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableLinearCombination_Hip(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear
combination fused operation in the HIP vector. The return value is ``0`` for
success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``.
combination fused operation in the HIP vector. The return value is a :c:type:`SUNErrCode`.
.. c:function:: int N_VEnableScaleAddMulti_Hip(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableScaleAddMulti_Hip(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the scale and
add a vector to multiple vectors fused operation in the HIP vector. The
return value is ``0`` for success and ``-1`` if the input vector or its
``ops`` structure are ``NULL``.
return value is a :c:type:`SUNErrCode`.
.. c:function:: int N_VEnableDotProdMulti_Hip(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableDotProdMulti_Hip(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the multiple
dot products fused operation in the HIP vector. The return value is ``0``
for success and ``-1`` if the input vector or its ``ops`` structure are
``NULL``.
dot products fused operation in the HIP vector. The return value is a :c:type:`SUNErrCode`.
.. c:function:: int N_VEnableLinearSumVectorArray_Hip(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableLinearSumVectorArray_Hip(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear sum
operation for vector arrays in the HIP vector. The return value is ``0`` for
success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``.
operation for vector arrays in the HIP vector. The return value is a :c:type:`SUNErrCode`.
.. c:function:: int N_VEnableScaleVectorArray_Hip(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableScaleVectorArray_Hip(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the scale
operation for vector arrays in the HIP vector. The return value is ``0`` for
success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``.
operation for vector arrays in the HIP vector. The return value is a :c:type:`SUNErrCode`.
.. c:function:: int N_VEnableConstVectorArray_Hip(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableConstVectorArray_Hip(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the const
operation for vector arrays in the HIP vector. The return value is ``0`` for
success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``.
operation for vector arrays in the HIP vector. The return value is a :c:type:`SUNErrCode`.
.. c:function:: int N_VEnableWrmsNormVectorArray_Hip(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableWrmsNormVectorArray_Hip(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the WRMS norm
operation for vector arrays in the HIP vector. The return value is ``0`` for
success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``.
operation for vector arrays in the HIP vector. The return value is a :c:type:`SUNErrCode`.
.. c:function:: int N_VEnableWrmsNormMaskVectorArray_Hip(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableWrmsNormMaskVectorArray_Hip(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the masked WRMS
norm operation for vector arrays in the HIP vector. The return value is
``0`` for success and ``-1`` if the input vector or its ``ops`` structure are
``NULL``.
norm operation for vector arrays in the HIP vector. The return value is a :c:type:`SUNErrCode`.
.. c:function:: int N_VEnableScaleAddMultiVectorArray_Hip(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableScaleAddMultiVectorArray_Hip(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the scale and
add a vector array to multiple vector arrays operation in the HIP vector. The
return value is ``0`` for success and ``-1`` if the input vector or its
``ops`` structure are ``NULL``.
return value is a :c:type:`SUNErrCode`.
.. c:function:: int N_VEnableLinearCombinationVectorArray_Hip(N_Vector v, sunbooleantype tf)
.. c:function:: SUNErrCode N_VEnableLinearCombinationVectorArray_Hip(N_Vector v, sunbooleantype tf)
This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear
combination operation for vector arrays in the HIP vector. The return value
is ``0`` for success and ``-1`` if the input vector or its ``ops`` structure
are ``NULL``.
combination operation for vector arrays in the HIP vector. The return value is a :c:type:`SUNErrCode`.
**Notes**
Expand Down
Loading

0 comments on commit 3016cdc

Please sign in to comment.