Change maxNBitValue to a constexpr function

Now maxNBitValue can be used with run time variables.

Change-Id: I323071400305e05e6303a33e24e90c521246d73f
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2019-11-27 18:00:52 +01:00
committed by sys_ocldev
parent 0ba31a46cb
commit 0193b3ea69
36 changed files with 66 additions and 63 deletions

View File

@@ -232,7 +232,7 @@ void Event::updateCompletionStamp(uint32_t taskCount, uint32_t tasklevel, FlushS
cl_ulong Event::getDelta(cl_ulong startTime,
cl_ulong endTime) {
cl_ulong Max = (1ULL << OCLRT_NUM_TIMESTAMP_BITS) - 1;
cl_ulong Max = maxNBitValue(OCLRT_NUM_TIMESTAMP_BITS);
cl_ulong Delta = 0;
startTime &= Max;