Skip to content

Commit 05d6bfd

Browse files
Removed DPCTLKernel_GetFunctionName
1 parent 25bcc03 commit 05d6bfd

File tree

3 files changed

+0
-56
lines changed

3 files changed

+0
-56
lines changed

libsyclinterface/include/dpctl_sycl_kernel_interface.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,6 @@ DPCTL_C_EXTERN_C_BEGIN
3838
* @defgroup KernelInterface Kernel class C wrapper
3939
*/
4040

41-
/*!
42-
* @brief Returns a C string for the kernel name.
43-
*
44-
* @param KRef DPCTLSyclKernelRef pointer to an OpenCL
45-
* interoperability kernel.
46-
* @return If a kernel name exists then returns it as a C string, else
47-
* returns a nullptr.
48-
* @ingroup KernelInterface
49-
*/
50-
DPCTL_API
51-
__dpctl_give const char *
52-
DPCTLKernel_GetFunctionName(__dpctl_keep const DPCTLSyclKernelRef KRef);
53-
5441
/*!
5542
* @brief Returns the number of arguments for the OpenCL kernel.
5643
*

libsyclinterface/source/dpctl_sycl_kernel_interface.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,6 @@ DEFINE_SIMPLE_CONVERSION_FUNCTIONS(kernel, DPCTLSyclKernelRef)
3939

4040
} /* end of anonymous namespace */
4141

42-
__dpctl_give const char *
43-
DPCTLKernel_GetFunctionName(__dpctl_keep const DPCTLSyclKernelRef Kernel)
44-
{
45-
if (!Kernel) {
46-
error_handler("Cannot get the number of arguments "
47-
"as input is a nullptr.",
48-
__FILE__, __func__, __LINE__);
49-
return nullptr;
50-
}
51-
52-
auto SyclKernel = unwrap(Kernel);
53-
auto kernel_name = SyclKernel->get_info<info::kernel::function_name>();
54-
if (kernel_name.empty())
55-
return nullptr;
56-
return dpctl::helper::cstring_from_string(kernel_name);
57-
}
58-
5942
size_t DPCTLKernel_GetNumArgs(__dpctl_keep const DPCTLSyclKernelRef Kernel)
6043
{
6144
if (!Kernel) {

libsyclinterface/tests/test_sycl_kernel_interface.cpp

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -81,31 +81,6 @@ struct TestDPCTLSyclKernelInterface
8181
};
8282
} // namespace
8383

84-
TEST_P(TestDPCTLSyclKernelInterface, CheckGetFunctionName)
85-
{
86-
auto QueueRef = DPCTLQueue_CreateForDevice(DRef, nullptr, 0);
87-
auto CtxRef = DPCTLQueue_GetContext(QueueRef);
88-
auto PRef =
89-
DPCTLProgram_CreateFromOCLSource(CtxRef, CLProgramStr, CompileOpts);
90-
auto AddKernel = DPCTLProgram_GetKernel(PRef, "add");
91-
auto AxpyKernel = DPCTLProgram_GetKernel(PRef, "axpy");
92-
93-
auto fnName1 = DPCTLKernel_GetFunctionName(AddKernel);
94-
auto fnName2 = DPCTLKernel_GetFunctionName(AxpyKernel);
95-
96-
ASSERT_STREQ("add", fnName1);
97-
ASSERT_STREQ("axpy", fnName2);
98-
99-
DPCTLCString_Delete(fnName1);
100-
DPCTLCString_Delete(fnName2);
101-
102-
DPCTLQueue_Delete(QueueRef);
103-
DPCTLContext_Delete(CtxRef);
104-
DPCTLProgram_Delete(PRef);
105-
DPCTLKernel_Delete(AddKernel);
106-
DPCTLKernel_Delete(AxpyKernel);
107-
}
108-
10984
TEST_P(TestDPCTLSyclKernelInterface, CheckGetNumArgs)
11085
{
11186
auto QueueRef = DPCTLQueue_CreateForDevice(DRef, nullptr, 0);
@@ -130,7 +105,6 @@ TEST_P(TestDPCTLSyclKernelInterface, CheckNullPtrArg)
130105
DPCTLSyclKernelRef AddKernel = nullptr;
131106

132107
ASSERT_EQ(DPCTLKernel_GetNumArgs(AddKernel), -1);
133-
ASSERT_EQ(DPCTLKernel_GetFunctionName(AddKernel), nullptr);
134108
}
135109

136110
INSTANTIATE_TEST_SUITE_P(TestKernelInterfaceFunctions,

0 commit comments

Comments
 (0)