DaVinki
Dynamic channel/queue system where only one unit of a particular group can process at any given time
If so then you could use a sorted set for pending units and then when it's their time, pop them out of the sorted set and push them into a channel which is now dedicated to that specific unit
19 replies
There are a lot of IF statements here
Yeah, abstract and virtual methods are used to do things without needing to know the implementation details. You wouldn’t need to know how it adds a missing component, just that it does and works for every type inheriting the base type declaring the method
22 replies
There are a lot of IF statements here
To aggregate the data you would need to know the definition of blocks. If each block is its own type such as frictionblocks being a list of FrictionBlock, you could instead write an abstract or virtual method in the base, override it with the null component check specific to the derived and then replace all of the if statements with a single for loop that just calls the method on base type
22 replies
Am I understanding .NET Framework correctly?
A little irrelevant from the question but on topic with your report, you could talk about the System.Numerics namespace and its types that abstract hardware acceleration to make it super easy to write accelerated code once and use anywhere. If a language doesn't provide abstract hardware acceleration, you'll find yourself rewriting code multiple times to try and target the highest available SIMD instructions available in an ISA.
Other languages are following suit with this like Java's Vector API and Rust's std::simd module, although .NET looks like it's had the most support for this. It's not experimental or in an incubator and AVX-512 is officially supported as of .NET 8
8 replies