Skip to content
Snippets Groups Projects
Commit eae93157 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Made tnl-cuda-arch more robust

(I've actually encountered such error...)
parent 68fea0ec
No related branches found
No related tags found
No related merge requests found
#include <stdio.h>
int main() {
int num_devices;
cudaGetDeviceCount( &num_devices );
int num_devices = 0;
cudaError_t error_id = cudaGetDeviceCount( &num_devices );
if( error_id != cudaSuccess ) {
fprintf(stderr, "cudaGetDeviceCount returned error %d (%s)\n",
(int) error_id, cudaGetErrorString(error_id));
exit(EXIT_FAILURE);
}
for( int i = 0; i < num_devices; i++ ) {
cudaDeviceProp prop;
cudaGetDeviceProperties( &prop, i );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment