Changeset f90051d


Ignore:
Timestamp:
Dec 29, 2021, 5:51:46 PM (3 weeks ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/cnn, feature/crepe
Children:
49e7171
Parents:
b496aa8
git-author:
Paul Brossier <piem@piem.org> (01/02/19 22:57:49)
git-committer:
Paul Brossier <piem@piem.org> (12/29/21 17:51:46)
Message:

[tensor] add have_same_size

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ai/tensor.c

    rb496aa8 rf90051d  
    111111}
    112112
     113uint_t aubio_tensor_have_same_size(aubio_tensor_t *t, aubio_tensor_t *s)
     114{
     115  uint_t n;
     116  if (!t || !s) return 0;
     117  if (t->ndim != s->ndim) return 0;
     118  if (t->size != s->size) return 0;
     119  n = t->ndim;
     120  while (n--) {
     121    if (t->shape[n] != s->shape[n]) {
     122      return 0;
     123    }
     124  }
     125  return 1;
     126}
     127
    113128smpl_t aubio_tensor_max(aubio_tensor_t *t)
    114129{
Note: See TracChangeset for help on using the changeset viewer.