mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-08 09:45:41 +08:00
6adb63b915
date: 2026-06-04T09:49:56 master commit: c0ab3550eca2e9daf197c46b7e4b24aa9637cf2e
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);
|
|
}
|
|
} |