| ceed.c (1856ee7c6e410767ada564c63bec4e302186a699) | ceed.c (c263cd574ee2128da91902fba7d97fdcb037b2f7) |
|---|---|
| 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. --- 511 unchanged lines hidden (view full) --- 520 @param[out] delegate Address to save preferred memory type to 521 522 @return An error code: 0 - success, otherwise - failure 523 524 @ref Basic 525**/ 526int CeedGetPreferredMemType(Ceed ceed, CeedMemType *type) { 527 int ierr; | 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. --- 511 unchanged lines hidden (view full) --- 520 @param[out] delegate Address to save preferred memory type to 521 522 @return An error code: 0 - success, otherwise - failure 523 524 @ref Basic 525**/ 526int CeedGetPreferredMemType(Ceed ceed, CeedMemType *type) { 527 int ierr; |
| 528 |
|
| 528 if (ceed->GetPreferredMemType) { 529 ierr = ceed->GetPreferredMemType(type); CeedChk(ierr); 530 } else { | 529 if (ceed->GetPreferredMemType) { 530 ierr = ceed->GetPreferredMemType(type); CeedChk(ierr); 531 } else { |
| 531 *type = CEED_MEM_HOST; | 532 Ceed delegate; 533 ierr = CeedGetDelegate(ceed, &delegate); CeedChk(ierr); 534 535 if (delegate) { 536 ierr = CeedGetPreferredMemType(delegate, type); CeedChk(ierr); 537 } else { 538 *type = CEED_MEM_HOST; 539 } |
| 532 } 533 534 return 0; 535} 536 537/** 538 @brief Set a backend function 539 --- 105 unchanged lines hidden --- | 540 } 541 542 return 0; 543} 544 545/** 546 @brief Set a backend function 547 --- 105 unchanged lines hidden --- |