Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*

Bug in usm_allocator.hpp max

s1232
Beginner
1,045 Views

 

Hi Intel Support,

In the DPC++ release 2022.2.1, there is a bug.

I believe this should be using std::max instead (https://en.cppreference.com/w/cpp/algorithm/max).

In file included from /opt/intel/oneapi/compiler/2022.2.1/linux/bin-llvm/../include/sycl/CL/sycl/usm.hpp:11:
/opt/intel/oneapi/compiler/2022.2.1/linux/bin-llvm/../include/sycl/CL/sycl/usm/usm_allocator.hpp:119:50: error: use of undeclared identifier 'max'; did you mean 'fmax'?
  constexpr size_t getAlignment() const { return max(alignof(T), Alignment); }
                                                 ^
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:329:14: note: 'fmax' declared here
__MATHCALLX (fmax,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
             ^

Can you please fix this?

Thank you.

S

 

0 Kudos
3 Replies
SeshaP_Intel
Moderator
1,016 Views

Hi,


Thank you for posting in Intel Communities.

Could you please share the sample reproducer code and steps to reproduce so that we can investigate the issue more from our end?


Thanks and Regards,

Pendyala Sesha Srinivas


0 Kudos
SeshaP_Intel
Moderator
977 Views

Hi,


We haven't heard back from you. Could you please provide an update on your issue?


Thanks and Regards,

Pendyala Sesha Srinivas


0 Kudos
SeshaP_Intel
Moderator
943 Views

Hi,


We have not heard back from you. This thread will no longer be monitored by Intel. If you need further assistance, please post a new question. 


Thanks and Regards,

Pendyala Sesha Srinivas


0 Kudos
Reply