Proposal: C# AMP and restrict keyword #3289
Replies: 4 comments
-
What would |
Beta Was this translation helpful? Give feedback.
-
This is better left for the framework level and not the language, much like they did with SIMD where they introduced a new type called Vector that is an abstraction over it. I hope they will expand the CLR to support more hardware features through abstractions without going through interops and stuff. |
Beta Was this translation helpful? Give feedback.
-
@svick , @eyalsk, Of course GPU support should be implemented on the framework level, but an expression tree subset (profile) will help provider developer and programmer. This is exist feature:
we can enhance it, give a
(#2060) 's problem, it can use
if allow
another idea is
|
Beta Was this translation helpful? Give feedback.
-
Doesn't Mono already have something along this line. |
Beta Was this translation helpful? Give feedback.
-
Idea from C++ AMP.
Until now, use C# to calculate on GPGPU still not easy
(DirectCompute, OpenGL, OpenCL, CUDA, Vulkan ... etc).
Although .NET have the Parallel class can do parallel for easily like OpenMP, C# lack more simple syntax to do a massive parallel compute like OpenACC, C++ AMP or OpenMP 4.0.
So we need something like this:
But let Roslyn to emit GPU code is too over, the only thing Roslyn should do is to limit expressions in lambda and give generate expressions to GPU provider.
restrict(amp)
hint to do limitation.Actually do this:
Allow more complex "restrict(amp) method"
Even crazy, we can make a LINQ to GPU, just like Entity Framework.
By the way, there is a lot of expression trees in .NET and those should be refactoring.
Maybe with
restrict(mssql)
EntityFramework can do more thing?Beta Was this translation helpful? Give feedback.
All reactions