cap5lut
vectorizable algorithms/excercises
his is not a question about how it works:
I wanna learn more about vectorization and am looking for some algorithms which can be vectorized.
I do not want solutions, but a list problems that can be solved and sped up using vectorization to train myself.
I have same basic understanding on how it works. eg, i can write a sum algorithm, but thats more or less it because i never really had something where i could apply it and my googling skills regarding this are quite bad.
so , im searching from the beginner friendly up to the advanced stuff.
do u have some ideas/lists/resources, please tell me 🙂
3 replies
✅ VS2022 | Enable missing xml docs warnings for non-public API
Hi, after searching for a while and digging throw Vs2022, this is now my last resort.
Basically I want a warning like CS1591, but for the non public stuff. Is there something like that or do I have to write an analyzer for that?
1 replies
✅ Make method implemented in interface accessible from implementing type
i have an interface and an implementing struct
now
GetPlatforms()
isnt reachable via new CLAdapter().GetPlatforms()
, how can i make that accessible?
i tried implementing it in the adapter by simply casting this
to ICL
, but then i run into stack overflows 7 replies
❔ Unit Test | Mocking class with unsafe methods
Hi, I am having trouble writing unit tests, because I dont know how to mock/setup the underlying instance/its methods.
The class
Silk.NET.OpenCL.CL
(https://github.com/dotnet/Silk.NET/blob/main/src/OpenCL/Silk.NET.OpenCL/CL.gen.cs) does not implement an interface and the methods are unsafe and non virtual.
This would be one of the methods I need to mock:
(instead of out uint num_platforms
I could also use uint* num_platforms
, if that matters)
I tried using Moq, but I run into errors for the null pointer and count parameter:
CS1944: An expression tree may not contain an unsafe pointer operation CS8198: An expression tree may not contain an out argument variable declaration( I tried also other libraries like Pose, but they all use
System.Linq.Expressions.Expression
so I always ran into the same errors)
Any idea how to do that?4 replies
UDP Multicast does not work as expected [Answered]
I am starting to play around with UDP for some IPC stuff and wrote a simple UDP Multicast application just to have a playground to advance from, but sadly its not going as expected.
First of all: here is the code of the small program https://gist.github.com/cap5lut/ce3bfda6a0997b647a67a20d78d9e189
My expectation was that the writer sends the data and both readers would receive the data, resulting in an output like
but that is not the case, only the writer and reader 1 is spitting out stuff.
what am I doing wrong?
13 replies