Skip to content

Update private and constant variable names #943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions test/Microsoft.ML.CpuMath.PerformanceTests/AvxPerformanceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,91 +13,91 @@ public class AvxPerformanceTests : PerformanceTests
{
[Benchmark]
public void AddScalarU()
=> AvxIntrinsics.AddScalarU(DEFAULT_SCALE, new Span<float>(dst, 0, LEN));
=> AvxIntrinsics.AddScalarU(DefaultScale, new Span<float>(dst, 0, Length));

[Benchmark]
public void ScaleU()
=> AvxIntrinsics.ScaleU(DEFAULT_SCALE, new Span<float>(dst, 0, LEN));
=> AvxIntrinsics.ScaleU(DefaultScale, new Span<float>(dst, 0, Length));

[Benchmark]
public void ScaleSrcU()
=> AvxIntrinsics.ScaleSrcU(DEFAULT_SCALE, new Span<float>(src, 0, LEN), new Span<float>(dst, 0, LEN));
=> AvxIntrinsics.ScaleSrcU(DefaultScale, new Span<float>(src, 0, Length), new Span<float>(dst, 0, Length));

[Benchmark]
public void ScaleAddU()
=> AvxIntrinsics.ScaleAddU(DEFAULT_SCALE, DEFAULT_SCALE, new Span<float>(dst, 0, LEN));
=> AvxIntrinsics.ScaleAddU(DefaultScale, DefaultScale, new Span<float>(dst, 0, Length));

[Benchmark]
public void AddScaleU()
=> AvxIntrinsics.AddScaleU(DEFAULT_SCALE, new Span<float>(src, 0, LEN), new Span<float>(dst, 0, LEN));
=> AvxIntrinsics.AddScaleU(DefaultScale, new Span<float>(src, 0, Length), new Span<float>(dst, 0, Length));

[Benchmark]
public void AddScaleSU()
=> AvxIntrinsics.AddScaleSU(DEFAULT_SCALE, new Span<float>(src), new Span<int>(idx, 0, IDXLEN), new Span<float>(dst));
=> AvxIntrinsics.AddScaleSU(DefaultScale, new Span<float>(src), new Span<int>(idx, 0, IndexLength), new Span<float>(dst));

[Benchmark]
public void AddScaleCopyU()
=> AvxIntrinsics.AddScaleCopyU(DEFAULT_SCALE, new Span<float>(src, 0, LEN), new Span<float>(dst, 0, LEN), new Span<float>(result, 0, LEN));
=> AvxIntrinsics.AddScaleCopyU(DefaultScale, new Span<float>(src, 0, Length), new Span<float>(dst, 0, Length), new Span<float>(result, 0, Length));

[Benchmark]
public void AddU()
=> AvxIntrinsics.AddU(new Span<float>(src, 0, LEN), new Span<float>(dst, 0, LEN));
=> AvxIntrinsics.AddU(new Span<float>(src, 0, Length), new Span<float>(dst, 0, Length));

[Benchmark]
public void AddSU()
=> AvxIntrinsics.AddSU(new Span<float>(src), new Span<int>(idx, 0, IDXLEN), new Span<float>(dst));
=> AvxIntrinsics.AddSU(new Span<float>(src), new Span<int>(idx, 0, IndexLength), new Span<float>(dst));

[Benchmark]
public void MulElementWiseU()
=> AvxIntrinsics.MulElementWiseU(new Span<float>(src1, 0, LEN), new Span<float>(src2, 0, LEN),
new Span<float>(dst, 0, LEN));
=> AvxIntrinsics.MulElementWiseU(new Span<float>(src1, 0, Length), new Span<float>(src2, 0, Length),
new Span<float>(dst, 0, Length));

[Benchmark]
public float SumU()
=> AvxIntrinsics.SumU(new Span<float>(src, 0, LEN));
=> AvxIntrinsics.SumU(new Span<float>(src, 0, Length));

[Benchmark]
public float SumSqU()
=> AvxIntrinsics.SumSqU(new Span<float>(src, 0, LEN));
=> AvxIntrinsics.SumSqU(new Span<float>(src, 0, Length));

[Benchmark]
public float SumSqDiffU()
=> AvxIntrinsics.SumSqDiffU(DEFAULT_SCALE, new Span<float>(src, 0, LEN));
=> AvxIntrinsics.SumSqDiffU(DefaultScale, new Span<float>(src, 0, Length));

[Benchmark]
public float SumAbsU()
=> AvxIntrinsics.SumAbsU(new Span<float>(src, 0, LEN));
=> AvxIntrinsics.SumAbsU(new Span<float>(src, 0, Length));

[Benchmark]
public float SumAbsDiffU()
=> AvxIntrinsics.SumAbsDiffU(DEFAULT_SCALE, new Span<float>(src, 0, LEN));
=> AvxIntrinsics.SumAbsDiffU(DefaultScale, new Span<float>(src, 0, Length));

[Benchmark]
public float MaxAbsU()
=> AvxIntrinsics.MaxAbsU(new Span<float>(src, 0, LEN));
=> AvxIntrinsics.MaxAbsU(new Span<float>(src, 0, Length));

[Benchmark]
public float MaxAbsDiffU()
=> AvxIntrinsics.MaxAbsDiffU(DEFAULT_SCALE, new Span<float>(src, 0, LEN));
=> AvxIntrinsics.MaxAbsDiffU(DefaultScale, new Span<float>(src, 0, Length));

[Benchmark]
public float DotU()
=> AvxIntrinsics.DotU(new Span<float>(src, 0, LEN), new Span<float>(dst, 0, LEN));
=> AvxIntrinsics.DotU(new Span<float>(src, 0, Length), new Span<float>(dst, 0, Length));

[Benchmark]
public float DotSU()
=> AvxIntrinsics.DotSU(new Span<float>(src), new Span<float>(dst), new Span<int>(idx, 0, IDXLEN));
=> AvxIntrinsics.DotSU(new Span<float>(src), new Span<float>(dst), new Span<int>(idx, 0, IndexLength));

[Benchmark]
public float Dist2()
=> AvxIntrinsics.Dist2(new Span<float>(src, 0, LEN), new Span<float>(dst, 0, LEN));
=> AvxIntrinsics.Dist2(new Span<float>(src, 0, Length), new Span<float>(dst, 0, Length));

[Benchmark]
public void SdcaL1UpdateU()
=> AvxIntrinsics.SdcaL1UpdateU(DEFAULT_SCALE, new Span<float>(src, 0, LEN), DEFAULT_SCALE, new Span<float>(dst, 0, LEN), new Span<float>(result, 0, LEN));
=> AvxIntrinsics.SdcaL1UpdateU(DefaultScale, new Span<float>(src, 0, Length), DefaultScale, new Span<float>(dst, 0, Length), new Span<float>(result, 0, Length));

[Benchmark]
public void SdcaL1UpdateSU()
=> AvxIntrinsics.SdcaL1UpdateSU(DEFAULT_SCALE, new Span<float>(src, 0, IDXLEN), new Span<int>(idx, 0, IDXLEN), DEFAULT_SCALE, new Span<float>(dst), new Span<float>(result));
=> AvxIntrinsics.SdcaL1UpdateSU(DefaultScale, new Span<float>(src, 0, IndexLength), new Span<int>(idx, 0, IndexLength), DefaultScale, new Span<float>(dst), new Span<float>(result));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public unsafe void AddScalarU()
{
fixed (float* pdst = dst)
{
CpuMathNativeUtils.AddScalarU(DEFAULT_SCALE, pdst, LEN);
CpuMathNativeUtils.AddScalarU(DefaultScale, pdst, Length);
}
}

Expand All @@ -25,7 +25,7 @@ public unsafe void ScaleU()
{
fixed (float* pdst = dst)
{
CpuMathNativeUtils.ScaleU(DEFAULT_SCALE, pdst, LEN);
CpuMathNativeUtils.ScaleU(DefaultScale, pdst, Length);
}
}

Expand All @@ -35,7 +35,7 @@ public unsafe void ScaleSrcU()
fixed (float* psrc = src)
fixed (float* pdst = dst)
{
CpuMathNativeUtils.ScaleSrcU(DEFAULT_SCALE, psrc, pdst, LEN);
CpuMathNativeUtils.ScaleSrcU(DefaultScale, psrc, pdst, Length);
}
}

Expand All @@ -44,7 +44,7 @@ public unsafe void ScaleAddU()
{
fixed (float* pdst = dst)
{
CpuMathNativeUtils.ScaleAddU(DEFAULT_SCALE, DEFAULT_SCALE, pdst, LEN);
CpuMathNativeUtils.ScaleAddU(DefaultScale, DefaultScale, pdst, Length);
}
}

Expand All @@ -54,7 +54,7 @@ public unsafe void AddScaleU()
fixed (float* psrc = src)
fixed (float* pdst = dst)
{
CpuMathNativeUtils.AddScaleU(DEFAULT_SCALE, psrc, pdst, LEN);
CpuMathNativeUtils.AddScaleU(DefaultScale, psrc, pdst, Length);
}
}

Expand All @@ -65,7 +65,7 @@ public unsafe void AddScaleSU()
fixed (float* pdst = dst)
fixed (int* pidx = idx)
{
CpuMathNativeUtils.AddScaleSU(DEFAULT_SCALE, psrc, pidx, pdst, IDXLEN);
CpuMathNativeUtils.AddScaleSU(DefaultScale, psrc, pidx, pdst, IndexLength);
}
}

Expand All @@ -76,7 +76,7 @@ public unsafe void AddScaleCopyU()
fixed (float* pdst = dst)
fixed (float* pres = result)
{
CpuMathNativeUtils.AddScaleCopyU(DEFAULT_SCALE, psrc, pdst, pres, LEN);
CpuMathNativeUtils.AddScaleCopyU(DefaultScale, psrc, pdst, pres, Length);
}
}

Expand All @@ -86,7 +86,7 @@ public unsafe void AddU()
fixed (float* psrc = src)
fixed (float* pdst = dst)
{
CpuMathNativeUtils.AddU(psrc, pdst, LEN);
CpuMathNativeUtils.AddU(psrc, pdst, Length);
}
}

Expand All @@ -97,7 +97,7 @@ public unsafe void AddSU()
fixed (float* pdst = dst)
fixed (int* pidx = idx)
{
CpuMathNativeUtils.AddSU(psrc, pidx, pdst, IDXLEN);
CpuMathNativeUtils.AddSU(psrc, pidx, pdst, IndexLength);
}
}

Expand All @@ -108,7 +108,7 @@ public unsafe void MulElementWiseU()
fixed (float* psrc2 = src2)
fixed (float* pdst = dst)
{
CpuMathNativeUtils.MulElementWiseU(psrc1, psrc2, pdst, LEN);
CpuMathNativeUtils.MulElementWiseU(psrc1, psrc2, pdst, Length);
}
}

Expand All @@ -117,7 +117,7 @@ public unsafe float SumU()
{
fixed (float* psrc = src)
{
return CpuMathNativeUtils.SumU(psrc, LEN);
return CpuMathNativeUtils.SumU(psrc, Length);
}
}

Expand All @@ -126,7 +126,7 @@ public unsafe float SumSqU()
{
fixed (float* psrc = src)
{
return CpuMathNativeUtils.SumSqU(psrc, LEN);
return CpuMathNativeUtils.SumSqU(psrc, Length);
}
}

Expand All @@ -135,7 +135,7 @@ public unsafe float SumSqDiffU()
{
fixed (float* psrc = src)
{
return CpuMathNativeUtils.SumSqDiffU(DEFAULT_SCALE, psrc, LEN);
return CpuMathNativeUtils.SumSqDiffU(DefaultScale, psrc, Length);
}
}

Expand All @@ -144,7 +144,7 @@ public unsafe float SumAbsU()
{
fixed (float* psrc = src)
{
return CpuMathNativeUtils.SumAbsU(psrc, LEN);
return CpuMathNativeUtils.SumAbsU(psrc, Length);
}
}

Expand All @@ -153,7 +153,7 @@ public unsafe float SumAbsDiffU()
{
fixed (float* psrc = src)
{
return CpuMathNativeUtils.SumAbsDiffU(DEFAULT_SCALE, psrc, LEN);
return CpuMathNativeUtils.SumAbsDiffU(DefaultScale, psrc, Length);
}
}

Expand All @@ -162,7 +162,7 @@ public unsafe float MaxAbsU()
{
fixed (float* psrc = src)
{
return CpuMathNativeUtils.MaxAbsU(psrc, LEN);
return CpuMathNativeUtils.MaxAbsU(psrc, Length);
}
}

Expand All @@ -171,7 +171,7 @@ public unsafe float MaxAbsDiffU()
{
fixed (float* psrc = src)
{
return CpuMathNativeUtils.MaxAbsDiffU(DEFAULT_SCALE, psrc, LEN);
return CpuMathNativeUtils.MaxAbsDiffU(DefaultScale, psrc, Length);
}
}

Expand All @@ -181,7 +181,7 @@ public unsafe float DotU()
fixed (float* psrc = src)
fixed (float* pdst = dst)
{
return CpuMathNativeUtils.DotU(psrc, pdst, LEN);
return CpuMathNativeUtils.DotU(psrc, pdst, Length);
}
}

Expand All @@ -192,7 +192,7 @@ public unsafe float DotSU()
fixed (float* pdst = dst)
fixed (int* pidx = idx)
{
return CpuMathNativeUtils.DotSU(psrc, pdst, pidx, IDXLEN);
return CpuMathNativeUtils.DotSU(psrc, pdst, pidx, IndexLength);
}
}

Expand All @@ -202,7 +202,7 @@ public unsafe float Dist2()
fixed (float* psrc = src)
fixed (float* pdst = dst)
{
return CpuMathNativeUtils.Dist2(psrc, pdst, LEN);
return CpuMathNativeUtils.Dist2(psrc, pdst, Length);
}
}

Expand All @@ -213,7 +213,7 @@ public unsafe void SdcaL1UpdateU()
fixed (float* pdst = dst)
fixed (float* pres = result)
{
CpuMathNativeUtils.SdcaL1UpdateU(DEFAULT_SCALE, psrc, DEFAULT_SCALE, pdst, pres, LEN);
CpuMathNativeUtils.SdcaL1UpdateU(DefaultScale, psrc, DefaultScale, pdst, pres, Length);
}
}

Expand All @@ -225,7 +225,7 @@ public unsafe void SdcaL1UpdateSU()
fixed (float* pres = result)
fixed (int* pidx = idx)
{
CpuMathNativeUtils.SdcaL1UpdateSU(DEFAULT_SCALE, psrc, pidx, DEFAULT_SCALE, pdst, pres, IDXLEN);
CpuMathNativeUtils.SdcaL1UpdateSU(DefaultScale, psrc, pidx, DefaultScale, pdst, pres, IndexLength);
}
}
}
Expand Down
Loading