Skip to content

Commit 9d9b117

Browse files
Enhance processing Queue properties
Change-Id: I53ab00bdbfb6b11a7d9fdcaec816eead625ae737 Signed-off-by: Filip Hazubski <[email protected]>
1 parent ac56465 commit 9d9b117

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

runtime/api/api.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2017-2018 Intel Corporation
2+
* Copyright (C) 2017-2019 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -3867,7 +3867,7 @@ cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties(cl_context conte
38673867
tokenValue != CL_QUEUE_SIZE &&
38683868
tokenValue != CL_QUEUE_PRIORITY_KHR &&
38693869
tokenValue != CL_QUEUE_THROTTLE_KHR &&
3870-
!processExtraTokens(pDevice, propertiesAddress)) {
3870+
!processExtraTokens(pDevice, *pContext, propertiesAddress)) {
38713871
err.set(CL_INVALID_VALUE);
38723872
return commandQueue;
38733873
}

runtime/helpers/queue_helpers.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2018 Intel Corporation
2+
* Copyright (C) 2018-2019 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -8,7 +8,7 @@
88
#include "runtime/helpers/queue_helpers.h"
99

1010
namespace OCLRT {
11-
bool processExtraTokens(Device *&device, const cl_queue_properties *property) {
11+
bool processExtraTokens(Device *&device, Context &context, const cl_queue_properties *property) {
1212
return false;
1313
}
1414

runtime/helpers/queue_helpers.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2017-2018 Intel Corporation
2+
* Copyright (C) 2017-2019 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -102,5 +102,5 @@ returnType getCmdQueueProperties(const cl_queue_properties *properties,
102102
}
103103
return retVal;
104104
}
105-
bool processExtraTokens(Device *&device, const cl_queue_properties *property);
105+
bool processExtraTokens(Device *&device, Context &context, const cl_queue_properties *property);
106106
} // namespace OCLRT

unit_tests/mocks/mock_context.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2017-2018 Intel Corporation
2+
* Copyright (C) 2017-2019 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -73,6 +73,10 @@ void MockContext::setSharingFunctions(SharingFunctions *sharingFunctions) {
7373
this->sharingFunctions[sharingFunctions->getId()].reset(sharingFunctions);
7474
}
7575

76+
void MockContext::setContextType(ContextType contextType) {
77+
this->contextType = contextType;
78+
}
79+
7680
void MockContext::releaseSharingFunctions(SharingType sharing) {
7781
this->sharingFunctions[sharing].release();
7882
}

unit_tests/mocks/mock_context.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2017-2018 Intel Corporation
2+
* Copyright (C) 2017-2019 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -28,6 +28,7 @@ class MockContext : public Context {
2828

2929
void clearSharingFunctions();
3030
void setSharingFunctions(SharingFunctions *sharingFunctions);
31+
void setContextType(ContextType contextType);
3132
void releaseSharingFunctions(SharingType sharing);
3233
void registerSharingWithId(SharingFunctions *sharing, SharingType sharingId);
3334

0 commit comments

Comments
 (0)