sharing: add context tests

Change-Id: I1dc504f6931ab0ae5645e9460ae0c0284704404c
This commit is contained in:
Jacek Danecki
2018-04-11 17:30:33 +02:00
committed by sys_ocldev
parent 6b648bca35
commit e43c345e07
6 changed files with 43 additions and 27 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Intel Corporation
* Copyright (c) 2017 - 2018, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -20,7 +20,7 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include "runtime/context/context.h"
#include "runtime/context/context.inl"
#include "runtime/sharings/sharing_factory.h"
#include "runtime/sharings/va/va_sharing_defines.h"
#include "runtime/sharings/va/va_sharing_functions.h"
@@ -28,13 +28,5 @@
namespace OCLRT {
const uint32_t VASharingFunctions::sharingId = SharingType::VA_SHARING;
template <>
VASharingFunctions *Context::getSharing() {
if (VASharingFunctions::sharingId >= sharingFunctions.size()) {
DEBUG_BREAK_IF(VASharingFunctions::sharingId >= sharingFunctions.size());
return nullptr;
}
return reinterpret_cast<VASharingFunctions *>(sharingFunctions[VASharingFunctions::sharingId].get());
}
template VASharingFunctions *Context::getSharing<VASharingFunctions>();
}