Changeset 20c8769 for wscript


Ignore:
Timestamp:
Oct 1, 2017, 8:04:30 PM (7 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
Children:
f080cbf
Parents:
25cf957 (diff), 799d992 (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 'intel_ipp'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wscript

    r25cf957 r20c8769  
    5151            help_str = 'compile with fftw3 instead of ooura',
    5252            help_disable_str = 'do not compile with fftw3')
     53    add_option_enable_disable(ctx, 'intelipp', default = False,
     54            help_str = 'use Intel IPP libraries (auto)',
     55            help_disable_str = 'do not use Intel IPP libraries')
    5356    add_option_enable_disable(ctx, 'complex', default = False,
    5457            help_str ='compile with C99 complex',
     
    156159        # configure warnings
    157160        ctx.env.CFLAGS += ['/W4', '/D_CRT_SECURE_NO_WARNINGS']
     161        # ignore "possible loss of data" warnings
     162        ctx.env.CFLAGS += ['/wd4305', '/wd4244', '/wd4245', '/wd4267']
     163        # ignore "unreferenced formal parameter" warnings
     164        ctx.env.CFLAGS += ['/wd4100']
    158165        # set optimization level and runtime libs
    159166        if (ctx.options.build_type == "release"):
     
    245252
    246253        # tell emscripten functions we want to expose
    247         from python.lib.gen_external import get_c_declarations, get_cpp_objects_from_c_declarations, get_all_func_names_from_lib, generate_lib_from_c_declarations
     254        from python.lib.gen_external import get_c_declarations, \
     255                get_cpp_objects_from_c_declarations, get_all_func_names_from_lib, \
     256                generate_lib_from_c_declarations
    248257        c_decls = get_c_declarations(usedouble=False)  # emscripten can't use double
    249258        objects = list(get_cpp_objects_from_c_declarations(c_decls))
     
    283292    else:
    284293        ctx.msg('Checking if complex.h is enabled', 'no')
     294
     295    # check for Intel IPP
     296    if (ctx.options.enable_intelipp != False):
     297        has_ipp_headers = ctx.check(header_name=['ippcore.h', 'ippvm.h', 'ipps.h'],
     298                mandatory = False)
     299        has_ipp_libs = ctx.check(lib=['ippcore', 'ippvm', 'ipps'],
     300                uselib_store='INTEL_IPP', mandatory = False)
     301        if (has_ipp_headers and has_ipp_libs):
     302            ctx.msg('Checking if Intel IPP is available', 'yes')
     303            ctx.define('HAVE_INTEL_IPP', 1)
     304            if ctx.env.CC_NAME == 'msvc':
     305                # force linking multi-threaded static IPP libraries on Windows with msvc
     306                ctx.define('_IPP_SEQUENTIAL_STATIC', 1)
     307        else:
     308            ctx.msg('Checking if Intel IPP is available', 'no')
    285309
    286310    # check for fftw3
     
    307331        ctx.define('HAVE_FFTW3', 1)
    308332
    309     # fftw not enabled, use vDSP or ooura
     333    # fftw not enabled, use vDSP, intelIPP or ooura
    310334    if 'HAVE_FFTW3F' in ctx.env.define_key:
    311335        ctx.msg('Checking for FFT implementation', 'fftw3f')
     
    314338    elif 'HAVE_ACCELERATE' in ctx.env.define_key:
    315339        ctx.msg('Checking for FFT implementation', 'vDSP')
     340    elif 'HAVE_INTEL_IPP' in ctx.env.define_key:
     341        ctx.msg('Checking for FFT implementation', 'Intel IPP')
    316342    else:
    317343        ctx.msg('Checking for FFT implementation', 'ooura')
Note: See TracChangeset for help on using the changeset viewer.