Skip to content

Commit 1edcd44

Browse files
author
xuanxuqaq
committed
优化openclAccelerator
1 parent c2cd955 commit 1edcd44

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

C++/openclAccelerator/src/dllmain.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ void start_kernel(const std::vector<std::string>& search_case,
990990
Memory<bool> dev_is_ignore_case(current_device, 1);
991991
dev_is_ignore_case[0] = is_ignore_case;
992992
dev_is_ignore_case.write_to_device();
993-
vector<void*> events_vec;
993+
vector<cl::Event*> events_vec;
994994

995995
void CL_CALLBACK match_callback(cl_event, cl_int, void* user_data);
996996
for (auto& [_, cache] : cache_map)
@@ -1054,7 +1054,7 @@ void start_kernel(const std::vector<std::string>& search_case,
10541054
{
10551055
cache->is_match_done = true;
10561056
}
1057-
for (auto&& each_ptr : events_vec)
1057+
for (cl::Event* each_ptr : events_vec)
10581058
{
10591059
delete each_ptr;
10601060
}
@@ -1075,7 +1075,7 @@ std::string n2hexstr(I w, size_t hex_len = sizeof(I) << 1)
10751075
static const char* digits = "0123456789ABCDEF";
10761076
std::string rc(hex_len, '0');
10771077
for (size_t i = 0, j = (hex_len - 1) * 4; i < hex_len; ++i, j -= 4)
1078-
rc[i] = digits[(w >> j) & 0x0f];
1078+
rc[i] = digits[w >> j & 0x0f];
10791079
return rc;
10801080
}
10811081

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)