| ceed-tensor.c (c52157525785c51910c8fadbbfd077683f26126a) | ceed-tensor.c (db002c03923317a1c3814dcd861330002c00a8ea) |
|---|---|
| 1// Copyright (c) 2017-2022, 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> --- 27 unchanged lines hidden (view full) --- 36 37 CeedCall(CeedGetObjectDelegate(ceed, &delegate, "TensorContract")); 38 CeedCheck(delegate, ceed, CEED_ERROR_UNSUPPORTED, "Backend does not support TensorContractCreate"); 39 CeedCall(CeedTensorContractCreate(delegate, basis, contract)); 40 return CEED_ERROR_SUCCESS; 41 } 42 43 CeedCall(CeedCalloc(1, contract)); | 1// Copyright (c) 2017-2022, 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> --- 27 unchanged lines hidden (view full) --- 36 37 CeedCall(CeedGetObjectDelegate(ceed, &delegate, "TensorContract")); 38 CeedCheck(delegate, ceed, CEED_ERROR_UNSUPPORTED, "Backend does not support TensorContractCreate"); 39 CeedCall(CeedTensorContractCreate(delegate, basis, contract)); 40 return CEED_ERROR_SUCCESS; 41 } 42 43 CeedCall(CeedCalloc(1, contract)); |
| 44 45 (*contract)->ceed = ceed; 46 CeedCall(CeedReference(ceed)); | 44 CeedCall(CeedReferenceCopy(ceed, &(*contract)->ceed)); |
| 47 CeedCall(ceed->TensorContractCreate(basis, *contract)); 48 return CEED_ERROR_SUCCESS; 49} 50 51/** 52 @brief Apply tensor contraction 53 54 Contracts on the middle index --- 145 unchanged lines hidden --- | 45 CeedCall(ceed->TensorContractCreate(basis, *contract)); 46 return CEED_ERROR_SUCCESS; 47} 48 49/** 50 @brief Apply tensor contraction 51 52 Contracts on the middle index --- 145 unchanged lines hidden --- |