Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is it possible to find out if the current architecture supports hardware acceleration in Framework 4.5 - 4.8? In Core/Net I use System.Numerics.Vector.IsHardwareAccelerated.

What I have tried:

In Core/Net I use System.Numerics.Vector.IsHardwareAccelerated, but it is not there.
Posted
Updated 3-Nov-21 1:08am

1 solution

According to Vector.IsHardwareAccelerated Property (System.Numerics) | Microsoft Docs[^] it is available in .NET Core up to version 3.1.
 
Share this answer
 
Comments
KarNullKa 3-Nov-21 7:31am    
This method is only available in core, but how can I determine if hardware acceleration is working when this method is not available? I have some code and in both 4.5 and 4.8 frameworks it is much faster when compiling 64bit, so it probably uses hardware acceleration. But something more explicit would be useful. I'm currently only using the preprocessor code:

#if BUILD32
//use Framework function
#else
//use optimized hardware acclerated function
#endif
Richard MacCutchan 3-Nov-21 7:35am    
The documentation says that the framework uses hardware acceleration where available. So you do not really need to worry about it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900