vs-threading
ComputeSharp
vs-threading | ComputeSharp | |
---|---|---|
8 | 38 | |
955 | 2,543 | |
1.2% | - | |
9.4 | 9.8 | |
1 day ago | 18 days ago | |
C# | C# | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
vs-threading
-
when to use pascal case (FirstName) or prefix underscore camel case (_firstName) when declaring an attirbutes inside class?
There is also an official MS analyzer for Async code, it has rules like avoid async void, don't use synchronous .Wait() or .Result etc. One of them is to use Async suffix, as per guidelines.
-
Implementing an Async Mutex
Any idea how this compares to what Visual Studio is doing: https://github.com/microsoft/vs-threading/blob/main/src/Microsoft.VisualStudio.Threading/AsyncSemaphore.cs
-
Is there a way to force an `async` computation / `MailboxProcessor` to use a unique thread?
Searching for SingleThreadedSynchronizationContext led me to Microsoft.VisualStudio.Threading. Is this library only intended for use with Visual Studio or is it also useful for working with other native and COM applications?
-
What NuGet packages do you automatically add
It looks like 2 of them, ya (although personally I'm on .NET Framework to minimize dependency file sizes). But there are many others, from catching async void (https://github.com/microsoft/vs-threading/blob/main/doc/analyzers/index.md ), to catching unsealed classes (small performance benefits, so why not), etc.
-
How would you fix this sync-over-async code?
Take a look at the JoinableTaskFactory in this library: https://github.com/microsoft/vs-threading
- Reentrant (Recursive) Async Lock is Impossible in C#
-
Prevent deadlock while calling async method inside synchronous one (inside environment with synchronization context)
I'd recommend a look at https://github.com/microsoft/vs-threading (don't worry about the name, you can use it outside of VS environment too).
-
C# Async fire and forget with error handling
All these concerns, and more, are why we in the Visual Studio team wrote the vs-threading library and its JoinableTaskFactory. We have a doc section on fire and forget and shutdown concerns just like you were asking about. If you follow the guidance, the way to wait on outstanding tasks at shutdown is as simple as:
ComputeSharp
-
ILGPU VS ComputeSharp - a user suggested alternative
2 projects | 27 Oct 2023
-
Is there a real time graphics llibrary in c#
A couple other options than what has been suggested so far: - TerraFX.Interop.Windows. Raw, blittable, 1:1 bindings for all Win32, D2D/D3D11/D3D12 APIs (there's also a version with Vulkan bindings). As close to doing #include as you can get in C#. This is my personal favorite, I use it in my own ComputeSharp library, and transitively we use it in the Microsoft Store too 🙂 - Silk.NET another version of high-performance bindings, more opinionated than TerraFX and with some additional helpers to make it a bit easier to use.
-
What can Go do that C# can't?
A hello world .NET console app with NativeAOT is 1.08 MB. Goes down to 1.08 MB with some tweaking. Goes below 1MB with more tweaking. I have a fully self-contained NativeAOT sample app that renders some fancy animated shaders with DX12 that's about 2MB in size.
-
C# and GPU programming
I dont think it's exactly what you're looking for, but I've found ComputeSharp to be a great C# GPU tool
-
Source Generator Debug always NulLReferecneException
Here's some: - MVVM Toolkit - PolySharp - ComputeSharp
- Rust bindings for Avalonia UI Framework
- [WinUI] High level 2D rendering library
-
What library should I use to make basic 2D graphics which is simple to use and that is able to quickly draw a bunch of particles (circles) on the screen with updating positions every frame? (Not the best description ever. I explain it better in the post's text)
If you don't mind being Windows only, I would also recommend trying out (shameless plug) ComputeSharp. You can find it on NuGet and it's available for UWP and WinUI 3 as well with ready to use XAML controls. The point is that it would allow you do your entire rendering via pixel/compute shaders, so it could basically run entirely on the GPU. That'd allow you to render even millions of particles with pretty good performance 🙂
-
What library to code a Screensaver?
Create a UWP or WinUI 3 applicaation and use the AnimatedComputeShaderPanel from ComputeSharp. The library lets you write shaders (ie. code to run on the GPU) entirely in C#, and handles all the logic to setup a DX12 animated swapchain, similar to Win2D. If you look at the repo you can also see a whole bunch of examples, which you can also try out for yourself. There's also several wiki pages with lots of info.
- GitHub - ComputeSharp: A .NET library to run C# code on the GPU through DX12 (Not Godot)
What are some alternatives?
.NET Runtime - .NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
ShaderGen - Proof-of-concept library for generating HLSL, GLSL, and Metal shader code from C#,
AsyncBridge - A library to help bridge C# async method execution from synchronous methods, such as in Windows Forms and ASP.NET.
raylib - A simple and easy-to-use library to enjoy videogames programming
AsyncLock - An async/await-friendly lock for .NET, complete with asynchronous waits, safe reëntrance, and more.
CSharp-Unity-Compute-Shader - Create compute shaders for Unity with C#.
AspNetIdentity - ASP.NET Identity for ASP.NET 4.x applications
BrimsonFX - Image and video processing shaders for ReShade (convolutions, GPU Horn-Schunk/Lucas-Kanade, etc.)
Open.ChannelExtensions - A set of extensions for optimizing/simplifying System.Threading.Channels usage.
SharpDX
dotnet - .NET Community Toolkit is a collection of helpers and APIs that work for all .NET developers and are agnostic of any specific UI platform. The toolkit is maintained and published by Microsoft, and part of the .NET Foundation.
VL.Fuse - A library for visually programming on the GPU, built to enable rapid workflows and modular approaches to accelerated graphics, logic and computation.