Commit 0f61e4cb authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Added --clang flag to tnl-cuda-arch

parent 26f68fef
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
#include <stdio.h> 
#include <string.h>

int main() {
int main( int argc, char** argv )
{
    int num_devices = 0;
    cudaError_t error_id = cudaGetDeviceCount( &num_devices );

@@ -21,8 +23,15 @@ int main() {

            if( i > 0 )
                printf(" ");

            if( argc == 2 && strcmp( argv[1], "--clang" ) == 0 ) {
                printf( "--cuda-gpu-arch=sm_%d%d",
                        prop.major, prop.minor );
            }
            else {
                printf( "-gencode arch=compute_%d%d,code=sm_%d%d",
                        prop.major, compute_minor, prop.major, prop.minor );
            }
    }
    printf("\n");
}