Tag: .net-8.0
-
Null checking with primary constructor in C# 12
7 I using C# 12. In C# 12 I can use primary constructor: public class UserService(IUnitOfWork uow) : IUserService { } Before C# 12 I used null checking for items that I inject in constructor: public class UserService : IUserService { private readonly IUnitOfWork _uow; public UserService(IUnitOfWork uow) { ArgumentNullException.ThrowIfNull(uow); _uow = uow; } }…
-
.NET8 supports Vector512, but why doesn’t Vector reach 512 bits?
7 My CPU is AMD Ryzen 7 7840H which supports AVX-512 instruction set. When I run the .NET8 program, the value of Vector512.IsHardwareAccelerated is true. But System.Numerics.Vector<T> is still 256-bit, and does not reach 512-bit. Why doesn’t the Vector<T> type reach 512 bits in length? Is it currently unsupported, or do I need to tweak…