mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-03 20:42:09 +08:00
33d5cfc393
date: 2025-12-18T23:23:16 master commit: 3cdee7b54718ee14bd85befd6c5bad3d699c5479
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);
|
|
}
|
|
} |