Fix floor

This commit is contained in:
kradchen
2023-05-18 17:16:50 +08:00
parent bb56a89f8f
commit 28457dd99b

View File

@@ -204,7 +204,7 @@ Aurora::Matrix Aurora::round(const Aurora::Matrix &&matrix) {
Aurora::Matrix Aurora::floor(const Aurora::Matrix &matrix) {
auto output = malloc(matrix.getDataSize());
//for real part
vdRoundI(matrix.getDataSize(), matrix.getData(), SAME_STRIDE, output, SAME_STRIDE);
vdFloorI(matrix.getDataSize(), matrix.getData(), SAME_STRIDE, output, SAME_STRIDE);
if (matrix.getValueType() == Complex) {
//for imag part
vdFloorI(matrix.getDataSize(), matrix.getData() + 1, SAME_STRIDE, output + 1, SAME_STRIDE);
@@ -214,7 +214,7 @@ Aurora::Matrix Aurora::floor(const Aurora::Matrix &matrix) {
Aurora::Matrix Aurora::floor(const Aurora::Matrix &&matrix) {
//for real part
vdRoundI(matrix.getDataSize(), matrix.getData(), SAME_STRIDE, matrix.getData(), SAME_STRIDE);
vdFloorI(matrix.getDataSize(), matrix.getData(), SAME_STRIDE, matrix.getData(), SAME_STRIDE);
if (matrix.getValueType() == Complex) {
//for imag part
vdFloorI(matrix.getDataSize(), matrix.getData() + 1, SAME_STRIDE, matrix.getData() + 1, SAME_STRIDE);