1 /* 2 * Copyright 2016 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 * 7 */ 8 9 #pragma once 10 11 // 12 // 13 // 14 15 #include <driver_types.h> 16 #include <stdbool.h> 17 18 // 19 // 20 // 21 22 cudaError_t 23 assert_cuda(cudaError_t const code, 24 char const * const file, 25 int const line, 26 bool const abort); 27 28 // 29 // 30 // 31 32 #define cuda(...) assert_cuda((cuda##__VA_ARGS__), __FILE__, __LINE__, true); 33 34 // 35 // 36 // 37