mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-09-29 04:13:43 +08:00
0b2c431d3a
version: sunnypilot v2026.003.000 (dev)
date: 2026-09-14T15:43:39
master commit: a5f44653d7
19 lines
519 B
Plaintext
19 lines
519 B
Plaintext
#pragma once
|
|
|
|
#include "../ops/ops.cuh"
|
|
#include "club.cuh"
|
|
#include <iostream>
|
|
|
|
#define CHECK_CUDA_ERROR(val) check((val), #val, __FILE__, __LINE__)
|
|
template <typename T>
|
|
void check(T err, char const* const func, char const* const file,
|
|
int const line)
|
|
{
|
|
if (err != cudaSuccess)
|
|
{
|
|
std::cerr << "CUDA Runtime Error at: " << file << ":" << line
|
|
<< std::endl;
|
|
std::cerr << cudaGetErrorString(err) << " " << func << std::endl;
|
|
//std::exit(EXIT_FAILURE);
|
|
}
|
|
} |