Changeset 1120f86 for src/fmat.c


Ignore:
Timestamp:
Apr 21, 2016, 6:21:43 PM (4 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
ae5d58a
Parents:
c4d251c
Message:

src/{fvec,cvec,fmat,lvec}.{c,h}: added const qualifiers to unmodified pointers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/fmat.c

    rc4d251c r1120f86  
    5454}
    5555
    56 smpl_t fmat_get_sample(fmat_t *s, uint_t channel, uint_t position) {
     56smpl_t fmat_get_sample(const fmat_t *s, uint_t channel, uint_t position) {
    5757  return s->data[channel][position];
    5858}
    5959
    60 void fmat_get_channel(fmat_t *s, uint_t channel, fvec_t *output) {
     60void fmat_get_channel(const fmat_t *s, uint_t channel, fvec_t *output) {
    6161  output->data = s->data[channel];
    6262  output->length = s->length;
     
    6464}
    6565
    66 smpl_t * fmat_get_channel_data(fmat_t *s, uint_t channel) {
     66smpl_t * fmat_get_channel_data(const fmat_t *s, uint_t channel) {
    6767  return s->data[channel];
    6868}
    6969
    70 smpl_t ** fmat_get_data(fmat_t *s) {
     70smpl_t ** fmat_get_data(const fmat_t *s) {
    7171  return s->data;
    7272}
     
    7474/* helper functions */
    7575
    76 void fmat_print(fmat_t *s) {
     76void fmat_print(const fmat_t *s) {
    7777  uint_t i,j;
    7878  for (i=0; i< s->height; i++) {
     
    117117}
    118118
    119 void fmat_weight(fmat_t *s, fmat_t *weight) {
     119void fmat_weight(fmat_t *s, const fmat_t *weight) {
    120120  uint_t i,j;
    121121  uint_t length = MIN(s->length, weight->length);
     
    127127}
    128128
    129 void fmat_copy(fmat_t *s, fmat_t *t) {
     129void fmat_copy(const fmat_t *s, fmat_t *t) {
    130130  uint_t i;
    131131#if !HAVE_MEMCPY_HACKS
     
    155155}
    156156
    157 void fmat_vecmul(fmat_t *s, fvec_t *scale, fvec_t *output) {
     157void fmat_vecmul(const fmat_t *s, const fvec_t *scale, fvec_t *output) {
    158158  uint_t k;
    159159#if 0
Note: See TracChangeset for help on using the changeset viewer.