| ceed-vector.c (6a6b797f790a7f197cde448212987b3ead5d18fa) | ceed-vector.c (690992b2ef7dcef8d00e259f2fa17075fde4c330) |
|---|---|
| 1// Copyright (c) 2017-2025, Lawrence Livermore National Security, LLC and other CEED contributors. 2// All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3// 4// SPDX-License-Identifier: BSD-2-Clause 5// 6// This file is part of CEED: http://github.com/ceed 7 8#include <ceed-impl.h> --- 26 unchanged lines hidden (view full) --- 35 36/// ---------------------------------------------------------------------------- 37/// CeedVector Backend API 38/// ---------------------------------------------------------------------------- 39/// @addtogroup CeedVectorBackend 40/// @{ 41 42/** | 1// Copyright (c) 2017-2025, Lawrence Livermore National Security, LLC and other CEED contributors. 2// All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3// 4// SPDX-License-Identifier: BSD-2-Clause 5// 6// This file is part of CEED: http://github.com/ceed 7 8#include <ceed-impl.h> --- 26 unchanged lines hidden (view full) --- 35 36/// ---------------------------------------------------------------------------- 37/// CeedVector Backend API 38/// ---------------------------------------------------------------------------- 39/// @addtogroup CeedVectorBackend 40/// @{ 41 42/** |
| 43 @brief Get the number of tabs to indent for @ref CeedVectorView() output 44 45 @param[in] vec `CeedVector` to get the number of view tabs 46 @param[out] num_tabs Number of view tabs 47 48 @return Error code: 0 - success, otherwise - failure 49 50 @ref Backend 51**/ 52int CeedVectorGetNumViewTabs(CeedVector vec, CeedInt *num_tabs) { 53 *num_tabs = vec->num_tabs; 54 return CEED_ERROR_SUCCESS; 55} 56 57/** | |
| 58 @brief Check for valid data in a `CeedVector` 59 60 @param[in] vec `CeedVector` to check validity 61 @param[out] has_valid_array Variable to store validity 62 63 @return An error code: 0 - success, otherwise - failure 64 65 @ref Backend --- 955 unchanged lines hidden (view full) --- 1021**/ 1022int CeedVectorSetNumViewTabs(CeedVector vec, CeedInt num_tabs) { 1023 CeedCheck(num_tabs >= 0, CeedVectorReturnCeed(vec), CEED_ERROR_MINOR, "Number of view tabs must be non-negative"); 1024 vec->num_tabs = num_tabs; 1025 return CEED_ERROR_SUCCESS; 1026} 1027 1028/** | 43 @brief Check for valid data in a `CeedVector` 44 45 @param[in] vec `CeedVector` to check validity 46 @param[out] has_valid_array Variable to store validity 47 48 @return An error code: 0 - success, otherwise - failure 49 50 @ref Backend --- 955 unchanged lines hidden (view full) --- 1006**/ 1007int CeedVectorSetNumViewTabs(CeedVector vec, CeedInt num_tabs) { 1008 CeedCheck(num_tabs >= 0, CeedVectorReturnCeed(vec), CEED_ERROR_MINOR, "Number of view tabs must be non-negative"); 1009 vec->num_tabs = num_tabs; 1010 return CEED_ERROR_SUCCESS; 1011} 1012 1013/** |
| 1014 @brief Get the number of tabs to indent for @ref CeedVectorView() output 1015 1016 @param[in] vec `CeedVector` to get the number of view tabs 1017 @param[out] num_tabs Number of view tabs 1018 1019 @return Error code: 0 - success, otherwise - failure 1020 1021 @ref User 1022**/ 1023int CeedVectorGetNumViewTabs(CeedVector vec, CeedInt *num_tabs) { 1024 *num_tabs = vec->num_tabs; 1025 return CEED_ERROR_SUCCESS; 1026} 1027 1028/** |
|
| 1029 @brief View a `CeedVector` 1030 1031 Note: It is safe to use any unsigned values for `start` or `stop` and any nonzero integer for `step`. 1032 Any portion of the provided range that is outside the range of valid indices for the `CeedVector` will be ignored. 1033 1034 @param[in] vec `CeedVector` to view 1035 @param[in] start Index of first `CeedVector` entry to view in the range `[start, stop)` 1036 @param[in] stop One past the last element to view in the range, or `-1` for `length` --- 127 unchanged lines hidden --- | 1029 @brief View a `CeedVector` 1030 1031 Note: It is safe to use any unsigned values for `start` or `stop` and any nonzero integer for `step`. 1032 Any portion of the provided range that is outside the range of valid indices for the `CeedVector` will be ignored. 1033 1034 @param[in] vec `CeedVector` to view 1035 @param[in] start Index of first `CeedVector` entry to view in the range `[start, stop)` 1036 @param[in] stop One past the last element to view in the range, or `-1` for `length` --- 127 unchanged lines hidden --- |