source: tests/src/test-fmat.c @ 986131d

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5
Last change on this file since 986131d was 986131d, checked in by Eduard Müller <mueller.eduard@googlemail.com>, 7 years ago

Intel IPP support for aubio

See emuell/aubio/ intel_ipp2 for details please

  • Property mode set to 100644
File size: 789 bytes
Line 
1#include "aubio.h"
2#include "utils_tests.h"
3
4// create a new matrix and fill it with i * 1. + j * .1, where i is the row,
5// and j the column.
6
7int main (void)
8{
9  aubio_init();
10
11  uint_t height = 3, length = 9, i, j;
12  // create fmat_t object
13  fmat_t * mat = new_fmat (height, length);
14  for ( i = 0; i < mat->height; i++ ) {
15    for ( j = 0; j < mat->length; j++ ) {
16      // all elements are already initialized to 0.
17      assert(mat->data[i][j] == 0);
18      // setting element of row i, column j
19      mat->data[i][j] = i * 1. + j *.1;
20    }
21  }
22  fvec_t channel_onstack;
23  fvec_t *channel = &channel_onstack;
24  fmat_get_channel(mat, 1, channel);
25  fvec_print (channel);
26  // print out matrix
27  fmat_print(mat);
28  // destroy it
29  del_fmat(mat);
30
31  aubio_cleanup();
32 
33  return 0;
34}
35
Note: See TracBrowser for help on using the repository browser.