diff --git a/doc/shared/nvectors/NVector_CUDA.rst b/doc/shared/nvectors/NVector_CUDA.rst index d7aaf5fa92..40a949b5b0 100644 --- a/doc/shared/nvectors/NVector_CUDA.rst +++ b/doc/shared/nvectors/NVector_CUDA.rst @@ -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** diff --git a/doc/shared/nvectors/NVector_Description.rst b/doc/shared/nvectors/NVector_Description.rst index 341600d487..3e5a001a10 100644 --- a/doc/shared/nvectors/NVector_Description.rst +++ b/doc/shared/nvectors/NVector_Description.rst @@ -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*); }; @@ -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``. @@ -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 diff --git a/doc/shared/nvectors/NVector_HIP.rst b/doc/shared/nvectors/NVector_HIP.rst index d5cf941dc7..ddc6c3cc57 100644 --- a/doc/shared/nvectors/NVector_HIP.rst +++ b/doc/shared/nvectors/NVector_HIP.rst @@ -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** diff --git a/doc/shared/nvectors/NVector_MPIManyVector.rst b/doc/shared/nvectors/NVector_MPIManyVector.rst index adcd362ff4..1977e2d078 100644 --- a/doc/shared/nvectors/NVector_MPIManyVector.rst +++ b/doc/shared/nvectors/NVector_MPIManyVector.rst @@ -219,14 +219,12 @@ the following additional user-callable routines: returned. -.. c:function:: int N_VSetSubvectorArrayPointer_MPIManyVector(sunrealtype *v_data, N_Vector v, sunindextype vec_num) +.. c:function:: SUNErrCode N_VSetSubvectorArrayPointer_MPIManyVector(sunrealtype *v_data, N_Vector v, sunindextype vec_num) This function sets the data array pointer for the *vec_num* subvector from the NVECTOR array. - If the input *vec_num* is invalid, or if the subvector does not - support the ``N_VSetArrayPointer`` operation, then ``-1`` is - returned; otherwise it returns ``0``. + The function returns a :c:type:`SUNErrCode`. .. c:function:: sunindextype N_VGetNumSubvectors_MPIManyVector(N_Vector v) @@ -254,62 +252,51 @@ subvectors, so those should be set up as desired *before* attaching them to the MPIManyVector in :c:func:`N_VNew_MPIManyVector` or :c:func:`N_VMake_MPIManyVector`. -.. c:function:: int N_VEnableFusedOps_MPIManyVector(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableFusedOps_MPIManyVector(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) all fused and - vector array operations in the MPIManyVector 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 MPIManyVector vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableLinearCombination_MPIManyVector(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearCombination_MPIManyVector(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear - combination fused operation in the MPIManyVector 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 MPIManyVector vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleAddMulti_MPIManyVector(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleAddMulti_MPIManyVector(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 MPIManyVector 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_MPIManyVector(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableDotProdMulti_MPIManyVector(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the multiple - dot products fused operation in the MPIManyVector 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 MPIManyVector vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableLinearSumVectorArray_MPIManyVector(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearSumVectorArray_MPIManyVector(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear sum - operation for vector arrays in the MPIManyVector 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 MPIManyVector vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleVectorArray_MPIManyVector(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleVectorArray_MPIManyVector(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the scale - operation for vector arrays in the MPIManyVector 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 MPIManyVector vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableConstVectorArray_MPIManyVector(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableConstVectorArray_MPIManyVector(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the const - operation for vector arrays in the MPIManyVector 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 MPIManyVector vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableWrmsNormVectorArray_MPIManyVector(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableWrmsNormVectorArray_MPIManyVector(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the WRMS norm - operation for vector arrays in the MPIManyVector 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 MPIManyVector vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableWrmsNormMaskVectorArray_MPIManyVector(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableWrmsNormMaskVectorArray_MPIManyVector(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the masked WRMS - norm operation for vector arrays in the MPIManyVector 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 MPIManyVector vector. The return value is a :c:type:`SUNErrCode`. **Notes** diff --git a/doc/shared/nvectors/NVector_ManyVector.rst b/doc/shared/nvectors/NVector_ManyVector.rst index 02dec8d5bd..7a51c01841 100644 --- a/doc/shared/nvectors/NVector_ManyVector.rst +++ b/doc/shared/nvectors/NVector_ManyVector.rst @@ -159,14 +159,12 @@ the following additional user-callable routines: returned. -.. c:function:: int N_VSetSubvectorArrayPointer_ManyVector(sunrealtype *v_data, N_Vector v, sunindextype vec_num) +.. c:function:: SUNErrCode N_VSetSubvectorArrayPointer_ManyVector(sunrealtype *v_data, N_Vector v, sunindextype vec_num) This function sets the data array pointer for the *vec_num* subvector from the NVECTOR array. - If the input *vec_num* is invalid, or if the subvector does not - support the ``N_VSetArrayPointer`` operation, then ``-1`` is - returned; otherwise it returns ``0``. + The function returns a :c:type:`SUNErrCode`. .. c:function:: sunindextype N_VGetNumSubvectors_ManyVector(N_Vector v) @@ -193,62 +191,51 @@ that these routines *do not* call the corresponding routines on subvectors, so those should be set up as desired *before* attaching them to the ManyVector in :c:func:`N_VNew_ManyVector`. -.. c:function:: int N_VEnableFusedOps_ManyVector(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableFusedOps_ManyVector(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) all fused and - vector array operations in the manyvector 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 manyvector vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableLinearCombination_ManyVector(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearCombination_ManyVector(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear - combination fused operation in the manyvector 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 manyvector vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleAddMulti_ManyVector(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleAddMulti_ManyVector(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 manyvector 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_ManyVector(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableDotProdMulti_ManyVector(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the multiple - dot products fused operation in the manyvector 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 manyvector vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableLinearSumVectorArray_ManyVector(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearSumVectorArray_ManyVector(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear sum - operation for vector arrays in the manyvector 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 manyvector vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleVectorArray_ManyVector(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleVectorArray_ManyVector(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the scale - operation for vector arrays in the manyvector 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 manyvector vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableConstVectorArray_ManyVector(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableConstVectorArray_ManyVector(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the const - operation for vector arrays in the manyvector 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 manyvector vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableWrmsNormVectorArray_ManyVector(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableWrmsNormVectorArray_ManyVector(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the WRMS norm - operation for vector arrays in the manyvector 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 manyvector vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableWrmsNormMaskVectorArray_ManyVector(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableWrmsNormMaskVectorArray_ManyVector(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the masked WRMS - norm operation for vector arrays in the manyvector 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 manyvector vector. The return value is a :c:type:`SUNErrCode`. **Notes** diff --git a/doc/shared/nvectors/NVector_OpenMP.rst b/doc/shared/nvectors/NVector_OpenMP.rst index fc5c1a9288..028c4dc127 100644 --- a/doc/shared/nvectors/NVector_OpenMP.rst +++ b/doc/shared/nvectors/NVector_OpenMP.rst @@ -209,76 +209,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_OpenMP` will have the default settings for the NVECTOR_OPENMP module. -.. c:function:: int N_VEnableFusedOps_OpenMP(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableFusedOps_OpenMP(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) all fused and - vector array operations in the OpenMP 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 OpenMP vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableLinearCombination_OpenMP(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearCombination_OpenMP(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear - combination fused operation in the OpenMP 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 OpenMP vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleAddMulti_OpenMP(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleAddMulti_OpenMP(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 OpenMP 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_OpenMP(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableDotProdMulti_OpenMP(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the multiple - dot products fused operation in the OpenMP 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 OpenMP vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableLinearSumVectorArray_OpenMP(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearSumVectorArray_OpenMP(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear sum - operation for vector arrays in the OpenMP 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 OpenMP vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleVectorArray_OpenMP(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleVectorArray_OpenMP(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the scale - operation for vector arrays in the OpenMP 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 OpenMP vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableConstVectorArray_OpenMP(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableConstVectorArray_OpenMP(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the const - operation for vector arrays in the OpenMP 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 OpenMP vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableWrmsNormVectorArray_OpenMP(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableWrmsNormVectorArray_OpenMP(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the WRMS norm - operation for vector arrays in the OpenMP 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 OpenMP vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableWrmsNormMaskVectorArray_OpenMP(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableWrmsNormMaskVectorArray_OpenMP(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the masked WRMS - norm operation for vector arrays in the OpenMP 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 OpenMP vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleAddMultiVectorArray_OpenMP(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleAddMultiVectorArray_OpenMP(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 OpenMP 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_OpenMP(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearCombinationVectorArray_OpenMP(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear - combination operation for vector arrays in the OpenMP 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 OpenMP vector. The return value is a :c:type:`SUNErrCode`. **Notes** diff --git a/doc/shared/nvectors/NVector_OpenMPDEV.rst b/doc/shared/nvectors/NVector_OpenMPDEV.rst index e347ea2ac9..224b06fd51 100644 --- a/doc/shared/nvectors/NVector_OpenMPDEV.rst +++ b/doc/shared/nvectors/NVector_OpenMPDEV.rst @@ -193,21 +193,21 @@ operations enabled/disabled as cloned vectors inherit the same enable/disable options as the vector they are cloned from while vectors created with ``N_VNew_OpenMPDEV`` will have the default settings for the NVECTOR_OPENMPDEV module. -.. c:function:: int N_VEnableFusedOps_OpenMPDEV(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableFusedOps_OpenMPDEV(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) all fused and vector array operations in the NVECTOR_OPENMPDEV vector. The return value is ``0`` for success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``. -.. c:function:: int N_VEnableLinearCombination_OpenMPDEV(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearCombination_OpenMPDEV(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear combination fused operation in the NVECTOR_OPENMPDEV vector. The return value is ``0`` for success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``. -.. c:function:: int N_VEnableScaleAddMulti_OpenMPDEV(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleAddMulti_OpenMPDEV(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 NVECTOR_OPENMPDEV vector. The @@ -215,7 +215,7 @@ options as the vector they are cloned from while vectors created with ``ops`` structure are ``NULL``. -.. c:function:: int N_VEnableDotProdMulti_OpenMPDEV(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableDotProdMulti_OpenMPDEV(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the multiple dot products fused operation in the NVECTOR_OPENMPDEV vector. The return value is ``0`` @@ -223,35 +223,35 @@ options as the vector they are cloned from while vectors created with ``NULL``. -.. c:function:: int N_VEnableLinearSumVectorArray_OpenMPDEV(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearSumVectorArray_OpenMPDEV(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear sum operation for vector arrays in the NVECTOR_OPENMPDEV vector. The return value is ``0`` for success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``. -.. c:function:: int N_VEnableScaleVectorArray_OpenMPDEV(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleVectorArray_OpenMPDEV(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the scale operation for vector arrays in the NVECTOR_OPENMPDEV vector. The return value is ``0`` for success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``. -.. c:function:: int N_VEnableConstVectorArray_OpenMPDEV(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableConstVectorArray_OpenMPDEV(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the const operation for vector arrays in the NVECTOR_OPENMPDEV vector. The return value is ``0`` for success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``. -.. c:function:: int N_VEnableWrmsNormVectorArray_OpenMPDEV(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableWrmsNormVectorArray_OpenMPDEV(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the WRMS norm operation for vector arrays in the NVECTOR_OPENMPDEV vector. The return value is ``0`` for success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``. -.. c:function:: int N_VEnableWrmsNormMaskVectorArray_OpenMPDEV(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableWrmsNormMaskVectorArray_OpenMPDEV(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the masked WRMS norm operation for vector arrays in the NVECTOR_OPENMPDEV vector. The return value is @@ -259,7 +259,7 @@ options as the vector they are cloned from while vectors created with ``NULL``. -.. c:function:: int N_VEnableScaleAddMultiVectorArray_OpenMPDEV(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleAddMultiVectorArray_OpenMPDEV(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 NVECTOR_OPENMPDEV vector. The @@ -267,7 +267,7 @@ options as the vector they are cloned from while vectors created with ``ops`` structure are ``NULL``. -.. c:function:: int N_VEnableLinearCombinationVectorArray_OpenMPDEV(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearCombinationVectorArray_OpenMPDEV(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear combination operation for vector arrays in the NVECTOR_OPENMPDEV vector. The return value diff --git a/doc/shared/nvectors/NVector_Operations.rst b/doc/shared/nvectors/NVector_Operations.rst index 06cf87f4b8..887658e96f 100644 --- a/doc/shared/nvectors/NVector_Operations.rst +++ b/doc/shared/nvectors/NVector_Operations.rst @@ -524,7 +524,7 @@ the name, usage of the function, and a description of its mathematical operations below. -.. c:function:: int N_VLinearCombination(int nv, sunrealtype* c, N_Vector* X, N_Vector z) +.. c:function:: SUNErrCode N_VLinearCombination(int nv, sunrealtype* c, N_Vector* X, N_Vector z) This routine computes the linear combination of *nv* vectors with :math:`n` elements: @@ -534,8 +534,7 @@ operations below. where :math:`c` is an array of :math:`nv` scalars, :math:`x_j` is a vector in the vector array *X*, and *z* is the output vector. If the output vector *z* is one of the vectors in *X*, then - it *must* be the first vector in the vector array. The operation - returns 0 for success and a non-zero value otherwise. + it *must* be the first vector in the vector array. The operation returns a :c:type:`SUNErrCode`. Usage: @@ -544,7 +543,7 @@ operations below. retval = N_VLinearCombination(nv, c, X, z); -.. c:function:: int N_VScaleAddMulti(int nv, sunrealtype* c, N_Vector x, N_Vector* Y, N_Vector* Z) +.. c:function:: SUNErrCode N_VScaleAddMulti(int nv, sunrealtype* c, N_Vector x, N_Vector* Y, N_Vector* Z) This routine scales and adds one vector to *nv* vectors with :math:`n` elements: @@ -553,8 +552,7 @@ operations below. where *c* is an array of scalars, *x* is a vector, :math:`y_j` is a vector in the vector array *Y*, and :math:`z_j` is an output vector - in the vector array *Z*. The operation returns 0 for success and a - non-zero value otherwise. + in the vector array *Z*. The operation returns a :c:type:`SUNErrCode`. Usage: @@ -563,7 +561,7 @@ operations below. retval = N_VScaleAddMulti(nv, c, x, Y, Z); -.. c:function:: int N_VDotProdMulti(int nv, N_Vector x, N_Vector* Y, sunrealtype* d) +.. c:function:: SUNErrCode N_VDotProdMulti(int nv, N_Vector x, N_Vector* Y, sunrealtype* d) This routine computes the dot product of a vector with *nv* vectors having :math:`n` elements: @@ -573,8 +571,7 @@ operations below. where *d* is an array of scalars containing the computed dot products, *x* is a vector, and :math:`y_j` is a vector the vector - array *Y*. The operation returns 0 for success and a non-zero value - otherwise. + array *Y*. The operation returns a :c:type:`SUNErrCode`. Usage: @@ -599,7 +596,7 @@ operation, we give the name, usage of the function, and a description of its mathematical operations below. -.. c:function:: int N_VLinearSumVectorArray(int nv, sunrealtype a, N_Vector X, sunrealtype b, N_Vector* Y, N_Vector* Z) +.. c:function:: SUNErrCode N_VLinearSumVectorArray(int nv, sunrealtype a, N_Vector X, sunrealtype b, N_Vector* Y, N_Vector* Z) This routine computes the linear sum of two vector arrays of *nv* vectors with :math:`n` elements: @@ -608,8 +605,7 @@ of its mathematical operations below. where *a* and *b* are scalars, :math:`x_j` and :math:`y_j` are vectors in the vector arrays *X* and *Y* respectively, and - :math:`z_j` is a vector in the output vector array *Z*. The - operation returns 0 for success and a non-zero value otherwise. + :math:`z_j` is a vector in the output vector array *Z*. The operation returns a :c:type:`SUNErrCode`. Usage: @@ -618,7 +614,7 @@ of its mathematical operations below. retval = N_VLinearSumVectorArray(nv, a, X, b, Y, Z); -.. c:function:: int N_VScaleVectorArray(int nv, sunrealtype* c, N_Vector* X, N_Vector* Z) +.. c:function:: SUNErrCode N_VScaleVectorArray(int nv, sunrealtype* c, N_Vector* X, N_Vector* Z) This routine scales each element in a vector of :math:`n` elements in a vector array of *nv* vectors by a potentially different constant: @@ -628,7 +624,7 @@ of its mathematical operations below. where *c* is an array of scalars, :math:`x_j` is a vector in the vector array *X*, and :math:`z_j` is a vector in the output vector - array *Z*. The operation returns 0 for success and a non-zero value otherwise. + array *Z*. The operation returns a :c:type:`SUNErrCode`. Usage: @@ -637,7 +633,7 @@ of its mathematical operations below. retval = N_VScaleVectorArray(nv, c, X, Z); -.. c:function:: int N_VConstVectorArray(int nv, sunrealtype c, N_Vector* Z) +.. c:function:: SUNErrCode N_VConstVectorArray(int nv, sunrealtype c, N_Vector* Z) This routine sets each element in a vector of :math:`n` elements in a vector array of *nv* vectors to the same value: @@ -646,7 +642,7 @@ of its mathematical operations below. z_{j,i} = c, \quad i=0,\ldots,n-1 \quad j=0,\ldots,nv-1, where *c* is a scalar and :math:`z_j` is a vector in the vector - array *Z*. The operation returns 0 for success and a non-zero value otherwise. + array *Z*. The operation returns a :c:type:`SUNErrCode`. Usage: @@ -655,7 +651,7 @@ of its mathematical operations below. retval = N_VConstVectorArray(nv, c, Z); -.. c:function:: int N_VWrmsNormVectorArray(int nv, N_Vector* X, N_Vector* W, sunrealtype* m) +.. c:function:: SUNErrCode N_VWrmsNormVectorArray(int nv, N_Vector* X, N_Vector* W, sunrealtype* m) This routine computes the weighted root mean square norm of each vector in a vector array: @@ -665,8 +661,7 @@ of its mathematical operations below. where :math:`x_j` is a vector in the vector array *X*, :math:`w_j` is a weight vector in the vector array *W*, and *m* is the output - array of scalars containing the computed norms. The operation - returns 0 for success and a non-zero value otherwise. + array of scalars containing the computed norms. The operation returns a :c:type:`SUNErrCode`. Usage: @@ -675,7 +670,7 @@ of its mathematical operations below. retval = N_VWrmsNormVectorArray(nv, X, W, m); -.. c:function:: int N_VWrmsNormMaskVectorArray(int nv, N_Vector* X, N_Vector* W, N_Vector id, sunrealtype* m) +.. c:function:: SUNErrCode N_VWrmsNormMaskVectorArray(int nv, N_Vector* X, N_Vector* W, N_Vector id, sunrealtype* m) This routine computes the masked weighted root mean square norm of each vector in a vector array: @@ -687,8 +682,7 @@ of its mathematical operations below. :math:`x_j` is a vector in the vector array *X*, :math:`w_j` is a weight vector in the vector array *W*, *id* is the mask vector, and *m* is the output array of scalars containing the computed - norms. The operation returns 0 for success and a non-zero value - otherwise. + norms. The operation returns a :c:type:`SUNErrCode`. Usage: @@ -697,7 +691,7 @@ of its mathematical operations below. retval = N_VWrmsNormMaskVectorArray(nv, X, W, id, m); -.. c:function:: int N_VScaleAddMultiVectorArray(int nv, int nsum, sunrealtype* c, N_Vector* X, N_Vector** YY, N_Vector** ZZ) +.. c:function:: SUNErrCode N_VScaleAddMultiVectorArray(int nv, int nsum, sunrealtype* c, N_Vector* X, N_Vector** YY, N_Vector** ZZ) This routine scales and adds a vector array of *nv* vectors to *nsum* other vector arrays: @@ -708,8 +702,7 @@ of its mathematical operations below. where *c* is an array of scalars, :math:`x_j` is a vector in the vector array *X*, :math:`y_{k,j}` is a vector in the array of vector arrays *YY*, and :math:`z_{k,j}` is an output vector in the - array of vector arrays *ZZ*. The operation returns 0 for success - and a non-zero value otherwise. + array of vector arrays *ZZ*. The operation returns a :c:type:`SUNErrCode`. Usage: @@ -718,7 +711,7 @@ of its mathematical operations below. retval = N_VScaleAddMultiVectorArray(nv, nsum, c, x, YY, ZZ); -.. c:function:: int N_VLinearCombinationVectorArray(int nv, int nsum, sunrealtype* c, N_Vector** XX, N_Vector* Z) +.. c:function:: SUNErrCode N_VLinearCombinationVectorArray(int nv, int nsum, sunrealtype* c, N_Vector** XX, N_Vector* Z) This routine computes the linear combination of *nsum* vector arrays containing *nv* vectors: @@ -730,8 +723,7 @@ of its mathematical operations below. array of vector arrays *XX*, and :math:`z_{j,i}` is an output vector in the vector array *Z*. If the output vector array is one of the vector arrays in *XX*, it *must* be the first vector array - in *XX*. The operation returns 0 for success and a non-zero value - otherwise. + in *XX*. The operation returns a :c:type:`SUNErrCode`. Usage: @@ -953,7 +945,7 @@ orthogonalization methods to reduce the number of MPI ``Allreduce`` calls. If a particular NVECTOR implementation does not define these operations additional communication will be required. -.. c:function:: int N_VDotProdMultiLocal(int nv, N_Vector x, N_Vector* Y, sunrealtype* d) +.. c:function:: SUNErrCode N_VDotProdMultiLocal(int nv, N_Vector x, N_Vector* Y, sunrealtype* d) This routine computes the MPI task-local portion of the dot product of a vector :math:`x` with *nv* vectors :math:`y_j`: @@ -964,8 +956,7 @@ communication will be required. where :math:`d` is an array of scalars containing the computed dot products, :math:`x` is a vector, :math:`y_j` is a vector in the vector array *Y*, and :math:`n_{local}` corresponds to the number of components in the vector on - this MPI task. The operation returns 0 for success and a non-zero value - otherwise. + this MPI task. The operation returns a :c:type:`SUNErrCode`. Usage: @@ -974,7 +965,7 @@ communication will be required. retval = N_VDotProdMultiLocal(nv, x, Y, d); -.. c:function:: int N_VDotProdMultiAllReduce(int nv, N_Vector x, sunrealtype* d) +.. c:function:: SUNErrCode N_VDotProdMultiAllReduce(int nv, N_Vector x, sunrealtype* d) This routine combines the MPI task-local portions of the dot product of a vector :math:`x` with *nv* vectors: @@ -985,7 +976,7 @@ communication will be required. where *d* is an array of *nv* scalars containing the local contributions to the dot product and *comm* is the MPI communicator associated with the vector - *x*. The operation returns 0 for success and a non-zero value otherwise. + *x*. The operation returns a :c:type:`SUNErrCode`. Usage: @@ -1009,7 +1000,7 @@ usage. -.. c:function:: int N_VBufSize(N_Vector x, sunindextype *size) +.. c:function:: SUNErrCode N_VBufSize(N_Vector x, sunindextype *size) This routine returns the buffer size need to exchange in the data in the vector *x* between computational nodes. @@ -1022,7 +1013,7 @@ usage. -.. c:function:: int N_VBufPack(N_Vector x, void *buf) +.. c:function:: SUNErrCode N_VBufPack(N_Vector x, void *buf) This routine fills the exchange buffer *buf* with the vector data in *x*. @@ -1033,7 +1024,7 @@ usage. flag = N_VBufPack(x, &buf) -.. c:function:: int N_VBufUnpack(N_Vector x, void *buf) +.. c:function:: SUNErrCode N_VBufUnpack(N_Vector x, void *buf) This routine unpacks the data in the exchange buffer *buf* into the vector *x*. diff --git a/doc/shared/nvectors/NVector_PETSc.rst b/doc/shared/nvectors/NVector_PETSc.rst index dcfa24a158..e598f54f92 100644 --- a/doc/shared/nvectors/NVector_PETSc.rst +++ b/doc/shared/nvectors/NVector_PETSc.rst @@ -101,76 +101,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_VMake_Petsc` will have the default settings for the NVECTOR_PETSC module. -.. c:function:: int N_VEnableFusedOps_Petsc(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableFusedOps_Petsc(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) all fused and - vector array operations in the PETSc 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 PETSc vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableLinearCombination_Petsc(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearCombination_Petsc(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear - combination fused operation in the PETSc 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 PETSc vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleAddMulti_Petsc(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleAddMulti_Petsc(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 PETSc 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_Petsc(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableDotProdMulti_Petsc(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the multiple - dot products fused operation in the PETSc 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 PETSc vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableLinearSumVectorArray_Petsc(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearSumVectorArray_Petsc(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear sum - operation for vector arrays in the PETSc 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 PETSc vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleVectorArray_Petsc(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleVectorArray_Petsc(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the scale - operation for vector arrays in the PETSc 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 PETSc vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableConstVectorArray_Petsc(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableConstVectorArray_Petsc(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the const - operation for vector arrays in the PETSc 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 PETSc vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableWrmsNormVectorArray_Petsc(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableWrmsNormVectorArray_Petsc(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the WRMS norm - operation for vector arrays in the PETSc 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 PETSc vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableWrmsNormMaskVectorArray_Petsc(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableWrmsNormMaskVectorArray_Petsc(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the masked WRMS - norm operation for vector arrays in the PETSc 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 PETSc vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleAddMultiVectorArray_Petsc(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleAddMultiVectorArray_Petsc(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 PETSc 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_Petsc(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearCombinationVectorArray_Petsc(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear - combination operation for vector arrays in the PETSc 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 PETSc vector. The return value is a :c:type:`SUNErrCode`. **Notes** diff --git a/doc/shared/nvectors/NVector_ParHyp.rst b/doc/shared/nvectors/NVector_ParHyp.rst index 767958faed..eb8a99ad32 100644 --- a/doc/shared/nvectors/NVector_ParHyp.rst +++ b/doc/shared/nvectors/NVector_ParHyp.rst @@ -109,76 +109,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_VMake_ParHyp` will have the default settings for the NVECTOR_PARHYP module. -.. c:function:: int N_VEnableFusedOps_ParHyp(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableFusedOps_ParHyp(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) all fused and - vector array operations in the parhyp 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 parhyp vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableLinearCombination_ParHyp(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearCombination_ParHyp(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear - combination fused operation in the parhyp 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 parhyp vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleAddMulti_ParHyp(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleAddMulti_ParHyp(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 parhyp 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_ParHyp(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableDotProdMulti_ParHyp(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the multiple - dot products fused operation in the parhyp 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 parhyp vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableLinearSumVectorArray_ParHyp(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearSumVectorArray_ParHyp(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear sum - operation for vector arrays in the parhyp 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 parhyp vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleVectorArray_ParHyp(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleVectorArray_ParHyp(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the scale - operation for vector arrays in the parhyp 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 parhyp vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableConstVectorArray_ParHyp(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableConstVectorArray_ParHyp(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the const - operation for vector arrays in the parhyp 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 parhyp vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableWrmsNormVectorArray_ParHyp(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableWrmsNormVectorArray_ParHyp(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the WRMS norm - operation for vector arrays in the parhyp 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 parhyp vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableWrmsNormMaskVectorArray_ParHyp(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableWrmsNormMaskVectorArray_ParHyp(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the masked WRMS - norm operation for vector arrays in the parhyp 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 parhyp vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleAddMultiVectorArray_ParHyp(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleAddMultiVectorArray_ParHyp(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 parhyp 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_ParHyp(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearCombinationVectorArray_ParHyp(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear - combination operation for vector arrays in the parhyp 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 parhyp vector. The return value is a :c:type:`SUNErrCode`. **Notes** diff --git a/doc/shared/nvectors/NVector_Parallel.rst b/doc/shared/nvectors/NVector_Parallel.rst index ce360fd3bb..2d632227a8 100644 --- a/doc/shared/nvectors/NVector_Parallel.rst +++ b/doc/shared/nvectors/NVector_Parallel.rst @@ -207,76 +207,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_Parallel` will have the default settings for the NVECTOR_PARALLEL module. -.. c:function:: int N_VEnableFusedOps_Parallel(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableFusedOps_Parallel(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) all fused and - vector array operations in the parallel 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 parallel vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableLinearCombination_Parallel(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearCombination_Parallel(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear - combination fused operation in the parallel 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 parallel vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleAddMulti_Parallel(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleAddMulti_Parallel(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 parallel 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_Parallel(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableDotProdMulti_Parallel(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the multiple - dot products fused operation in the parallel 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 parallel vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableLinearSumVectorArray_Parallel(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearSumVectorArray_Parallel(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear sum - operation for vector arrays in the parallel 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 parallel vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleVectorArray_Parallel(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleVectorArray_Parallel(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the scale - operation for vector arrays in the parallel 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 parallel vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableConstVectorArray_Parallel(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableConstVectorArray_Parallel(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the const - operation for vector arrays in the parallel 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 parallel vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableWrmsNormVectorArray_Parallel(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableWrmsNormVectorArray_Parallel(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the WRMS norm - operation for vector arrays in the parallel 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 parallel vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableWrmsNormMaskVectorArray_Parallel(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableWrmsNormMaskVectorArray_Parallel(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the masked WRMS - norm operation for vector arrays in the parallel 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 parallel vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleAddMultiVectorArray_Parallel(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleAddMultiVectorArray_Parallel(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 parallel 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_Parallel(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearCombinationVectorArray_Parallel(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear - combination operation for vector arrays in the parallel 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 parallel vector. The return value is a :c:type:`SUNErrCode`. **Notes** diff --git a/doc/shared/nvectors/NVector_Pthreads.rst b/doc/shared/nvectors/NVector_Pthreads.rst index 124f0e1262..ab9fc7ab12 100644 --- a/doc/shared/nvectors/NVector_Pthreads.rst +++ b/doc/shared/nvectors/NVector_Pthreads.rst @@ -205,76 +205,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_Pthreads` will have the default settings for the NVECTOR_PTHREADS module. -.. c:function:: int N_VEnableFusedOps_Pthreads(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableFusedOps_Pthreads(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) all fused and - vector array operations in the Pthreads 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 Pthreads vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableLinearCombination_Pthreads(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearCombination_Pthreads(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear - combination fused operation in the Pthreads 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 Pthreads vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleAddMulti_Pthreads(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleAddMulti_Pthreads(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 Pthreads 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_Pthreads(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableDotProdMulti_Pthreads(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the multiple - dot products fused operation in the Pthreads 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 Pthreads vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableLinearSumVectorArray_Pthreads(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearSumVectorArray_Pthreads(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear sum - operation for vector arrays in the Pthreads 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 Pthreads vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleVectorArray_Pthreads(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleVectorArray_Pthreads(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the scale - operation for vector arrays in the Pthreads 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 Pthreads vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableConstVectorArray_Pthreads(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableConstVectorArray_Pthreads(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the const - operation for vector arrays in the Pthreads 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 Pthreads vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableWrmsNormVectorArray_Pthreads(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableWrmsNormVectorArray_Pthreads(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the WRMS norm - operation for vector arrays in the Pthreads 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 Pthreads vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableWrmsNormMaskVectorArray_Pthreads(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableWrmsNormMaskVectorArray_Pthreads(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the masked WRMS - norm operation for vector arrays in the Pthreads 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 Pthreads vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleAddMultiVectorArray_Pthreads(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleAddMultiVectorArray_Pthreads(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 Pthreads 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_Pthreads(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearCombinationVectorArray_Pthreads(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear - combination operation for vector arrays in the Pthreads 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 Pthreads vector. The return value is a :c:type:`SUNErrCode`. **Notes** diff --git a/doc/shared/nvectors/NVector_RAJA.rst b/doc/shared/nvectors/NVector_RAJA.rst index 9a2df1fea7..84f16d97ee 100644 --- a/doc/shared/nvectors/NVector_RAJA.rst +++ b/doc/shared/nvectors/NVector_RAJA.rst @@ -181,78 +181,69 @@ 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_Raja` will have the default settings for the NVECTOR_RAJA module. -.. c:function:: int N_VEnableFusedOps_Raja(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableFusedOps_Raja(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) all fused and - vector array operations in the RAJA 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 RAJA vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableLinearCombination_Raja(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearCombination_Raja(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear - combination fused operation in the RAJA 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 RAJA vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleAddMulti_Raja(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleAddMulti_Raja(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 RAJA 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_Raja(N_Vector v, sunbooleantype tf) + .. c:function:: SUNErrCode N_VEnableDotProdMulti_Raja(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the multiple dot products fused operation in the RAJA vector. The return value is ``0`` for success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``. -.. c:function:: int N_VEnableLinearSumVectorArray_Raja(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearSumVectorArray_Raja(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear sum - operation for vector arrays in the RAJA 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 RAJA vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleVectorArray_Raja(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleVectorArray_Raja(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the scale - operation for vector arrays in the RAJA 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 RAJA vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableConstVectorArray_Raja(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableConstVectorArray_Raja(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the const - operation for vector arrays in the RAJA 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 RAJA vector. The return value is a :c:type:`SUNErrCode`. .. - .. c:function:: int N_VEnableWrmsNormVectorArray_Raja(N_Vector v, sunbooleantype tf) + .. c:function:: SUNErrCode N_VEnableWrmsNormVectorArray_Raja(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the WRMS norm operation for vector arrays in the RAJA vector. The return value is ``0`` for success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``. - .. c:function:: int N_VEnableWrmsNormMaskVectorArray_Raja(N_Vector v, sunbooleantype tf) + .. c:function:: SUNErrCode N_VEnableWrmsNormMaskVectorArray_Raja(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the masked WRMS norm operation for vector arrays in the RAJA vector. The return value is ``0`` for success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``. -.. c:function:: int N_VEnableScaleAddMultiVectorArray_Raja(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleAddMultiVectorArray_Raja(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 RAJA 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_Raja(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearCombinationVectorArray_Raja(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear - combination operation for vector arrays in the RAJA 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 RAJA vector. The return value is a :c:type:`SUNErrCode`. **Notes** diff --git a/doc/shared/nvectors/NVector_SYCL.rst b/doc/shared/nvectors/NVector_SYCL.rst index 7f6036f925..fb6a3262f5 100644 --- a/doc/shared/nvectors/NVector_SYCL.rst +++ b/doc/shared/nvectors/NVector_SYCL.rst @@ -173,7 +173,7 @@ The following user-callable function is provided to set the execution policies for how SYCL kernels are launched on a device. -.. cpp:function:: int N_VSetKernelExecPolicy_Sycl(N_Vector v, SUNSyclExecPolicy *stream_exec_policy, SUNSyclExecPolicy *reduce_exec_policy) +.. cpp:function:: SUNErrCode N_VSetKernelExecPolicy_Sycl(N_Vector v, SUNSyclExecPolicy *stream_exec_policy, SUNSyclExecPolicy *reduce_exec_policy) This function sets the execution policies which control the kernel parameters utilized when launching the streaming and reduction kernels. By default the @@ -224,78 +224,69 @@ vectors created by any of the constructors above will have the default settings for the NVECTOR_SYCL module. -.. cpp:function:: int N_VEnableFusedOps_Sycl(N_Vector v, sunbooleantype tf) +.. cpp:function:: SUNErrCode N_VEnableFusedOps_Sycl(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) all fused and - vector array operations in the SYCL 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 SYCL vector. The return value is a :c:type:`SUNErrCode`. -.. cpp:function:: int N_VEnableLinearCombination_Sycl(N_Vector v, sunbooleantype tf) +.. cpp:function:: SUNErrCode N_VEnableLinearCombination_Sycl(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear - combination fused operation in the SYCL 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 SYCL vector. The return value is a :c:type:`SUNErrCode`. -.. cpp:function:: int N_VEnableScaleAddMulti_Sycl(N_Vector v, sunbooleantype tf) +.. cpp:function:: SUNErrCode N_VEnableScaleAddMulti_Sycl(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 SYCL 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`. .. - .. cpp:function:: int N_VEnableDotProdMulti_Sycl(N_Vector v, sunbooleantype tf) + .. cpp:function:: SUNErrCode N_VEnableDotProdMulti_Sycl(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the multiple dot products fused operation in the SYCL vector. The return value is ``0`` for success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``. -.. cpp:function:: int N_VEnableLinearSumVectorArray_Sycl(N_Vector v, sunbooleantype tf) +.. cpp:function:: SUNErrCode N_VEnableLinearSumVectorArray_Sycl(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear sum - operation for vector arrays in the SYCL 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 SYCL vector. The return value is a :c:type:`SUNErrCode`. -.. cpp:function:: int N_VEnableScaleVectorArray_Sycl(N_Vector v, sunbooleantype tf) +.. cpp:function:: SUNErrCode N_VEnableScaleVectorArray_Sycl(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the scale - operation for vector arrays in the SYCL 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 SYCL vector. The return value is a :c:type:`SUNErrCode`. -.. cpp:function:: int N_VEnableConstVectorArray_Sycl(N_Vector v, sunbooleantype tf) +.. cpp:function:: SUNErrCode N_VEnableConstVectorArray_Sycl(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the const - operation for vector arrays in the SYCL 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 SYCL vector. The return value is a :c:type:`SUNErrCode`. .. - .. cpp:function:: int N_VEnableWrmsNormVectorArray_Sycl(N_Vector v, sunbooleantype tf) + .. cpp:function:: SUNErrCode N_VEnableWrmsNormVectorArray_Sycl(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the WRMS norm operation for vector arrays in the SYCL vector. The return value is ``0`` for success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``. - .. cpp:function:: int N_VEnableWrmsNormMaskVectorArray_Sycl(N_Vector v, sunbooleantype tf) + .. cpp:function:: SUNErrCode N_VEnableWrmsNormMaskVectorArray_Sycl(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the masked WRMS norm operation for vector arrays in the SYCL vector. The return value is ``0`` for success and ``-1`` if the input vector or its ``ops`` structure are ``NULL``. -.. cpp:function:: int N_VEnableScaleAddMultiVectorArray_Sycl(N_Vector v, sunbooleantype tf) +.. cpp:function:: SUNErrCode N_VEnableScaleAddMultiVectorArray_Sycl(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 SYCL 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`. -.. cpp:function:: int N_VEnableLinearCombinationVectorArray_Sycl(N_Vector v, sunbooleantype tf) +.. cpp:function:: SUNErrCode N_VEnableLinearCombinationVectorArray_Sycl(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear - combination operation for vector arrays in the SYCL 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 SYCL vector. The return value is a :c:type:`SUNErrCode`. **Notes** diff --git a/doc/shared/nvectors/NVector_Serial.rst b/doc/shared/nvectors/NVector_Serial.rst index f93ffd8b40..cd320aa440 100644 --- a/doc/shared/nvectors/NVector_Serial.rst +++ b/doc/shared/nvectors/NVector_Serial.rst @@ -183,76 +183,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_Serial` will have the default settings for the NVECTOR_SERIAL module. -.. c:function:: int N_VEnableFusedOps_Serial(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableFusedOps_Serial(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) all fused and - vector array operations in the serial 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 serial vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableLinearCombination_Serial(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearCombination_Serial(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear - combination fused operation in the serial 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 serial vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleAddMulti_Serial(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleAddMulti_Serial(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 serial 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_Serial(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableDotProdMulti_Serial(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the multiple - dot products fused operation in the serial 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 serial vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableLinearSumVectorArray_Serial(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearSumVectorArray_Serial(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear sum - operation for vector arrays in the serial 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 serial vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleVectorArray_Serial(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleVectorArray_Serial(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the scale - operation for vector arrays in the serial 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 serial vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableConstVectorArray_Serial(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableConstVectorArray_Serial(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the const - operation for vector arrays in the serial 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 serial vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableWrmsNormVectorArray_Serial(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableWrmsNormVectorArray_Serial(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the WRMS norm - operation for vector arrays in the serial 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 serial vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableWrmsNormMaskVectorArray_Serial(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableWrmsNormMaskVectorArray_Serial(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the masked WRMS - norm operation for vector arrays in the serial 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 serial vector. The return value is a :c:type:`SUNErrCode`. -.. c:function:: int N_VEnableScaleAddMultiVectorArray_Serial(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableScaleAddMultiVectorArray_Serial(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 serial 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_Serial(N_Vector v, sunbooleantype tf) +.. c:function:: SUNErrCode N_VEnableLinearCombinationVectorArray_Serial(N_Vector v, sunbooleantype tf) This function enables (``SUNTRUE``) or disables (``SUNFALSE``) the linear - combination operation for vector arrays in the serial 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 serial vector. The return value is a :c:type:`SUNErrCode`. **Notes**