Add .NET Standard 2.0 target to ComputeSharp
Also switch TerraFX.Interop.Windows to shared project
このコミットが含まれているのは:
1 親
78f68f7b8c
コミット
06ce524740
66ファイル変更
+1276
-178
検索条件に一致するファイルはありません
@@ -14,6 +14,8 @@
|
||||
manually linking the source files from ComputeSharp\Core in here. We only need them to extract metadata
|
||||
and to match members based on full name, so the types being in the generator assembly are not an issue.-->
|
||||
<ItemGroup>
|
||||
<Compile Include="..\ComputeSharp.NetStandard\System\Runtime\CompilerServices\RuntimeHelpers.cs" Link="Helpers\RuntimeHelpers.cs" />
|
||||
<Compile Include="..\ComputeSharp.NetStandard\System\Runtime\InteropServices\MemoryMarshal.cs" Link="Helpers\MemoryMarshal.cs" />
|
||||
<Compile Include="..\ComputeSharp\Core\Attributes\AutoConstructorAttribute.cs" Link="Core\Attributes\AutoConstructorAttribute.cs" />
|
||||
<Compile Include="..\ComputeSharp\Core\Attributes\GroupSharedAttribute.cs" Link="Core\Attributes\GroupSharedAttribute.cs" />
|
||||
<Compile Include="..\ComputeSharp\Core\Attributes\ShaderMethodAttribute.cs" Link="Core\Attributes\ShaderMethodAttribute.cs" />
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace ComputeSharp.SourceGenerators.Helpers;
|
||||
|
||||
/// <summary>
|
||||
/// A polyfill type that mirrors some methods from <see cref="System.Runtime.InteropServices.MemoryMarshal"/> on .NET 5.
|
||||
/// </summary>
|
||||
internal static class MemoryMarshal
|
||||
{
|
||||
/// <inheritdoc cref="System.Runtime.InteropServices.MemoryMarshal.GetReference{T}(Span{T})"/>
|
||||
public static ref T GetReference<T>(Span<T> span)
|
||||
{
|
||||
return ref System.Runtime.InteropServices.MemoryMarshal.GetReference(span);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="Span{T}"/> from a given reference.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of reference to wrap.</typeparam>
|
||||
/// <param name="value">The target reference.</param>
|
||||
/// <param name="length">The length of the <see cref="Span{T}"/> to create.</param>
|
||||
/// <returns>A new <see cref="Span{T}"/> wrapping <paramref name="value"/>.</returns>
|
||||
public static Span<T> CreateSpan<T>(ref T value, int length) => default;
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace ComputeSharp.SourceGenerators.Helpers;
|
||||
|
||||
/// <summary>
|
||||
/// A polyfill type that mirrors some methods from <see cref="System.Runtime.CompilerServices.RuntimeHelpers"/> on .NET 5.
|
||||
/// </summary>
|
||||
internal static class RuntimeHelpers
|
||||
{
|
||||
/// <summary>
|
||||
/// Allocates some memory tied to the lifetime of a specific type.
|
||||
/// </summary>
|
||||
/// <param name="type">The type to associate the memory to.</param>
|
||||
/// <param name="size">The size in byte of the memory to allocate.</param>
|
||||
/// <returns>A pointer to the allocated memory.</returns>
|
||||
public static IntPtr AllocateTypeAssociatedMemory(Type type, int size) => default;
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする