Test fix - Test computeinfo should know each existing OCL version (#366)

This commit is contained in:
Grzegorz Wawiorko
2019-07-08 17:39:22 +02:00
committed by Kévin Petit
parent c45d5b6a20
commit 00d0b0ddd7

View File

@@ -605,6 +605,10 @@ int parseVersion( char const * str, version_t * version )
version->major = 1;
version->minor = 2;
rc = 0;
} else if ( strncmp( str, "OpenCL 1.0", 10 ) == 0 && ( str[ 10 ] == 0 || str[ 10 ] == ' ' ) ) {
version->major = 1;
version->minor = 0;
rc = 0;
} else if ( strncmp( str, "OpenCL 1.1", 10 ) == 0 && ( str[ 10 ] == 0 || str[ 10 ] == ' ' ) ) {
version->major = 1;
version->minor = 1;
@@ -617,6 +621,10 @@ int parseVersion( char const * str, version_t * version )
version->major = 2;
version->minor = 1;
rc = 0;
} else if ( strncmp( str, "OpenCL 2.2", 10 ) == 0 && ( str[ 10 ] == 0 || str[ 10 ] == ' ' ) ) {
version->major = 2;
version->minor = 2;
rc = 0;
} else {
log_error( "ERROR: Unexpected version string: `%s'.\n", str );
};