MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / getVersion

Function getVersion

include/internal/CL/cl.hpp:1736–1753  ·  view source on GitHub ↗

Extracts version number with major in the upper 16 bits, minor in the lower 16

Source from the content-addressed store, hash-verified

1734
1735// Extracts version number with major in the upper 16 bits, minor in the lower 16
1736static 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
1755static cl_uint getPlatformVersion(cl_platform_id platform)
1756{

Callers 1

getPlatformVersionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected