Skip to content

Commit 34d953c

Browse files
authored
FPGA: Qualify fabs in the board_test sample (#2393)
This changes follows up the removal of cmath from the sycl.hpp header - which now requires to be added manually for designs that require it. In addition, fabs lives in both std:: and sycl:: and should therefore be qualified to remove the ambiguity.
1 parent 4d1c8ca commit 34d953c

File tree

1 file changed

+2
-1
lines changed
  • DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/board_test/src

1 file changed

+2
-1
lines changed

DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/board_test/src/board_test.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include <sycl/sycl.hpp>
2+
#include <cmath>
23
#include <vector>
34

45
#include "host_speed.hpp"
@@ -775,7 +776,7 @@ int ShimMetrics::KernelClkFreq(sycl::queue &q, bool report_chk) {
775776
<< board_info_.quartus_fmax_ << " MHz \n\n";
776777
// Check that hardware frequency is within 2% of Quartus compiled
777778
// frequency, terminate test if its not
778-
float PercentError = (fabs(board_info_.quartus_fmax_ - kernel_freq_) /
779+
float PercentError = (std::fabs(board_info_.quartus_fmax_ - kernel_freq_) /
779780
(board_info_.quartus_fmax_)) *
780781
100;
781782
if (PercentError < 2)

0 commit comments

Comments
 (0)