From 1df9cd1902cb1a2ce95772d928e86e8e88672137 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 28 Jan 2019 22:50:54 +0100 Subject: [PATCH] [tensor] use cblas alias in matmul, allow n-dimensional tensors --- src/ai/tensor.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ai/tensor.c b/src/ai/tensor.c index 0c94fc91..cbf2af95 100644 --- a/src/ai/tensor.c +++ b/src/ai/tensor.c @@ -228,8 +228,9 @@ void aubio_tensor_matmul(aubio_tensor_t *a, aubio_tensor_t *b, } } #else - cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, a->shape[0], - b->shape[1], b->shape[0], 1.F, a->buffer, a->shape[1], b->buffer, - b->shape[1], 0.F, c->buffer, b->shape[1]); + aubio_cblas__gemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, a->shape[0], + b->size/b->shape[0], b->shape[0], 1.F, a->buffer, a->size/a->shape[0], + b->buffer, + b->size/b->shape[0], 0.F, c->buffer, b->size/b->shape[0]); #endif } -- 2.11.0