Skip to content

Commit

Permalink
[SYCLomatic] Refine vector types migration (#305)
Browse files Browse the repository at this point in the history
uchar1 => uint8_t
ushort1 => uint16_t
uint1 => uint32_t
ulong1=> uint64_t
ulonglong1 => uint64_t
longlong1 => int64_t
Similar to make_xx1 functions.

Signed-off-by: Tang, Jiajun [email protected]
  • Loading branch information
tangjj11 authored Oct 21, 2022
1 parent c093888 commit a969b47
Show file tree
Hide file tree
Showing 5 changed files with 354 additions and 354 deletions.
12 changes: 6 additions & 6 deletions clang/lib/DPCT/APINamesMath.inc
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ ENTRY_RENAMED("make_char1", "char")
ENTRY_RENAMED("make_char2", MapNames::getClNamespace(false, false) + "char2")
ENTRY_RENAMED("make_char3", MapNames::getClNamespace(false, false) + "char3")
ENTRY_RENAMED("make_char4", MapNames::getClNamespace(false, false) + "char4")
ENTRY_RENAMED("make_uchar1", "unsigned char")
ENTRY_RENAMED("make_uchar1", "uint8_t")
ENTRY_RENAMED("make_uchar2", MapNames::getClNamespace(false, false) + "uchar2")
ENTRY_RENAMED("make_uchar3", MapNames::getClNamespace(false, false) + "uchar3")
ENTRY_RENAMED("make_uchar4", MapNames::getClNamespace(false, false) + "uchar4")
Expand All @@ -615,7 +615,7 @@ ENTRY_RENAMED("make_short1", "short")
ENTRY_RENAMED("make_short2", MapNames::getClNamespace(false, false) + "short2")
ENTRY_RENAMED("make_short3", MapNames::getClNamespace(false, false) + "short3")
ENTRY_RENAMED("make_short4", MapNames::getClNamespace(false, false) + "short4")
ENTRY_RENAMED("make_ushort1", "unsigned short")
ENTRY_RENAMED("make_ushort1", "uint16_t")
ENTRY_RENAMED("make_ushort2", MapNames::getClNamespace(false, false) + "ushort2")
ENTRY_RENAMED("make_ushort3", MapNames::getClNamespace(false, false) + "ushort3")
ENTRY_RENAMED("make_ushort4", MapNames::getClNamespace(false, false) + "ushort4")
Expand All @@ -624,7 +624,7 @@ ENTRY_RENAMED("make_int1", "int")
ENTRY_RENAMED("make_int2", MapNames::getClNamespace(false, false) + "int2")
ENTRY_RENAMED("make_int3", MapNames::getClNamespace(false, false) + "int3")
ENTRY_RENAMED("make_int4", MapNames::getClNamespace(false, false) + "int4")
ENTRY_RENAMED("make_uint1", "unsigned int")
ENTRY_RENAMED("make_uint1", "uint32_t")
ENTRY_RENAMED("make_uint2", MapNames::getClNamespace(false, false) + "uint2")
ENTRY_RENAMED("make_uint3", MapNames::getClNamespace(false, false) + "uint3")
ENTRY_RENAMED("make_uint4", MapNames::getClNamespace(false, false) + "uint4")
Expand All @@ -633,16 +633,16 @@ ENTRY_RENAMED("make_long1", "long")
ENTRY_RENAMED("make_long2", MapNames::getClNamespace(false, false) + "long2")
ENTRY_RENAMED("make_long3", MapNames::getClNamespace(false, false) + "long3")
ENTRY_RENAMED("make_long4", MapNames::getClNamespace(false, false) + "long4")
ENTRY_RENAMED("make_ulong1", "unsigned long")
ENTRY_RENAMED("make_ulong1", "uint64_t")
ENTRY_RENAMED("make_ulong2", MapNames::getClNamespace(false, false) + "ulong2")
ENTRY_RENAMED("make_ulong3", MapNames::getClNamespace(false, false) + "ulong3")
ENTRY_RENAMED("make_ulong4", MapNames::getClNamespace(false, false) + "ulong4")

ENTRY_RENAMED("make_longlong1", "long long")
ENTRY_RENAMED("make_longlong1", "int64_t")
ENTRY_RENAMED("make_longlong2", MapNames::getClNamespace(false, false) + "longlong2")
ENTRY_RENAMED("make_longlong3", MapNames::getClNamespace(false, false) + "longlong3")
ENTRY_RENAMED("make_longlong4", MapNames::getClNamespace(false, false) + "longlong4")
ENTRY_RENAMED("make_ulonglong1", "unsigned long long")
ENTRY_RENAMED("make_ulonglong1", "uint64_t")
ENTRY_RENAMED("make_ulonglong2", MapNames::getClNamespace(false, false) + "ulonglong2")
ENTRY_RENAMED("make_ulonglong3", MapNames::getClNamespace(false, false) + "ulonglong3")
ENTRY_RENAMED("make_ulonglong4", MapNames::getClNamespace(false, false) + "ulonglong4")
Expand Down
12 changes: 6 additions & 6 deletions clang/lib/DPCT/MapNames.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void MapNames::setExplicitNamespaceMap() {
{"long2", std::make_shared<TypeNameRule>(getClNamespace() + "long2")},
{"long3", std::make_shared<TypeNameRule>(getClNamespace() + "long3")},
{"long4", std::make_shared<TypeNameRule>(getClNamespace() + "long4")},
{"longlong1", std::make_shared<TypeNameRule>("long long")},
{"longlong1", std::make_shared<TypeNameRule>("int64_t")},
{"longlong2",
std::make_shared<TypeNameRule>(getClNamespace() + "longlong2")},
{"longlong3",
Expand All @@ -158,26 +158,26 @@ void MapNames::setExplicitNamespaceMap() {
{"short2", std::make_shared<TypeNameRule>(getClNamespace() + "short2")},
{"short3", std::make_shared<TypeNameRule>(getClNamespace() + "short3")},
{"short4", std::make_shared<TypeNameRule>(getClNamespace() + "short4")},
{"uchar1", std::make_shared<TypeNameRule>("unsigned char")},
{"uchar1", std::make_shared<TypeNameRule>("uint8_t")},
{"uchar2", std::make_shared<TypeNameRule>(getClNamespace() + "uchar2")},
{"uchar3", std::make_shared<TypeNameRule>(getClNamespace() + "uchar3")},
{"uchar4", std::make_shared<TypeNameRule>(getClNamespace() + "uchar4")},
{"uint1", std::make_shared<TypeNameRule>("unsigned int")},
{"uint1", std::make_shared<TypeNameRule>("uint32_t")},
{"uint2", std::make_shared<TypeNameRule>(getClNamespace() + "uint2")},
{"uint3", std::make_shared<TypeNameRule>(getClNamespace() + "uint3")},
{"uint4", std::make_shared<TypeNameRule>(getClNamespace() + "uint4")},
{"ulong1", std::make_shared<TypeNameRule>("unsigned long")},
{"ulong1", std::make_shared<TypeNameRule>("uint64_t")},
{"ulong2", std::make_shared<TypeNameRule>(getClNamespace() + "ulong2")},
{"ulong3", std::make_shared<TypeNameRule>(getClNamespace() + "ulong3")},
{"ulong4", std::make_shared<TypeNameRule>(getClNamespace() + "ulong4")},
{"ulonglong1", std::make_shared<TypeNameRule>("unsigned long long")},
{"ulonglong1", std::make_shared<TypeNameRule>("uint64_t")},
{"ulonglong2",
std::make_shared<TypeNameRule>(getClNamespace() + "ulonglong2")},
{"ulonglong3",
std::make_shared<TypeNameRule>(getClNamespace() + "ulonglong3")},
{"ulonglong4",
std::make_shared<TypeNameRule>(getClNamespace() + "ulonglong4")},
{"ushort1", std::make_shared<TypeNameRule>("unsigned short")},
{"ushort1", std::make_shared<TypeNameRule>("uint16_t")},
{"ushort2", std::make_shared<TypeNameRule>(getClNamespace() + "ushort2")},
{"ushort3", std::make_shared<TypeNameRule>(getClNamespace() + "ushort3")},
{"ushort4", std::make_shared<TypeNameRule>(getClNamespace() + "ushort4")},
Expand Down
Loading

0 comments on commit a969b47

Please sign in to comment.