Intel® oneAPI Data Parallel C++
Support for Intel® oneAPI DPC++ Compiler, Intel® oneAPI DPC++ Library, Intel ICX Compiler , Intel® DPC++ Compatibility Tool, and GDB*
584 Discussions

isfinite() call is ambiguous on Windows DPC++

AJIOB
Novice
978 Views

Hello

 

I'm using Intel oneAPI 2022.1.3 (w_BaseKit_p_2022.1.3.210_offline) with VisualStudio 2022 17.0.7 LTS on Windows 10 21H1 Pro x64 English.

 

I generated vector-add sample & it compiles successfully.

 

I added that 2 rows for getting finite detection on constant vector in file vector-add-buffers.cpp:

vec<float, 3> test_finite(0.1f, 0.2f, 0.3f);
auto is_finite_vec = isfinite(test_finite);

That code was added in h.parallel_for section (lines 85-88 in file vector-add-buffers.cpp).

Nothing else was changed.

 

But in compiling time I received an error: call to 'isfinite' is ambiguous

 

Example project & full logs were attached (from VisualStudio command-line & from usual Windows CMD).

 

How can I fix that?

 

With regards,
Alex

 

P.S. Linux DPC++ compiler (Ubuntu 20.04) works correctly & successfully compiled that code. Compiler's version:

$ dpcpp --version
Intel(R) oneAPI DPC++/C++ Compiler 2022.0.0 (2022.0.0.20211123)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/intel/oneapi/compiler/2022.0.2/linux/bin-llvm

 

0 Kudos
1 Solution
NoorjahanSk_Intel
Moderator
896 Views

Hi,

 

Thanks for reaching out to us.

 

 

Could you please try changing the line 

 

vec<int, 3> is_finite_vec = isfinite(test_finite);

 

to

 

vec<int, 3> is_finite_vec = sycl::isfinite(test_finite);

 

so that isfinite will de defined from sycl scope.

 

Hope the provided information helps in resolving your issue.

 

 

Thanks & Regards,

Noorjahan.

 

View solution in original post

0 Kudos
2 Replies
NoorjahanSk_Intel
Moderator
897 Views

Hi,

 

Thanks for reaching out to us.

 

 

Could you please try changing the line 

 

vec<int, 3> is_finite_vec = isfinite(test_finite);

 

to

 

vec<int, 3> is_finite_vec = sycl::isfinite(test_finite);

 

so that isfinite will de defined from sycl scope.

 

Hope the provided information helps in resolving your issue.

 

 

Thanks & Regards,

Noorjahan.

 

0 Kudos
NoorjahanSk_Intel
Moderator
840 Views

Hi,


Thank you for accepting our solution

As this issue has been resolved, we will no longer respond to this thread. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.



Thanks & Regards,

Noorjahan


0 Kudos
Reply