diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnArithmetic.cs b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnArithmetic.cs index 05a20ef719..0c8a0ec2ff 100644 --- a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnArithmetic.cs +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnArithmetic.cs @@ -307,47 +307,51 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == otherSpan[i]); + ret[index++] = (span[i] == otherSpan[i]); } } } public void ElementwiseEquals(PrimitiveColumnContainer column, bool scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == scalar); + ret[index++] = (span[i] == scalar); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != otherSpan[i]); + ret[index++] = (span[i] != otherSpan[i]); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer column, bool scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != scalar); + ret[index++] = (span[i] != scalar); } } } @@ -708,139 +712,151 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == otherSpan[i]); + ret[index++] = (span[i] == otherSpan[i]); } } } public void ElementwiseEquals(PrimitiveColumnContainer column, byte scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == scalar); + ret[index++] = (span[i] == scalar); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != otherSpan[i]); + ret[index++] = (span[i] != otherSpan[i]); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer column, byte scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != scalar); + ret[index++] = (span[i] != scalar); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= otherSpan[i]); + ret[index++] = (span[i] >= otherSpan[i]); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, byte scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= scalar); + ret[index++] = (span[i] >= scalar); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= otherSpan[i]); + ret[index++] = (span[i] <= otherSpan[i]); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, byte scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= scalar); + ret[index++] = (span[i] <= scalar); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > otherSpan[i]); + ret[index++] = (span[i] > otherSpan[i]); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, byte scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > scalar); + ret[index++] = (span[i] > scalar); } } } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < otherSpan[i]); + ret[index++] = (span[i] < otherSpan[i]); } } } public void ElementwiseLessThan(PrimitiveColumnContainer column, byte scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < scalar); + ret[index++] = (span[i] < scalar); } } } @@ -1169,139 +1185,151 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == otherSpan[i]); + ret[index++] = (span[i] == otherSpan[i]); } } } public void ElementwiseEquals(PrimitiveColumnContainer column, char scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == scalar); + ret[index++] = (span[i] == scalar); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != otherSpan[i]); + ret[index++] = (span[i] != otherSpan[i]); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer column, char scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != scalar); + ret[index++] = (span[i] != scalar); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= otherSpan[i]); + ret[index++] = (span[i] >= otherSpan[i]); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, char scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= scalar); + ret[index++] = (span[i] >= scalar); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= otherSpan[i]); + ret[index++] = (span[i] <= otherSpan[i]); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, char scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= scalar); + ret[index++] = (span[i] <= scalar); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > otherSpan[i]); + ret[index++] = (span[i] > otherSpan[i]); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, char scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > scalar); + ret[index++] = (span[i] > scalar); } } } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < otherSpan[i]); + ret[index++] = (span[i] < otherSpan[i]); } } } public void ElementwiseLessThan(PrimitiveColumnContainer column, char scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < scalar); + ret[index++] = (span[i] < scalar); } } } @@ -1539,139 +1567,151 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == otherSpan[i]); + ret[index++] = (span[i] == otherSpan[i]); } } } public void ElementwiseEquals(PrimitiveColumnContainer column, decimal scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == scalar); + ret[index++] = (span[i] == scalar); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != otherSpan[i]); + ret[index++] = (span[i] != otherSpan[i]); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer column, decimal scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != scalar); + ret[index++] = (span[i] != scalar); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= otherSpan[i]); + ret[index++] = (span[i] >= otherSpan[i]); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, decimal scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= scalar); + ret[index++] = (span[i] >= scalar); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= otherSpan[i]); + ret[index++] = (span[i] <= otherSpan[i]); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, decimal scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= scalar); + ret[index++] = (span[i] <= scalar); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > otherSpan[i]); + ret[index++] = (span[i] > otherSpan[i]); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, decimal scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > scalar); + ret[index++] = (span[i] > scalar); } } } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < otherSpan[i]); + ret[index++] = (span[i] < otherSpan[i]); } } } public void ElementwiseLessThan(PrimitiveColumnContainer column, decimal scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < scalar); + ret[index++] = (span[i] < scalar); } } } @@ -1909,139 +1949,151 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == otherSpan[i]); + ret[index++] = (span[i] == otherSpan[i]); } } } public void ElementwiseEquals(PrimitiveColumnContainer column, double scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == scalar); + ret[index++] = (span[i] == scalar); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != otherSpan[i]); + ret[index++] = (span[i] != otherSpan[i]); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer column, double scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != scalar); + ret[index++] = (span[i] != scalar); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= otherSpan[i]); + ret[index++] = (span[i] >= otherSpan[i]); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, double scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= scalar); + ret[index++] = (span[i] >= scalar); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= otherSpan[i]); + ret[index++] = (span[i] <= otherSpan[i]); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, double scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= scalar); + ret[index++] = (span[i] <= scalar); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > otherSpan[i]); + ret[index++] = (span[i] > otherSpan[i]); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, double scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > scalar); + ret[index++] = (span[i] > scalar); } } } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < otherSpan[i]); + ret[index++] = (span[i] < otherSpan[i]); } } } public void ElementwiseLessThan(PrimitiveColumnContainer column, double scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < scalar); + ret[index++] = (span[i] < scalar); } } } @@ -2279,139 +2331,151 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == otherSpan[i]); + ret[index++] = (span[i] == otherSpan[i]); } } } public void ElementwiseEquals(PrimitiveColumnContainer column, float scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == scalar); + ret[index++] = (span[i] == scalar); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != otherSpan[i]); + ret[index++] = (span[i] != otherSpan[i]); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer column, float scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != scalar); + ret[index++] = (span[i] != scalar); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= otherSpan[i]); + ret[index++] = (span[i] >= otherSpan[i]); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, float scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= scalar); + ret[index++] = (span[i] >= scalar); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= otherSpan[i]); + ret[index++] = (span[i] <= otherSpan[i]); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, float scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= scalar); + ret[index++] = (span[i] <= scalar); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > otherSpan[i]); + ret[index++] = (span[i] > otherSpan[i]); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, float scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > scalar); + ret[index++] = (span[i] > scalar); } } } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < otherSpan[i]); + ret[index++] = (span[i] < otherSpan[i]); } } } public void ElementwiseLessThan(PrimitiveColumnContainer column, float scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < scalar); + ret[index++] = (span[i] < scalar); } } } @@ -2740,139 +2804,151 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == otherSpan[i]); + ret[index++] = (span[i] == otherSpan[i]); } } } public void ElementwiseEquals(PrimitiveColumnContainer column, int scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == scalar); + ret[index++] = (span[i] == scalar); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != otherSpan[i]); + ret[index++] = (span[i] != otherSpan[i]); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer column, int scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != scalar); + ret[index++] = (span[i] != scalar); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= otherSpan[i]); + ret[index++] = (span[i] >= otherSpan[i]); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, int scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= scalar); + ret[index++] = (span[i] >= scalar); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= otherSpan[i]); + ret[index++] = (span[i] <= otherSpan[i]); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, int scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= scalar); + ret[index++] = (span[i] <= scalar); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > otherSpan[i]); + ret[index++] = (span[i] > otherSpan[i]); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, int scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > scalar); + ret[index++] = (span[i] > scalar); } } } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < otherSpan[i]); + ret[index++] = (span[i] < otherSpan[i]); } } } public void ElementwiseLessThan(PrimitiveColumnContainer column, int scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < scalar); + ret[index++] = (span[i] < scalar); } } } @@ -3201,139 +3277,151 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == otherSpan[i]); + ret[index++] = (span[i] == otherSpan[i]); } } } public void ElementwiseEquals(PrimitiveColumnContainer column, long scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == scalar); + ret[index++] = (span[i] == scalar); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != otherSpan[i]); + ret[index++] = (span[i] != otherSpan[i]); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer column, long scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != scalar); + ret[index++] = (span[i] != scalar); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= otherSpan[i]); + ret[index++] = (span[i] >= otherSpan[i]); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, long scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= scalar); + ret[index++] = (span[i] >= scalar); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= otherSpan[i]); + ret[index++] = (span[i] <= otherSpan[i]); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, long scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= scalar); + ret[index++] = (span[i] <= scalar); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > otherSpan[i]); + ret[index++] = (span[i] > otherSpan[i]); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, long scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > scalar); + ret[index++] = (span[i] > scalar); } } } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < otherSpan[i]); + ret[index++] = (span[i] < otherSpan[i]); } } } public void ElementwiseLessThan(PrimitiveColumnContainer column, long scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < scalar); + ret[index++] = (span[i] < scalar); } } } @@ -3662,139 +3750,151 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == otherSpan[i]); + ret[index++] = (span[i] == otherSpan[i]); } } } public void ElementwiseEquals(PrimitiveColumnContainer column, sbyte scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == scalar); + ret[index++] = (span[i] == scalar); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != otherSpan[i]); + ret[index++] = (span[i] != otherSpan[i]); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer column, sbyte scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != scalar); + ret[index++] = (span[i] != scalar); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= otherSpan[i]); + ret[index++] = (span[i] >= otherSpan[i]); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, sbyte scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= scalar); + ret[index++] = (span[i] >= scalar); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= otherSpan[i]); + ret[index++] = (span[i] <= otherSpan[i]); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, sbyte scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= scalar); + ret[index++] = (span[i] <= scalar); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > otherSpan[i]); + ret[index++] = (span[i] > otherSpan[i]); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, sbyte scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > scalar); + ret[index++] = (span[i] > scalar); } } } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < otherSpan[i]); + ret[index++] = (span[i] < otherSpan[i]); } } } public void ElementwiseLessThan(PrimitiveColumnContainer column, sbyte scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < scalar); + ret[index++] = (span[i] < scalar); } } } @@ -4123,139 +4223,151 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == otherSpan[i]); + ret[index++] = (span[i] == otherSpan[i]); } } } public void ElementwiseEquals(PrimitiveColumnContainer column, short scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == scalar); + ret[index++] = (span[i] == scalar); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != otherSpan[i]); + ret[index++] = (span[i] != otherSpan[i]); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer column, short scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != scalar); + ret[index++] = (span[i] != scalar); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= otherSpan[i]); + ret[index++] = (span[i] >= otherSpan[i]); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, short scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= scalar); + ret[index++] = (span[i] >= scalar); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= otherSpan[i]); + ret[index++] = (span[i] <= otherSpan[i]); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, short scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= scalar); + ret[index++] = (span[i] <= scalar); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > otherSpan[i]); + ret[index++] = (span[i] > otherSpan[i]); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, short scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > scalar); + ret[index++] = (span[i] > scalar); } } } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < otherSpan[i]); + ret[index++] = (span[i] < otherSpan[i]); } } } public void ElementwiseLessThan(PrimitiveColumnContainer column, short scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < scalar); + ret[index++] = (span[i] < scalar); } } } @@ -4584,139 +4696,151 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == otherSpan[i]); + ret[index++] = (span[i] == otherSpan[i]); } } } public void ElementwiseEquals(PrimitiveColumnContainer column, uint scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == scalar); + ret[index++] = (span[i] == scalar); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != otherSpan[i]); + ret[index++] = (span[i] != otherSpan[i]); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer column, uint scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != scalar); + ret[index++] = (span[i] != scalar); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= otherSpan[i]); + ret[index++] = (span[i] >= otherSpan[i]); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, uint scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= scalar); + ret[index++] = (span[i] >= scalar); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= otherSpan[i]); + ret[index++] = (span[i] <= otherSpan[i]); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, uint scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= scalar); + ret[index++] = (span[i] <= scalar); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > otherSpan[i]); + ret[index++] = (span[i] > otherSpan[i]); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, uint scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > scalar); + ret[index++] = (span[i] > scalar); } } } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < otherSpan[i]); + ret[index++] = (span[i] < otherSpan[i]); } } } public void ElementwiseLessThan(PrimitiveColumnContainer column, uint scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < scalar); + ret[index++] = (span[i] < scalar); } } } @@ -5045,139 +5169,151 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == otherSpan[i]); + ret[index++] = (span[i] == otherSpan[i]); } } } public void ElementwiseEquals(PrimitiveColumnContainer column, ulong scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == scalar); + ret[index++] = (span[i] == scalar); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != otherSpan[i]); + ret[index++] = (span[i] != otherSpan[i]); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer column, ulong scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != scalar); + ret[index++] = (span[i] != scalar); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= otherSpan[i]); + ret[index++] = (span[i] >= otherSpan[i]); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, ulong scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= scalar); + ret[index++] = (span[i] >= scalar); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= otherSpan[i]); + ret[index++] = (span[i] <= otherSpan[i]); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, ulong scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= scalar); + ret[index++] = (span[i] <= scalar); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > otherSpan[i]); + ret[index++] = (span[i] > otherSpan[i]); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, ulong scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > scalar); + ret[index++] = (span[i] > scalar); } } } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < otherSpan[i]); + ret[index++] = (span[i] < otherSpan[i]); } } } public void ElementwiseLessThan(PrimitiveColumnContainer column, ulong scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < scalar); + ret[index++] = (span[i] < scalar); } } } @@ -5506,139 +5642,151 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == otherSpan[i]); + ret[index++] = (span[i] == otherSpan[i]); } } } public void ElementwiseEquals(PrimitiveColumnContainer column, ushort scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == scalar); + ret[index++] = (span[i] == scalar); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != otherSpan[i]); + ret[index++] = (span[i] != otherSpan[i]); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer column, ushort scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != scalar); + ret[index++] = (span[i] != scalar); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= otherSpan[i]); + ret[index++] = (span[i] >= otherSpan[i]); } } } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, ushort scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] >= scalar); + ret[index++] = (span[i] >= scalar); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= otherSpan[i]); + ret[index++] = (span[i] <= otherSpan[i]); } } } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, ushort scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] <= scalar); + ret[index++] = (span[i] <= scalar); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > otherSpan[i]); + ret[index++] = (span[i] > otherSpan[i]); } } } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, ushort scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] > scalar); + ret[index++] = (span[i] > scalar); } } } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < otherSpan[i]); + ret[index++] = (span[i] < otherSpan[i]); } } } public void ElementwiseLessThan(PrimitiveColumnContainer column, ushort scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] < scalar); + ret[index++] = (span[i] < scalar); } } } @@ -5751,47 +5899,51 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == otherSpan[i]); + ret[index++] = (span[i] == otherSpan[i]); } } } public void ElementwiseEquals(PrimitiveColumnContainer column, DateTime scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] == scalar); + ret[index++] = (span[i] == scalar); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < left.Buffers.Count; b++) { var span = left.Buffers[b].ReadOnlySpan; var otherSpan = right.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != otherSpan[i]); + ret[index++] = (span[i] != otherSpan[i]); } } } public void ElementwiseNotEquals(PrimitiveColumnContainer column, DateTime scalar, PrimitiveColumnContainer ret) { + long index = 0; for (int b = 0; b < column.Buffers.Count; b++) { var span = column.Buffers[b].ReadOnlySpan; for (int i = 0; i < span.Length; i++) { - ret[i] = (span[i] != scalar); + ret[index++] = (span[i] != scalar); } } } diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnArithmetic.tt b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnArithmetic.tt index 4262d84c45..a1543efd2d 100644 --- a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnArithmetic.tt +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnArithmetic.tt @@ -58,6 +58,9 @@ namespace Microsoft.Data.Analysis <# if ((method.IsNumeric && !type.SupportsNumeric) || (method.IsBitwise && !type.SupportsBitwise) || (type.UnsupportedMethods.Contains(method.MethodName))) { #> throw new NotSupportedException(); <# } else if (method.Operator != null) { #> +<# if (method.MethodType == MethodType.Comparison || method.MethodType == MethodType.ComparisonScalar) { #> + long index = 0; +<# } #> for (int b = 0; b < <#= method.Op1Name #>.Buffers.Count; b++) { <# if (method.MethodType == MethodType.Comparison) { #> @@ -79,9 +82,9 @@ namespace Microsoft.Data.Analysis <# } else if (method.MethodType == MethodType.Binary) { #> span[i] = (<#=type.TypeName#>)(span[i] <#= method.Operator #> otherSpan[i]); <# } else if (method.MethodType == MethodType.Comparison) { #> - ret[i] = (span[i] <#= method.Operator #> otherSpan[i]); + ret[index++] = (span[i] <#= method.Operator #> otherSpan[i]); <# } else if (method.MethodType == MethodType.ComparisonScalar) { #> - ret[i] = (span[i] <#= method.Operator #> <#= method.Op2Name #>); + ret[index++] = (span[i] <#= method.Operator #> <#= method.Op2Name #>); <# } else {#> throw new NotImplementedException(); <# } #>