Skip to content

Commit a5ef078

Browse files
rjourslervpirogov
authored andcommitted
gpu: ocl: fix kernel_ctx int defines to handle long types
1 parent d058bd8 commit a5ef078

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/gpu/compute/kernel_ctx.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2019-2022 Intel Corporation
2+
* Copyright 2019-2023 Intel Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -47,8 +47,11 @@ class kernel_ctx_t {
4747
for (auto &opt : option_set_)
4848
oss << " " << opt;
4949

50-
for (auto &int_var : int_var_map_)
50+
for (auto &int_var : int_var_map_) {
5151
oss << " -D" << int_var.first << "=" << int_var.second;
52+
if (int_var.second > INT_MAX || int_var.second < INT_MIN)
53+
oss << "L";
54+
}
5255

5356
for (auto &float_var : float_var_map_) {
5457
oss << " -D" << float_var.first << "=as_float(0x" << std::hex

0 commit comments

Comments
 (0)