mirror of https://github.com/SixLabors/ImageSharp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.3 KiB
46 lines
1.3 KiB
<#@ template debug="false" hostspecific="false" language="C#" #>
|
|
<#@ assembly name="System.Core" #>
|
|
<#@ import namespace="System.Linq" #>
|
|
<#@ import namespace="System.Text" #>
|
|
<#@ import namespace="System.Collections.Generic" #>
|
|
<#@ output extension=".cs" #>
|
|
|
|
using System;
|
|
using System.Numerics;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
namespace ImageSharp.Formats
|
|
{
|
|
internal partial struct Block8x8F
|
|
{
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void TransposeInto(ref Block8x8F d)
|
|
{
|
|
<#
|
|
char[] coordz = new[] {'X', 'Y', 'Z', 'W'};
|
|
//StringBuilder bld = new StringBuilder();
|
|
PushIndent(" ");
|
|
|
|
for (int i = 0; i < 8; i++)
|
|
{
|
|
char destCoord = coordz[i % 4];
|
|
char destSide = (i / 4) % 2 == 0 ? 'L' : 'R';
|
|
|
|
for (int j = 0; j < 8; j++)
|
|
{
|
|
char srcCoord = coordz[j % 4];
|
|
char srcSide = (j / 4) % 2 == 0 ? 'L' : 'R';
|
|
|
|
string expression = $"d.V{j}{destSide}.{destCoord} = V{i}{srcSide}.{srcCoord}; ";
|
|
//bld.Append(expression);
|
|
Write(expression);
|
|
}
|
|
//bld.AppendLine();
|
|
WriteLine("");
|
|
}
|
|
PopIndent();
|
|
//Write(bld.ToString());
|
|
#>
|
|
}
|
|
}
|
|
}
|
|
|