Re: Crafty 25.3 MSVS 2019
Posted: Thu Sep 12, 2019 6:06 am
Thanks. Have made the changes and sent to Joshua to confirm under microsoft compiler.
Those seem to be ugly, returning the result through a pointer passed as an argument. Not so good for me as ALL of my usages of these operations are done as part of an arithmetic expression. Seems like a poor idea to write a wrapper function that is called just to get to a basic hardware instruction...jdart wrote: ↑Thu Sep 12, 2019 5:23 am For MSVC (_MSC_VER defined) you want:
_BitScanForward64, _BitScanReverse64 for LSB, MSB:
https://docs.microsoft.com/en-us/cpp/in ... ew=vs-2019
Hello bob,bob wrote: ↑Sat Sep 14, 2019 8:04 pmThose seem to be ugly, returning the result through a pointer passed as an argument. Not so good for me as ALL of my usages of these operations are done as part of an arithmetic expression. Seems like a poor idea to write a wrapper function that is called just to get to a basic hardware instruction...jdart wrote: ↑Thu Sep 12, 2019 5:23 am For MSVC (_MSC_VER defined) you want:
_BitScanForward64, _BitScanReverse64 for LSB, MSB:
https://docs.microsoft.com/en-us/cpp/in ... ew=vs-2019
Bob authorized me to host crafty on Github under MichaelB7 - please feel free to summit patches and we'll test it for compatibility. Or send patches directly to Bob an he will send me updates once approved ( prob better idea).jdart wrote: ↑Tue Sep 10, 2019 3:06 am I think it would be very helpful if this was hosted on a proper version control system such as Github. I know there was some unofficial hosting there but really it should be authorized by Bob. If that is done it is possible to submit patches via pull request. And there is a place to go for the latest code. Just IMO. I did not use version control for many, many years but since starting to, I have found it indispensable.
--JOn
__popcnt64() is available only in a 64-bit mode. Are you sure you compiled sources as a 64-bit application?bob wrote: ↑Mon Sep 16, 2019 7:22 pm OK, we are still mucking around with this. Joshua is compiling using the latest MSVC stuff. Here's our problem (I don't have a windows box to try this on so am getting compile help.)
We can access __popcnt() with no problems including intrin.h. but we can NOT access __popcnt64(). Apparently the compiler does not recognize that intrinsic, and instead thinks it is an external function, which lets it compile cleanly, but fail when linking the executable.
Is there some compiler option he needs to use to let the compiler know what to do with the 64 bit intrinsics???