projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
427a48c
)
[tensor] set initial max value to first element
author
Paul Brossier
<piem@piem.org>
Wed, 2 Jan 2019 21:54:55 +0000
(22:54 +0100)
committer
Paul Brossier
<piem@piem.org>
Wed, 2 Jan 2019 21:54:55 +0000
(22:54 +0100)
src/ai/tensor.c
patch
|
blob
|
history
diff --git
a/src/ai/tensor.c
b/src/ai/tensor.c
index
c8817b9
..
1d76d34
100644
(file)
--- a/
src/ai/tensor.c
+++ b/
src/ai/tensor.c
@@
-83,9
+83,9
@@
uint_t aubio_fmat_as_tensor(fmat_t *o, aubio_tensor_t *c) {
smpl_t aubio_tensor_max(aubio_tensor_t *t)
{
uint_t i;
- smpl_t max =
-1000000
;
+ smpl_t max =
t->buffer[0]
;
for (i = 0; i < t->size; i++) {
- max = MAX(t->
data[0]
[i], max);
+ max = MAX(t->
buffer
[i], max);
}
return max;
}