|
||||
File indexing completed on 2025-01-18 09:12:16
0001 // This file is part of the ACTS project. 0002 // 0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project 0004 // 0005 // This Source Code Form is subject to the terms of the Mozilla Public 0006 // License, v. 2.0. If a copy of the MPL was not distributed with this 0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/. 0008 0009 #pragma once 0010 0011 /// Helper macro used in the CUDA plugin for checking @c cudaError_t type return 0012 /// values. 0013 #define ACTS_CUDA_ERROR_CHECK(EXP) \ 0014 do { \ 0015 cudaError_t errorCode = EXP; \ 0016 if (errorCode != cudaSuccess) { \ 0017 Acts::Cuda::Details::throwError(errorCode, #EXP, __FILE__, __LINE__); \ 0018 } \ 0019 } while (false) 0020 0021 namespace Acts { 0022 namespace Cuda { 0023 namespace Details { 0024 0025 /// Function used to print and throw a user-readable error if something breaks 0026 void throwError(cudaError_t errorCode, const char* expression, const char* file, 0027 int line); 0028 0029 } // namespace Details 0030 } // namespace Cuda 0031 } // namespace Acts
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |