| ceed-vector.c (e6cb4fca5f98bfb30d17a8599499ec279b90b048) | ceed-vector.c (a5ef892d03a3b4cf0e22d36a5b8677e57e337bf9) |
|---|---|
| 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> --- 145 unchanged lines hidden (view full) --- 154 @param[in] length Length of vector 155 @param[out] vec Address of the variable where the newly created `CeedVector` will be stored 156 157 @return An error code: 0 - success, otherwise - failure 158 159 @ref User 160**/ 161int CeedVectorCreate(Ceed ceed, CeedSize length, CeedVector *vec) { | 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> --- 145 unchanged lines hidden (view full) --- 154 @param[in] length Length of vector 155 @param[out] vec Address of the variable where the newly created `CeedVector` will be stored 156 157 @return An error code: 0 - success, otherwise - failure 158 159 @ref User 160**/ 161int CeedVectorCreate(Ceed ceed, CeedSize length, CeedVector *vec) { |
| 162 CeedCheck(length >= 0, ceed, CEED_ERROR_UNSUPPORTED, "CeedVector must have length >= 0, recieved %" CeedSize_FMT, length); |
|
| 162 if (!ceed->VectorCreate) { 163 Ceed delegate; 164 165 CeedCall(CeedGetObjectDelegate(ceed, &delegate, "Vector")); 166 CeedCheck(delegate, ceed, CEED_ERROR_UNSUPPORTED, "Backend does not implement VectorCreate"); 167 CeedCall(CeedVectorCreate(delegate, length, vec)); 168 CeedCall(CeedDestroy(&delegate)); 169 return CEED_ERROR_SUCCESS; --- 952 unchanged lines hidden --- | 163 if (!ceed->VectorCreate) { 164 Ceed delegate; 165 166 CeedCall(CeedGetObjectDelegate(ceed, &delegate, "Vector")); 167 CeedCheck(delegate, ceed, CEED_ERROR_UNSUPPORTED, "Backend does not implement VectorCreate"); 168 CeedCall(CeedVectorCreate(delegate, length, vec)); 169 CeedCall(CeedDestroy(&delegate)); 170 return CEED_ERROR_SUCCESS; --- 952 unchanged lines hidden --- |