| ceed.c (f009e520dbf9878e5977723e046aa9c8bfe9790e) | ceed.c (b13efd58b277efef1db70d6f06eaaf4d415a7642) |
|---|---|
| 1// Copyright (c) 2017-2024, 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#define _POSIX_C_SOURCE 200112 --- 644 unchanged lines hidden (view full) --- 653 Ceed fallback_ceed; 654 const char *fallback_resource; 655 656 CeedCall(CeedGetOperatorFallbackResource(ceed, &fallback_resource)); 657 CeedCall(CeedInit(fallback_resource, &fallback_ceed)); 658 fallback_ceed->op_fallback_parent = ceed; 659 fallback_ceed->Error = ceed->Error; 660 ceed->op_fallback_ceed = fallback_ceed; | 1// Copyright (c) 2017-2024, 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#define _POSIX_C_SOURCE 200112 --- 644 unchanged lines hidden (view full) --- 653 Ceed fallback_ceed; 654 const char *fallback_resource; 655 656 CeedCall(CeedGetOperatorFallbackResource(ceed, &fallback_resource)); 657 CeedCall(CeedInit(fallback_resource, &fallback_ceed)); 658 fallback_ceed->op_fallback_parent = ceed; 659 fallback_ceed->Error = ceed->Error; 660 ceed->op_fallback_ceed = fallback_ceed; |
| 661 { 662 const char **jit_source_dirs; 663 CeedInt num_jit_source_dirs = 0; 664 665 CeedCall(CeedGetJitSourceRoots(ceed, &num_jit_source_dirs, &jit_source_dirs)); 666 for (CeedInt i = 0; i < num_jit_source_dirs; i++) { 667 CeedCall(CeedAddJitSourceRoot(fallback_ceed, jit_source_dirs[i])); 668 } 669 CeedCall(CeedRestoreJitSourceRoots(ceed, &jit_source_dirs)); 670 } |
|
| 661 } 662 *fallback_ceed = ceed->op_fallback_ceed; 663 return CEED_ERROR_SUCCESS; 664} 665 666/** 667 @brief Set the fallback resource for `CeedOperator`. 668 --- 189 unchanged lines hidden (view full) --- 858 return CEED_ERROR_SUCCESS; 859 } 860 } 861 // LCOV_EXCL_START 862 return CeedError(ceed, CEED_ERROR_MAJOR, "vec was not checked out via CeedGetWorkVector()"); 863 // LCOV_EXCL_STOP 864} 865 | 671 } 672 *fallback_ceed = ceed->op_fallback_ceed; 673 return CEED_ERROR_SUCCESS; 674} 675 676/** 677 @brief Set the fallback resource for `CeedOperator`. 678 --- 189 unchanged lines hidden (view full) --- 868 return CEED_ERROR_SUCCESS; 869 } 870 } 871 // LCOV_EXCL_START 872 return CeedError(ceed, CEED_ERROR_MAJOR, "vec was not checked out via CeedGetWorkVector()"); 873 // LCOV_EXCL_STOP 874} 875 |
| 876/** 877 @brief Retrieve list ofadditional JiT source roots from `Ceed` context. 878 879 Note: The caller is responsible for restoring `jit_source_roots` with @ref CeedRestoreJitSourceRoots(). 880 881 @param[in] ceed `Ceed` context 882 @param[out] num_source_roots Number of JiT source directories 883 @param[out] jit_source_roots Absolute paths to additional JiT source directories 884 885 @return An error code: 0 - success, otherwise - failure 886 887 @ref Backend 888**/ 889int CeedGetJitSourceRoots(Ceed ceed, CeedInt *num_source_roots, const char ***jit_source_roots) { 890 Ceed ceed_parent; 891 892 CeedCall(CeedGetParent(ceed, &ceed_parent)); 893 *num_source_roots = ceed_parent->num_jit_source_roots; 894 *jit_source_roots = (const char **)ceed_parent->jit_source_roots; 895 return CEED_ERROR_SUCCESS; 896} 897 898/** 899 @brief Restore list of additional JiT source roots from with @ref CeedGetJitSourceRoots() 900 901 @param[in] ceed `Ceed` context 902 @param[out] jit_source_roots Absolute paths to additional JiT source directories 903 904 @return An error code: 0 - success, otherwise - failure 905 906 @ref Backend 907**/ 908int CeedRestoreJitSourceRoots(Ceed ceed, const char ***jit_source_roots) { 909 *jit_source_roots = NULL; 910 return CEED_ERROR_SUCCESS; 911} 912 |
|
| 866/// @} 867 868/// ---------------------------------------------------------------------------- 869/// Ceed Public API 870/// ---------------------------------------------------------------------------- 871/// @addtogroup CeedUser 872/// @{ 873 --- 660 unchanged lines hidden --- | 913/// @} 914 915/// ---------------------------------------------------------------------------- 916/// Ceed Public API 917/// ---------------------------------------------------------------------------- 918/// @addtogroup CeedUser 919/// @{ 920 --- 660 unchanged lines hidden --- |