Skip to content

Commit

Permalink
gpu: ocl: fix kernel_ctx int defines to handle long types
Browse files Browse the repository at this point in the history
  • Loading branch information
rjoursler authored and vpirogov committed May 12, 2023
1 parent d058bd8 commit a5ef078
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/gpu/compute/kernel_ctx.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright 2019-2022 Intel Corporation
* Copyright 2019-2023 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -47,8 +47,11 @@ class kernel_ctx_t {
for (auto &opt : option_set_)
oss << " " << opt;

for (auto &int_var : int_var_map_)
for (auto &int_var : int_var_map_) {
oss << " -D" << int_var.first << "=" << int_var.second;
if (int_var.second > INT_MAX || int_var.second < INT_MIN)
oss << "L";
}

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

0 comments on commit a5ef078

Please sign in to comment.