mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00

Appened ocloc interface with new 'query' feature. Using this feature now one can extract HEAD hash and version of neo. Signed-off-by: Bushev, Dmitry <dmitry.bushev@intel.com>
42 lines
520 B
C++
42 lines
520 B
C++
/*
|
|
* Copyright (C) 2021 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "driver_version.h"
|
|
|
|
#include <string>
|
|
|
|
#ifdef QTR
|
|
#undef QTR
|
|
#endif
|
|
|
|
#ifdef TOSTR
|
|
#undef TOSTR
|
|
#endif
|
|
|
|
#define QTR(a) #a
|
|
#define TOSTR(b) QTR(b)
|
|
|
|
namespace NEO {
|
|
|
|
std::string getRevision() {
|
|
#ifdef NEO_REVISION
|
|
return NEO_REVISION;
|
|
#else
|
|
return "";
|
|
#endif
|
|
}
|
|
|
|
std::string getOclDriverVersion() {
|
|
#ifdef NEO_OCL_DRIVER_VERSION
|
|
return TOSTR(NEO_OCL_DRIVER_VERSION);
|
|
#else
|
|
return "";
|
|
#endif
|
|
}
|
|
|
|
} // namespace NEO
|