mirror of
				https://github.com/NVIDIA/cuda-samples.git
				synced 2025-11-04 07:27:49 +08:00 
			
		
		
		
	Clean implementation for failure path when cuInit fails. Removed CHECKED_CALL macro which returned prematurely
This commit is contained in:
		
							parent
							
								
									f8aab0053f
								
							
						
					
					
						commit
						527b29dbd0
					
				@ -324,14 +324,6 @@ static CUresult LOAD_LIBRARY(CUDADRIVER *pInstance)
 | 
				
			|||||||
#error unsupported platform
 | 
					#error unsupported platform
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define CHECKED_CALL(call)            \
 | 
					 | 
				
			||||||
    do {                              \
 | 
					 | 
				
			||||||
        CUresult result = (call);     \
 | 
					 | 
				
			||||||
        if (CUDA_SUCCESS != result) { \
 | 
					 | 
				
			||||||
            return result;            \
 | 
					 | 
				
			||||||
        }                             \
 | 
					 | 
				
			||||||
    } while (0)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#define GET_PROC_REQUIRED(name) GET_PROC_EX(name, name, 1)
 | 
					#define GET_PROC_REQUIRED(name) GET_PROC_EX(name, name, 1)
 | 
				
			||||||
#define GET_PROC_OPTIONAL(name) GET_PROC_EX(name, name, 0)
 | 
					#define GET_PROC_OPTIONAL(name) GET_PROC_EX(name, name, 0)
 | 
				
			||||||
#define GET_PROC(name)          GET_PROC_REQUIRED(name)
 | 
					#define GET_PROC(name)          GET_PROC_REQUIRED(name)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user