mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 06:40:15 +00:00
ldgm gpu: Move cuda_check_error macro
nvcc had some problems with gcc 12.1 stl map templates when compiling gpu.cu. And since ldgm-session-gpu.h which contained the c++ code was only needed for this one macro, it's probably better to move it to gpu.cuh which is already included by all files that need it.
This commit is contained in:
committed by
Martin Pulec
parent
514c9966a4
commit
efbf0be226
@@ -23,7 +23,6 @@
|
||||
#include <cuda_runtime.h>
|
||||
//#include "timer-util.h"
|
||||
#include "gpu.cuh"
|
||||
#include "ldgm-session-gpu.h"
|
||||
|
||||
struct coding_params {
|
||||
int num_lost;
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
#include <stdio.h>
|
||||
|
||||
// CUDA check error
|
||||
#define cuda_check_error(msg) \
|
||||
{ \
|
||||
cudaError_t err = cudaGetLastError(); \
|
||||
if( cudaSuccess != err) { \
|
||||
fprintf(stderr, "[LDGM GPU] [Error] %s (line %i): %s: %s.\n", \
|
||||
__FILE__, __LINE__, msg, cudaGetErrorString( err) ); \
|
||||
exit(-1); \
|
||||
} \
|
||||
} \
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -21,23 +21,11 @@
|
||||
#define LDGM_SESSION_GPU_INC
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "ldgm-session.h"
|
||||
|
||||
#include <map>
|
||||
#include <queue>
|
||||
|
||||
// CUDA check error
|
||||
#define cuda_check_error(msg) \
|
||||
{ \
|
||||
cudaError_t err = cudaGetLastError(); \
|
||||
if( cudaSuccess != err) { \
|
||||
fprintf(stderr, "[LDGM GPU] [Error] %s (line %i): %s: %s.\n", \
|
||||
__FILE__, __LINE__, msg, cudaGetErrorString( err) ); \
|
||||
exit(-1); \
|
||||
} \
|
||||
} \
|
||||
|
||||
/*
|
||||
* =====================================================================================
|
||||
* Class: LDGM_session_gpu
|
||||
|
||||
Reference in New Issue
Block a user