Chessnut1071 wrote: ↑Thu Dec 09, 2021 5:25 am
CSO2034, BitOperations does not exist in the namespace System,Numerics
I'm just getting used to this new VS, using VS2022 N3t 7.3. I have a work around that's a 64-cycle loop which works but way too slow for what I need.
7.3 is the C# language version (and an old one at that). What version of the .NET runtime are you targeting? I’m guessing you’re targeting .NET Framework 4.7, not .NET Core (which was a separate runtime from the full framework in .NET Core 1, 2, and 3 but has since been unified in .NET 5+). Bitscan and popcount CPU intrinsics are not supported in .NET Framework, only in .NET Core 3, .NET 5, and .NET 6.
Do you really have requirements that permit using VS 2022 but do not permit targeting .NET 6? That seems odd to me.
Chessnut1071 wrote: ↑Thu Dec 09, 2021 5:25 am
CSO2034, BitOperations does not exist in the namespace System,Numerics
I'm just getting used to this new VS, using VS2022 N3t 7.3. I have a work around that's a 64-cycle loop which works but way too slow for what I need.
7.3 is the C# language version (and an old one at that). What version of the .NET runtime are you targeting? I’m guessing you’re targeting .NET Framework 4.7, not .NET Core (which was a separate runtime from the full framework in .NET Core 1, 2, and 3 but has since been unified in .NET 5+). Bitscan and popcount CPU intrinsics are not supported in .NET Framework, only in .NET Core 3, .NET 5, and .NET 6.
Do you really have requirements that permit using VS 2022 but do not permit targeting .NET 6? That seems odd to me.
I was using those instructions in VS 2015. They exist since a long time. He might just be trolling us at this point.
Chessnut1071 wrote: ↑Thu Dec 09, 2021 5:25 am
CSO2034, BitOperations does not exist in the namespace System,Numerics
I'm just getting used to this new VS, using VS2022 N3t 7.3. I have a work around that's a 64-cycle loop which works but way too slow for what I need.
7.3 is the C# language version (and an old one at that). What version of the .NET runtime are you targeting? I’m guessing you’re targeting .NET Framework 4.7, not .NET Core (which was a separate runtime from the full framework in .NET Core 1, 2, and 3 but has since been unified in .NET 5+). Bitscan and popcount CPU intrinsics are not supported in .NET Framework, only in .NET Core 3, .NET 5, and .NET 6.
Do you really have requirements that permit using VS 2022 but do not permit targeting .NET 6? That seems odd to me.
Below are my available targets:
Net Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.6, 4.71,4.72, 4.8, unity Net 3.5 full base Class Libraries
I'm using the free community version of VS 2022. Are you using the pro version?
Chessnut1071 wrote: ↑Thu Dec 09, 2021 5:25 am
CSO2034, BitOperations does not exist in the namespace System,Numerics
I'm just getting used to this new VS, using VS2022 N3t 7.3. I have a work around that's a 64-cycle loop which works but way too slow for what I need.
7.3 is the C# language version (and an old one at that). What version of the .NET runtime are you targeting? I’m guessing you’re targeting .NET Framework 4.7, not .NET Core (which was a separate runtime from the full framework in .NET Core 1, 2, and 3 but has since been unified in .NET 5+). Bitscan and popcount CPU intrinsics are not supported in .NET Framework, only in .NET Core 3, .NET 5, and .NET 6.
Do you really have requirements that permit using VS 2022 but do not permit targeting .NET 6? That seems odd to me.
Below are my available targets:
Net Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.6, 4.71,4.72, 4.8, unity Net 3.5 full base Class Libraries
I'm using the free community version of VS 2022. Are you using the pro version?
I'm using the free version of VS2022, too. Targets available to me are .Net Framwork from 2.0 up to 4.8, .Net Core from 1.0 up to 3.1, .Net Standard from 1.0 up to 2.1, .Net 5.0 and .Net 6.0. Maybe you need to check some option in VS Installation Manager to enable .Net 6.0.
Chessnut1071 wrote: ↑Thu Dec 09, 2021 5:25 am
CSO2034, BitOperations does not exist in the namespace System,Numerics
I'm just getting used to this new VS, using VS2022 N3t 7.3. I have a work around that's a 64-cycle loop which works but way too slow for what I need.
7.3 is the C# language version (and an old one at that). What version of the .NET runtime are you targeting? I’m guessing you’re targeting .NET Framework 4.7, not .NET Core (which was a separate runtime from the full framework in .NET Core 1, 2, and 3 but has since been unified in .NET 5+). Bitscan and popcount CPU intrinsics are not supported in .NET Framework, only in .NET Core 3, .NET 5, and .NET 6.
Do you really have requirements that permit using VS 2022 but do not permit targeting .NET 6? That seems odd to me.
Below are my available targets:
Net Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.6, 4.71,4.72, 4.8, unity Net 3.5 full base Class Libraries
I'm using the free community version of VS 2022. Are you using the pro version?
I'm using the free version of VS2022, too. Targets available to me are .Net Framwork from 2.0 up to 4.8, .Net Core from 1.0 up to 3.1, .Net Standard from 1.0 up to 2.1, .Net 5.0 and .Net 6.0. Maybe you need to check some option in VS Installation Manager to enable .Net 6.0.
Thx. got it working in Net 5.0. You have to use static or the compiler goes bananas.
static ulong value = 64;
ulong result = System.Runtime.Intrinsics.X86.Bmi1.X64.TrailingZeroCount(value);