Changeset 695e171 for src/aubio_priv.h


Ignore:
Timestamp:
Sep 6, 2015, 10:40:14 AM (9 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, sampler
Children:
3d30b90
Parents:
65c352e (diff), 827267b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'develop' into awhitening

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/aubio_priv.h

    r65c352e r695e171  
    11/*
    2   Copyright (C) 2003-2009 Paul Brossier <piem@aubio.org>
     2  Copyright (C) 2003-2015 Paul Brossier <piem@aubio.org>
    33
    44  This file is part of aubio.
     
    2121/** @file
    2222 * Private include file
    23  * 
     23 *
    2424 * This file is for inclusion from _within_ the library only.
    2525 */
     
    3030/*********************
    3131 *
    32  * External includes 
     32 * External includes
    3333 *
    3434 */
     
    6565#endif
    6666
     67#ifdef HAVE_ACCELERATE
     68#define HAVE_ATLAS 1
     69#include <Accelerate/Accelerate.h>
     70#elif HAVE_ATLAS_CBLAS_H
     71#define HAVE_ATLAS 1
     72#include <atlas/cblas.h>
     73#else
     74#undef HAVE_ATLAS
     75#endif
     76
     77#ifdef HAVE_ACCELERATE
     78#include <Accelerate/Accelerate.h>
     79#if !HAVE_AUBIO_DOUBLE
     80#define aubio_vDSP_mmov       vDSP_mmov
     81#define aubio_vDSP_vmul       vDSP_vmul
     82#define aubio_vDSP_vfill      vDSP_vfill
     83#define aubio_vDSP_meanv      vDSP_meanv
     84#define aubio_vDSP_sve        vDSP_sve
     85#define aubio_vDSP_maxv       vDSP_maxv
     86#define aubio_vDSP_maxvi      vDSP_maxvi
     87#define aubio_vDSP_minv       vDSP_minv
     88#define aubio_vDSP_minvi      vDSP_minvi
     89#else /* HAVE_AUBIO_DOUBLE */
     90#define aubio_vDSP_mmov       vDSP_mmovD
     91#define aubio_vDSP_vmul       vDSP_vmulD
     92#define aubio_vDSP_vfill      vDSP_vfillD
     93#define aubio_vDSP_meanv      vDSP_meanvD
     94#define aubio_vDSP_sve        vDSP_sveD
     95#define aubio_vDSP_maxv       vDSP_maxvD
     96#define aubio_vDSP_maxvi      vDSP_maxviD
     97#define aubio_vDSP_minv       vDSP_minvD
     98#define aubio_vDSP_minvi      vDSP_minviD
     99#endif /* HAVE_AUBIO_DOUBLE */
     100#endif /* HAVE_ACCELERATE */
     101
     102#ifdef HAVE_ATLAS
     103#if !HAVE_AUBIO_DOUBLE
     104#define aubio_catlas_set      catlas_sset
     105#define aubio_cblas_copy      cblas_scopy
     106#define aubio_cblas_swap      cblas_sswap
     107#define aubio_cblas_dot       cblas_sdot
     108#else /* HAVE_AUBIO_DOUBLE */
     109#define aubio_catlas_set      catlas_dset
     110#define aubio_cblas_copy      cblas_dcopy
     111#define aubio_cblas_swap      cblas_dswap
     112#define aubio_cblas_dot       cblas_ddot
     113#endif /* HAVE_AUBIO_DOUBLE */
     114#endif /* HAVE_ATLAS */
     115
     116#if !defined(HAVE_MEMCPY_HACKS) && !defined(HAVE_ACCELERATE) && !defined(HAVE_ATLAS)
     117#define HAVE_NOOPT 1
     118#else
     119#undef HAVE_NOOPT
     120#endif
     121
    67122#include "types.h"
    68123
     
    72127
    73128/****
    74  * 
     129 *
    75130 * SYSTEM INTERFACE
    76131 *
     
    197252#define DB2LIN(g) (POW(10.0,(g)*0.05f))
    198253#define LIN2DB(v) (20.0*LOG10(v))
    199 #define SQR(_a)   (_a*_a)
    200 
    201 #define MAX(a,b)  ( a > b ? a : b)
    202 #define MIN(a,b)  ( a < b ? a : b)
     254#define SQR(_a)   ((_a)*(_a))
     255
     256#ifndef MAX
     257#define MAX(a,b)  (((a)>(b))?(a):(b))
     258#endif /* MAX */
     259#ifndef MIN
     260#define MIN(a,b)  (((a)<(b))?(a):(b))
     261#endif /* MIN */
    203262
    204263#define ELEM_SWAP(a,b) { register smpl_t t=(a);(a)=(b);(b)=t; }
Note: See TracChangeset for help on using the changeset viewer.