From: Paul Brossier Date: Mon, 28 Jan 2019 21:50:54 +0000 (+0100) Subject: [tensor] use cblas alias in matmul, allow n-dimensional tensors X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=461a89f53e7eba3685a24d51fcbe06a72120f099;p=aubio.git [tensor] use cblas alias in matmul, allow n-dimensional tensors --- 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 }