Anybody know of a BitScanReverse intrinsic in C# Net 6.0?
Moderator: Ras
-
- Posts: 313
- Joined: Tue Aug 03, 2021 2:41 pm
- Full name: Bill Beame
Anybody know of a BitScanReverse intrinsic in C# Net 6.0?
I see why C++ is preferred over C#, but, I don't have time for C++ right now.
-
- Posts: 1062
- Joined: Tue Apr 28, 2020 10:03 pm
- Full name: Daniel Infuehr
Re: Anybody know of a BitScanReverse intrinsic in C# Net 6.0?
Why open a second thread?
You already said you could make it work?
C# .net 6/5 .net core 3.1/2.1/2 and .net framework 4.8/4.7/4.6/4/3.8/3.6/3.5 literally all have access to instrinsics.
The newer ones even natively.
Its still this one Chessnut:
ulong result = System.Runtime.Intrinsics.X86.Bmi1.X64.TrailingZeroCount(value);
You already said you could make it work?
C# .net 6/5 .net core 3.1/2.1/2 and .net framework 4.8/4.7/4.6/4/3.8/3.6/3.5 literally all have access to instrinsics.
The newer ones even natively.
Its still this one Chessnut:
ulong result = System.Runtime.Intrinsics.X86.Bmi1.X64.TrailingZeroCount(value);
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
Daniel Inführ - Software Developer
-
- Posts: 313
- Joined: Tue Aug 03, 2021 2:41 pm
- Full name: Bill Beame
Re: Anybody know of a BitScanReverse intrinsic in C# Net 6.0?
TrailingZeroCount is working for my North vectors. Now I need the south vectors and the opposite of TrailingZeroCount. I can't seem to find an equivalent to BitScanReverse like in C++ and the MS docs didn't list a method under Bmi.X64dangi12012 wrote: ↑Sat Dec 18, 2021 1:23 am Why open a second thread?
You already said you could make it work?
C# .net 6/5 .net core 3.1/2.1/2 and .net framework 4.8/4.7/4.6/4/3.8/3.6/3.5 literally all have access to instrinsics.
The newer ones even natively.
Its still this one Chessnut:
ulong result = System.Runtime.Intrinsics.X86.Bmi1.X64.TrailingZeroCount(value);
-
- Posts: 1062
- Joined: Tue Apr 28, 2020 10:03 pm
- Full name: Daniel Infuehr
Re: Anybody know of a BitScanReverse intrinsic in C# Net 6.0?
There you go. Just google once yourself before posting on this boardChessnut1071 wrote: ↑Sat Dec 18, 2021 1:51 amTrailingZeroCount is working for my North vectors. Now I need the south vectors and the opposite of TrailingZeroCount. I can't seem to find an equivalent to BitScanReverse like in C++ and the MS docs didn't list a method under Bmi.X64dangi12012 wrote: ↑Sat Dec 18, 2021 1:23 am Why open a second thread?
You already said you could make it work?
C# .net 6/5 .net core 3.1/2.1/2 and .net framework 4.8/4.7/4.6/4/3.8/3.6/3.5 literally all have access to instrinsics.
The newer ones even natively.
Its still this one Chessnut:
ulong result = System.Runtime.Intrinsics.X86.Bmi1.X64.TrailingZeroCount(value);
https://docs.microsoft.com/en-us/dotnet ... ew=net-6.0
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
Daniel Inführ - Software Developer
-
- Posts: 313
- Joined: Tue Aug 03, 2021 2:41 pm
- Full name: Bill Beame
Re: Anybody know of a BitScanReverse intrinsic in C# Net 6.0?
thx dangi.dangi12012 wrote: ↑Sat Dec 18, 2021 2:11 amThere you go. Just google once yourself before posting on this boardChessnut1071 wrote: ↑Sat Dec 18, 2021 1:51 amTrailingZeroCount is working for my North vectors. Now I need the south vectors and the opposite of TrailingZeroCount. I can't seem to find an equivalent to BitScanReverse like in C++ and the MS docs didn't list a method under Bmi.X64dangi12012 wrote: ↑Sat Dec 18, 2021 1:23 am Why open a second thread?
You already said you could make it work?
C# .net 6/5 .net core 3.1/2.1/2 and .net framework 4.8/4.7/4.6/4/3.8/3.6/3.5 literally all have access to instrinsics.
The newer ones even natively.
Its still this one Chessnut:
ulong result = System.Runtime.Intrinsics.X86.Bmi1.X64.TrailingZeroCount(value);
https://docs.microsoft.com/en-us/dotnet ... ew=net-6.0
Actually, I tried to Goggled that method for 2 days. I thought it was under Bmi1 instead of Lzcnt. My bitboard is about 90% done. I hope its a lot faster than my mail box, otherwise, I wasted a huge amount of time,