File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,14 @@ void PackedRow::get_reason(
7777 tmp_col2.set_and (*this , cols_vals);
7878 for (int i = 0 ; i < size; i++) if (mp[i]) {
7979 int64_t tmp = mp[i];
80- int at = __builtin_ffsll (tmp);
80+ unsigned long at;
81+ #ifdef _MSC_VER
82+ unsigned char ret = _BitScanForward64 (&at, tmp);
83+ at++;
84+ if (!ret) at = 0 ;
85+ #else
86+ at = __builtin_ffsll (tmp);
87+ #endif
8188 int extra = 0 ;
8289 while (at != 0 ) {
8390 uint32_t col = extra + at-1 + i*64 ;
@@ -98,7 +105,13 @@ void PackedRow::get_reason(
98105 break ;
99106
100107 tmp >>= at;
108+ #ifdef _MSC_VER
109+ unsigned char ret = _BitScanForward64 (&at, tmp);
110+ at++;
111+ if (!ret) at = 0 ;
112+ #else
101113 at = __builtin_ffsll (tmp);
114+ #endif
102115 }
103116 }
104117
You can’t perform that action at this time.
0 commit comments