30 instantiations of AlignedArray
Microsoft.ML.CpuMath (2)
AlignedMatrix.cs (2)
61_items = new AlignedArray(cflt, cbAlign); 319Items = new AlignedArray(RunLenPhy * RunCntPhy, cbAlign);
Microsoft.ML.CpuMath.PerformanceTests (3)
PerformanceTests.cs (3)
107testMatrixAligned = new AlignedArray(matrixLength * matrixLength, align); 110testSrcVectorAligned = new AlignedArray(matrixLength, align); 113testDstVectorAligned = new AlignedArray(matrixLength, align);
Microsoft.ML.CpuMath.UnitTests (8)
UnitTests.cs (8)
69AlignedArray testMatrixAligned1 = new AlignedArray(8 * 8, _vectorAlignment); 70AlignedArray testMatrixAligned2 = new AlignedArray(8 * 16, _vectorAlignment); 80AlignedArray testSrcVectorAligned1 = new AlignedArray(8, _vectorAlignment); 81AlignedArray testSrcVectorAligned2 = new AlignedArray(16, _vectorAlignment); 91AlignedArray testDstVectorAligned1 = new AlignedArray(8, _vectorAlignment); 92AlignedArray testDstVectorAligned2 = new AlignedArray(16, _vectorAlignment); 902AlignedArray src = new AlignedArray(8 + 8 * test, _vectorAlignment); 916AlignedArray src = new AlignedArray(8 + 8 * test, _vectorAlignment);
Microsoft.ML.StandardTrainers (6)
FactorizationMachine\FactorizationMachineTrainer.cs (3)
301latentWeightsAligned = new AlignedArray(featureCount * fieldCount * _latentDimAligned, 16); 303latentAccumulatedSquaredGradsAligned = new AlignedArray(featureCount * fieldCount * _latentDimAligned, 16); 462var latentSum = new AlignedArray(fieldCount * fieldCount * _latentDimAligned, 16);
FactorizationMachine\FieldAwareFactorizationMachineModelParameters.cs (2)
92_latentWeightsAligned = new AlignedArray(FeatureCount * FieldCount * LatentDimAligned, 16); 160_latentWeightsAligned = new AlignedArray(FeatureCount * FieldCount * LatentDimAligned, 16);
FactorizationMachine\FieldAwareFactorizationMachineUtils.cs (1)
101var latentSum = new AlignedArray(_pred.FieldCount * _pred.FieldCount * _pred.LatentDimAligned, 16);
Microsoft.ML.Tests (3)
TrainerEstimators\MatrixFactorizationTests.cs (3)
827var leftFactorMatrixAligned = new AlignedArray(m * k, 64); 832var rightFactorVectorAligned = new AlignedArray(k, 64); 838var valuesAtSecondColumn = new AlignedArray(m, 64);
Microsoft.ML.Transforms (8)
RandomFourierFeaturizing.cs (8)
124RndFourierVectors = new AlignedArray(roundedUpD * roundedUpNumFeatures, CpuMathUtils.GetVectorAlignment()); 125RotationTerms = _useSin ? null : new AlignedArray(roundedUpD, CpuMathUtils.GetVectorAlignment()); 158RndFourierVectors = new AlignedArray(roundedUpD * roundedUpNumFeatures, CpuMathUtils.GetVectorAlignment()); 159RotationTerms = _useSin ? null : new AlignedArray(roundedUpD, CpuMathUtils.GetVectorAlignment()); 517var featuresAligned = new AlignedArray(RoundUp(_srcTypes[iinfo].GetValueCount(), _cfltAlign), CpuMathUtils.GetVectorAlignment()); 518var productAligned = new AlignedArray(RoundUp(_parent._transformInfos[iinfo].NewDim, _cfltAlign), CpuMathUtils.GetVectorAlignment()); 534var featuresAligned = new AlignedArray(RoundUp(1, _cfltAlign), CpuMathUtils.GetVectorAlignment()); 535var productAligned = new AlignedArray(RoundUp(_parent._transformInfos[iinfo].NewDim, _cfltAlign), CpuMathUtils.GetVectorAlignment());
92 references to AlignedArray
Microsoft.ML.CpuMath (42)
AlignedArray.cs (1)
161public void CopyFrom(AlignedArray src)
AlignedMatrix.cs (3)
23private readonly AlignedArray _items; 85public AlignedArray Items { get { return _items; } } 245public AlignedArray Items { get; }
AvxIntrinsics.cs (11)
55private static bool HasCompatibleAlignment(AlignedArray alignedArray) 63private static unsafe float* GetAlignedBase(AlignedArray alignedArray, float* unalignedBase) 176public static unsafe void MatMul(AlignedArray mat, AlignedArray src, AlignedArray dst, int crow, int ccol) 245public static unsafe void MatMulP(AlignedArray mat, ReadOnlySpan<int> rgposSrc, AlignedArray src, 246int posMin, int iposMin, int iposEnd, AlignedArray dst, int crow, int ccol) 299public static unsafe void MatMulTran(AlignedArray mat, AlignedArray src, AlignedArray dst, int crow, int ccol)
CpuMathUtils.netcoreapp.cs (9)
39public static void MatrixTimesSource(bool transpose, AlignedArray matrix, AlignedArray source, AlignedArray destination, int stride) 114public static void MatrixTimesSource(AlignedArray matrix, ReadOnlySpan<int> rgposSrc, AlignedArray sourceValues, 115int posMin, int iposMin, int iposLimit, AlignedArray destination, int stride) 454public static void ZeroMatrixItems(AlignedArray destination, int ccol, int cfltRow, int[] indices) 469private static unsafe void ZeroItemsU(AlignedArray destination, int c, int[] indices, int cindices) 484private static unsafe void ZeroMatrixItemsCore(AlignedArray destination, int c, int ccol, int cfltRow, int[] indices, int cindices)
FactorizationMachine\FactorizationMachineInterface.cs (2)
16private static bool Compat(AlignedArray a) 23private static unsafe float* Ptr(AlignedArray a, float* p)
FactorizationMachine\FactorizationMachineInterface.netcoreapp.cs (5)
14float[] linearWeights, AlignedArray latentWeights, AlignedArray latentSum, ref float response) 42float weight, int count, int[] fieldIndices, int[] featureIndices, float[] featureValues, AlignedArray latentSum, float slope, 43float[] linearWeights, AlignedArray latentWeights, float[] linearAccumulatedSquaredGrads, AlignedArray latentAccumulatedSquaredGrads)
SseIntrinsics.cs (11)
50private static bool HasCompatibleAlignment(AlignedArray alignedArray) 58private static unsafe float* GetAlignedBase(AlignedArray alignedArray, float* unalignedBase) 141public static unsafe void MatMul(AlignedArray mat, AlignedArray src, AlignedArray dst, int crow, int ccol) 202public static unsafe void MatMulP(AlignedArray mat, ReadOnlySpan<int> rgposSrc, AlignedArray src, 203int posMin, int iposMin, int iposEnd, AlignedArray dst, int crow, int ccol) 256public static unsafe void MatMulTran(AlignedArray mat, AlignedArray src, AlignedArray dst, int crow, int ccol)
Microsoft.ML.CpuMath.PerformanceTests (4)
NativePerformanceTests.cs (1)
16private static unsafe float* Ptr(AlignedArray a, float* p)
PerformanceTests.cs (3)
26internal AlignedArray testMatrixAligned; 27internal AlignedArray testSrcVectorAligned; 28internal AlignedArray testDstVectorAligned;
Microsoft.ML.CpuMath.UnitTests (23)
UnitTests.cs (23)
24private static readonly AlignedArray[] _testMatrices; 25private static readonly AlignedArray[] _testSrcVectors; 26private static readonly AlignedArray[] _testDstVectors; 69AlignedArray testMatrixAligned1 = new AlignedArray(8 * 8, _vectorAlignment); 70AlignedArray testMatrixAligned2 = new AlignedArray(8 * 16, _vectorAlignment); 74_testMatrices = new AlignedArray[] { testMatrixAligned1, testMatrixAligned2 }; 80AlignedArray testSrcVectorAligned1 = new AlignedArray(8, _vectorAlignment); 81AlignedArray testSrcVectorAligned2 = new AlignedArray(16, _vectorAlignment); 85_testSrcVectors = new AlignedArray[] { testSrcVectorAligned1, testSrcVectorAligned2 }; 91AlignedArray testDstVectorAligned1 = new AlignedArray(8, _vectorAlignment); 92AlignedArray testDstVectorAligned2 = new AlignedArray(16, _vectorAlignment); 96_testDstVectors = new AlignedArray[] { testDstVectorAligned1, testDstVectorAligned2 }; 245AlignedArray mat = _testMatrices[int.Parse(arg1)]; 246AlignedArray src = _testSrcVectors[int.Parse(arg2)]; 247AlignedArray dst = _testDstVectors[int.Parse(arg3)]; 279AlignedArray mat = _testMatrices[int.Parse(arg1)]; 280AlignedArray src = _testSrcVectors[int.Parse(arg2)]; 281AlignedArray dst = _testDstVectors[int.Parse(arg3)]; 312AlignedArray mat = _testMatrices[int.Parse(arg1)]; 313AlignedArray src = _testSrcVectors[int.Parse(arg2)]; 314AlignedArray dst = _testDstVectors[int.Parse(arg3)]; 902AlignedArray src = new AlignedArray(8 + 8 * test, _vectorAlignment); 916AlignedArray src = new AlignedArray(8 + 8 * test, _vectorAlignment);
Microsoft.ML.StandardTrainers (12)
FactorizationMachine\FactorizationMachineTrainer.cs (7)
298out AlignedArray latentWeightsAligned, out float[] linearAccumulatedSquaredGrads, out AlignedArray latentAccumulatedSquaredGradsAligned) 359private static double CalculateAvgLoss(IChannel ch, RoleMappedData data, bool norm, float[] linearWeights, AlignedArray latentWeightsAligned, 360int latentDimAligned, AlignedArray latentSum, int[] featureFieldBuffer, int[] featureIndexBuffer, float[] featureValueBuffer, VBuffer<float> buffer, ref long badExampleCount) 462var latentSum = new AlignedArray(fieldCount * fieldCount * _latentDimAligned, 16); 484out AlignedArray latentWeightsAligned, out float[] linearAccSqGrads, out AlignedArray latentAccSqGradsAligned);
FactorizationMachine\FieldAwareFactorizationMachineModelParameters.cs (4)
50private readonly AlignedArray _latentWeightsAligned; 112float[] linearWeights, AlignedArray latentWeightsAligned) : base(env, LoaderSignature) 228int[] featureFieldBuffer, int[] featureIndexBuffer, float[] featureValueBuffer, AlignedArray latentSum) 249internal void CopyLatentWeightsTo(AlignedArray latentWeights)
FactorizationMachine\FieldAwareFactorizationMachineUtils.cs (1)
101var latentSum = new AlignedArray(_pred.FieldCount * _pred.FieldCount * _pred.LatentDimAligned, 16);
Microsoft.ML.Tests (3)
TrainerEstimators\MatrixFactorizationTests.cs (3)
827var leftFactorMatrixAligned = new AlignedArray(m * k, 64); 832var rightFactorVectorAligned = new AlignedArray(k, 64); 838var valuesAtSecondColumn = new AlignedArray(m, 64);
Microsoft.ML.Transforms (8)
RandomFourierFeaturizing.cs (8)
97public readonly AlignedArray RndFourierVectors; 100public readonly AlignedArray RotationTerms; 517var featuresAligned = new AlignedArray(RoundUp(_srcTypes[iinfo].GetValueCount(), _cfltAlign), CpuMathUtils.GetVectorAlignment()); 518var productAligned = new AlignedArray(RoundUp(_parent._transformInfos[iinfo].NewDim, _cfltAlign), CpuMathUtils.GetVectorAlignment()); 534var featuresAligned = new AlignedArray(RoundUp(1, _cfltAlign), CpuMathUtils.GetVectorAlignment()); 535var productAligned = new AlignedArray(RoundUp(_parent._transformInfos[iinfo].NewDim, _cfltAlign), CpuMathUtils.GetVectorAlignment()); 549AlignedArray featuresAligned, AlignedArray productAligned)