| ceed-elemrestriction.c (0036de2c0ad807bd8ab213cac28d33186520da16) | ceed-elemrestriction.c (523b8ea09bebe65e72854bf0f9327b4f4d8bccdb) |
|---|---|
| 1// Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at 2// the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights 3// reserved. See files LICENSE and NOTICE for details. 4// 5// This file is part of CEED, a collection of benchmarks, miniapps, software 6// libraries and APIs for efficient high-order finite element and spectral 7// element discretizations for exascale applications. For more information and 8// source code availability see http://github.com/ceed. --- 648 unchanged lines hidden (view full) --- 657 // LCOV_EXCL_STOP 658 659 for (int i = 0; i<3; i++) 660 (*strides)[i] = rstr->strides[i]; 661 return 0; 662} 663 664/** | 1// Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at 2// the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights 3// reserved. See files LICENSE and NOTICE for details. 4// 5// This file is part of CEED, a collection of benchmarks, miniapps, software 6// libraries and APIs for efficient high-order finite element and spectral 7// element discretizations for exascale applications. For more information and 8// source code availability see http://github.com/ceed. --- 648 unchanged lines hidden (view full) --- 657 // LCOV_EXCL_STOP 658 659 for (int i = 0; i<3; i++) 660 (*strides)[i] = rstr->strides[i]; 661 return 0; 662} 663 664/** |
| 665 @brief Get the backend stride status of a CeedElemRestriction 666 667 @param rstr CeedElemRestriction 668 @param[out] bool Variable to store stride status 669 670 @return An error code: 0 - success, otherwise - failure 671 672 @ref Advanced 673**/ 674int CeedElemRestrictionGetBackendStridesStatus(CeedElemRestriction rstr, 675 bool *status) { 676 if (!rstr->strides) 677 // LCOV_EXCL_START 678 return CeedError(rstr->ceed, 1, "ElemRestriction has no stride data"); 679 // LCOV_EXCL_STOP 680 681 *status = ((rstr->strides[0] == CEED_STRIDES_BACKEND[0]) && 682 (rstr->strides[1] == CEED_STRIDES_BACKEND[1]) && 683 (rstr->strides[2] == CEED_STRIDES_BACKEND[2])); 684 return 0; 685} 686 687/** |
|
| 665 @brief Get the backend data of a CeedElemRestriction 666 667 @param rstr CeedElemRestriction 668 @param[out] data Variable to store data 669 670 @return An error code: 0 - success, otherwise - failure 671 672 @ref Advanced --- 60 unchanged lines hidden (view full) --- 733 ierr = (*rstr)->Destroy(*rstr); CeedChk(ierr); 734 } 735 ierr = CeedFree(&(*rstr)->strides); CeedChk(ierr); 736 ierr = CeedDestroy(&(*rstr)->ceed); CeedChk(ierr); 737 ierr = CeedFree(rstr); CeedChk(ierr); 738 return 0; 739} 740 | 688 @brief Get the backend data of a CeedElemRestriction 689 690 @param rstr CeedElemRestriction 691 @param[out] data Variable to store data 692 693 @return An error code: 0 - success, otherwise - failure 694 695 @ref Advanced --- 60 unchanged lines hidden (view full) --- 756 ierr = (*rstr)->Destroy(*rstr); CeedChk(ierr); 757 } 758 ierr = CeedFree(&(*rstr)->strides); CeedChk(ierr); 759 ierr = CeedDestroy(&(*rstr)->ceed); CeedChk(ierr); 760 ierr = CeedFree(rstr); CeedChk(ierr); 761 return 0; 762} 763 |
| 764/// @cond DOXYGEN_SKIP 765// Indicate that the stride is determined by the backend 766CeedInt CEED_STRIDES_BACKEND[3] = {}; 767/// @endcond 768 |
|
| 741/// @} | 769/// @} |