/* * Copyright (C) 2017-2018 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "cl_api_tests.h" using namespace OCLRT; typedef api_tests clGetExtensionFunctionAddressTests; namespace ULT { TEST_F(clGetExtensionFunctionAddressTests, unknownExtension) { auto retVal = clGetExtensionFunctionAddress("__some__function__"); EXPECT_EQ(nullptr, retVal); } TEST_F(clGetExtensionFunctionAddressTests, clIcdGetPlatformIDsKHR) { auto retVal = clGetExtensionFunctionAddress("clIcdGetPlatformIDsKHR"); EXPECT_EQ(retVal, reinterpret_cast(clIcdGetPlatformIDsKHR)); } TEST_F(clGetExtensionFunctionAddressTests, clCreateAcceleratorINTEL) { auto retVal = clGetExtensionFunctionAddress("clCreateAcceleratorINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clCreateAcceleratorINTEL)); } TEST_F(clGetExtensionFunctionAddressTests, clGetAcceleratorInfoINTEL) { auto retVal = clGetExtensionFunctionAddress("clGetAcceleratorInfoINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clGetAcceleratorInfoINTEL)); } TEST_F(clGetExtensionFunctionAddressTests, clRetainAcceleratorINTEL) { auto retVal = clGetExtensionFunctionAddress("clRetainAcceleratorINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clRetainAcceleratorINTEL)); } TEST_F(clGetExtensionFunctionAddressTests, clReleaseAcceleratorINTEL) { auto retVal = clGetExtensionFunctionAddress("clReleaseAcceleratorINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clReleaseAcceleratorINTEL)); } TEST_F(clGetExtensionFunctionAddressTests, clCreatePerfCountersCommandQueueINTEL) { auto retVal = clGetExtensionFunctionAddress("clCreatePerfCountersCommandQueueINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clCreatePerfCountersCommandQueueINTEL)); } TEST_F(clGetExtensionFunctionAddressTests, clSetPerformanceConfigurationINTEL) { auto retVal = clGetExtensionFunctionAddress("clSetPerformanceConfigurationINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clSetPerformanceConfigurationINTEL)); } TEST_F(clGetExtensionFunctionAddressTests, givenClCreateBufferWithPropertiesIntelAsInputWhenFunctionIsCalledThenProperPointerIsReturned) { auto functionPointer = clGetExtensionFunctionAddress("clCreateBufferWithPropertiesINTEL"); EXPECT_EQ(functionPointer, reinterpret_cast(clCreateBufferWithPropertiesINTEL)); } } // namespace ULT