View SPIRVJSONReader.ttinclude
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#@ assembly name="System.Runtime.Serialization"#> | |
<#@ import namespace="System.Collections.Generic" #> | |
<#@ import namespace="System.Runtime.Serialization"#> | |
<#@ import namespace="System.Runtime.Serialization.Json"#> | |
<# | |
var json = new DataContractJsonSerializer(typeof(SPIRVGrammar)); | |
var file = File.Open("spirv.core.grammar.json", FileMode.Open); | |
var grammar = (SPIRVGrammar) json.ReadObject(file); |
View ILGPUErrorFixedArrays.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsafe struct FSMUnit | |
{ | |
public int tx; | |
public int ty; | |
public fixed int test[256]; | |
public fixed int test2[256]; | |
} | |
unsafe static void MathKernel(Index2 index, ArrayView2D<FSMUnit> grid) | |
{ | |
int tx = index.X; |
View InvalidArgument.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public BufferedFastMatrix<T> AddShared(BufferedFastMatrix<T> one, BufferedFastMatrix<T> two) | |
{ | |
if (one == null || two == null) | |
{ | |
throw new ArgumentNullException(); | |
} | |
if ((one.GetSize(0) != two.GetSize(0)) || (one.GetSize(1) != two.GetSize(1))) | |
{ | |
throw new BadDimensionException(one.GetSize(0), one.GetSize(1), two.GetSize(0), | |
two.GetSize(1)); |