Skip to content

Commit 072277e

Browse files
authored
Merge pull request #185 from 1e-to/fix_details
Fix utils functions
2 parents 4a509fa + 719154b commit 072277e

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

backends/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ add_library(
7777
source/dppl_sycl_queue_manager.cpp
7878
source/dppl_sycl_usm_interface.cpp
7979
source/dppl_utils.cpp
80-
details/source/dppl_utils_details.cpp
80+
helper/source/dppl_utils_helper.cpp
8181
)
8282

8383
# Install DPPLSyclInterface
8484
target_include_directories(
8585
DPPLSyclInterface
8686
PRIVATE
8787
${CMAKE_SOURCE_DIR}/include/
88-
${CMAKE_SOURCE_DIR}/details/include/
88+
${CMAKE_SOURCE_DIR}/helper/include/
8989
)
9090

9191
if(WIN32)
@@ -125,10 +125,10 @@ foreach(HEADER ${HEADERS})
125125
install(FILES "${HEADER}" DESTINATION include/Support)
126126
endforeach()
127127

128-
# Install all headers in details/include
129-
file(GLOB HEADERS "${CMAKE_SOURCE_DIR}/details/include/*.h*")
128+
# Install all headers in helper/include
129+
file(GLOB HEADERS "${CMAKE_SOURCE_DIR}/helper/include/*.h*")
130130
foreach(HEADER ${HEADERS})
131-
install(FILES "${HEADER}" DESTINATION details/include)
131+
install(FILES "${HEADER}" DESTINATION helper/include)
132132
endforeach()
133133

134134
option(

backends/details/include/dppl_utils_details.h renamed to backends/helper/include/dppl_utils_helper.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@
2727
#include <CL/sycl.hpp>
2828
using namespace cl::sycl;
2929

30-
std::string DDPL_StrToDeviceType(info::device_type devTy);
31-
info::device_type DPPL_DeviceTypeToStr(std::string devTyStr);
30+
std::string DPPL_DeviceTypeToStr(info::device_type devTy);
31+
info::device_type DPPL_StrToDeviceType(std::string devTyStr);

backends/details/source/dppl_utils_details.cpp renamed to backends/helper/source/dppl_utils_helper.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===------ dppl_utils_details.cpp - dpctl-C_API ----*---- C++ -----*-----===//
1+
//===------ dppl_utils_helper.cpp - dpctl-C_API ----*---- C++ -----*-----===//
22
//
33
// Data Parallel Control Library (dpCtl)
44
//
@@ -19,11 +19,11 @@
1919
//===----------------------------------------------------------------------===//
2020
///
2121
/// \file
22-
/// This file implements the helper functions defined in dppl_utils_details.h.
22+
/// This file implements the helper functions defined in dppl_utils_helper.h.
2323
///
2424
//===----------------------------------------------------------------------===//
2525

26-
#include "dppl_utils_details.h"
26+
#include "dppl_utils_helper.h"
2727
#include <string>
2828
#include <sstream>
2929

@@ -32,7 +32,7 @@ using namespace cl::sycl;
3232
/*!
3333
* Transforms enum info::device_type to string.
3434
*/
35-
std::string DDPL_StrToDeviceType(info::device_type devTy)
35+
std::string DPPL_DeviceTypeToStr(info::device_type devTy)
3636
{
3737
std::stringstream ss;
3838
switch (devTy)
@@ -61,7 +61,7 @@ std::string DDPL_StrToDeviceType(info::device_type devTy)
6161
/*!
6262
* Transforms string to enum info::device_type.
6363
*/
64-
info::device_type DPPL_DeviceTypeToStr(std::string devTyStr)
64+
info::device_type DPPL_StrToDeviceType(std::string devTyStr)
6565
{
6666
info::device_type devTy;
6767
if (devTyStr == "cpu") {

backends/source/dppl_sycl_device_interface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include <iostream>
3131
#include <cstring>
3232
#include <CL/sycl.hpp> /* SYCL headers */
33-
#include "../details/include/dppl_utils_details.h"
33+
#include "../helper/include/dppl_utils_helper.h"
3434

3535
using namespace cl::sycl;
3636

@@ -59,7 +59,7 @@ void dump_device_info (const device & Device)
5959
ss << std::setw(4) << " " << std::left << std::setw(16) << "Device type";
6060

6161
auto devTy = Device.get_info<info::device::device_type>();
62-
ss << DDPL_StrToDeviceType(devTy);
62+
ss << DPPL_DeviceTypeToStr(devTy);
6363

6464
std::cout << ss.str();
6565
}

backends/source/dppl_sycl_platform_interface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include <iostream>
3030
#include <set>
3131
#include <sstream>
32-
#include "../details/include/dppl_utils_details.h"
32+
#include "../helper/include/dppl_utils_helper.h"
3333

3434
#include <CL/sycl.hpp>
3535

@@ -125,7 +125,7 @@ void DPPLPlatform_DumpInfo ()
125125
<< "Device type";
126126

127127
auto devTy = devices[dn].get_info<info::device::device_type>();
128-
ss << DDPL_StrToDeviceType(devTy);
128+
ss << DPPL_DeviceTypeToStr(devTy);
129129
}
130130
std::cout << ss.str();
131131
++i;

0 commit comments

Comments
 (0)