Extracts version number with major in the upper 16 bits, minor in the lower 16
| 1734 | |
| 1735 | // Extracts version number with major in the upper 16 bits, minor in the lower 16 |
| 1736 | static cl_uint getVersion(const char *versionInfo) |
| 1737 | { |
| 1738 | int highVersion = 0; |
| 1739 | int lowVersion = 0; |
| 1740 | int index = 7; |
| 1741 | while(versionInfo[index] != '.' ) { |
| 1742 | highVersion *= 10; |
| 1743 | highVersion += versionInfo[index]-'0'; |
| 1744 | ++index; |
| 1745 | } |
| 1746 | ++index; |
| 1747 | while(versionInfo[index] != ' ' && versionInfo[index] != '\0') { |
| 1748 | lowVersion *= 10; |
| 1749 | lowVersion += versionInfo[index]-'0'; |
| 1750 | ++index; |
| 1751 | } |
| 1752 | return (highVersion << 16) | lowVersion; |
| 1753 | } |
| 1754 | |
| 1755 | static cl_uint getPlatformVersion(cl_platform_id platform) |
| 1756 | { |
no outgoing calls
no test coverage detected