Add .NET Standard 2.0 target to ComputeSharp

Also switch TerraFX.Interop.Windows to shared project
このコミットが含まれているのは:
Sergio Pedri committed 2021-11-16 17:34:01 +01:00
1 親 78f68f7b8c
コミット 06ce524740
66ファイル変更
+1276 -178

検索条件に一致するファイルはありません

-24
ファイルの表示
@@ -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;
}
-17
ファイルの表示
@@ -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;
}