Skip to content

Commit c7c4130

Browse files
authored
[SYCL] Make internal function to be static in imf rounding utils (#15548)
The internal util functions "get_grs_bits" used by rounding mode related functions for both fp32 and fp64 should be marked as static, otherwise linker will report multiple definition error when developers use fp32 and fp64 intel math function in the same compiling unit. Signed-off-by: jinge90 <[email protected]>
1 parent 6e095fd commit c7c4130

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libdevice/imf_rounding_op.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ template <typename Ty> Ty __fp_div(Ty x, Ty y, int rd) {
860860
}
861861
}
862862

863-
unsigned get_grs_bits(uint64_t dbits, unsigned bit_num) {
863+
static unsigned get_grs_bits(uint64_t dbits, unsigned bit_num) {
864864
if (bit_num == 1)
865865
return (dbits & 0x1) << 2;
866866
else if (bit_num == 2)
@@ -873,7 +873,7 @@ unsigned get_grs_bits(uint64_t dbits, unsigned bit_num) {
873873
}
874874
}
875875

876-
unsigned get_grs_bits(__iml_ui128 dbits, unsigned bit_num) {
876+
static unsigned get_grs_bits(__iml_ui128 dbits, unsigned bit_num) {
877877
if (bit_num == 1)
878878
return static_cast<uint32_t>(dbits & 0x1) << 2;
879879
else if (bit_num == 2)

0 commit comments

Comments
 (0)