projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75e0b81
)
[tensor] add warning in aubio_tensor_as_fmat, to be avoided
author
Paul Brossier
<piem@piem.org>
Tue, 29 Jan 2019 02:31:38 +0000
(
03:31
+0100)
committer
Paul Brossier
<piem@piem.org>
Wed, 29 Dec 2021 16:52:02 +0000
(11:52 -0500)
src/ai/tensor.c
patch
|
blob
|
history
diff --git
a/src/ai/tensor.c
b/src/ai/tensor.c
index
976706a
..
a15818e
100644
(file)
--- a/
src/ai/tensor.c
+++ b/
src/ai/tensor.c
@@
-93,6
+93,8
@@
uint_t aubio_tensor_as_fmat(aubio_tensor_t *c, fmat_t *o) {
o->height = c->shape[0];
o->length = c->size / c->shape[0];
o->data = c->data;
+ // o was allocated on the stack, data[1] may be NULL
+ AUBIO_WRN("aubio_tensor_as_fmat will not create a usable table of rows\n");
return AUBIO_OK;
}