// Copyright (c) 2018 Intel Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

#ifdef _IPP_OMP_STATIC
#define LIB_THREADS " threaded"
#define CORE_THREADS " (threaded)"
#else 
#define LIB_THREADS ""
#define CORE_THREADS ""
#endif

#define GET_LIBRARY_NAME( cpu, is ) #cpu, IPP_LIB_SHORTNAME() " " is " (" #cpu LIB_THREADS ")"

static const IppLibraryVersion SLIBVERNAME = {

/* major, minor, update (ex-majorBuild) */
    BASE_VERSION(),

#if defined IPP_REVISION
    IPP_REVISION,
#else
    -1,
#endif /* IPP_REVISION */

#if defined( _CORE )
    /*GET_LIBRARY_NAME( core )*/
    "core",
    "ippCore" CORE_THREADS

#elif ( _IPP_ARCH == _IPP_ARCH_IA32 ) || ( _IPP_ARCH == _IPP_ARCH_LP32 )
    #if ( _IPP == _IPP_M6 )
        GET_LIBRARY_NAME( m6, "SSE" )
    #elif ( _IPP == _IPP_H9 )
        GET_LIBRARY_NAME( h9, "AVX2" )
    #elif ( _IPP == _IPP_G9 )
        GET_LIBRARY_NAME( g9, "AVX" )
    #elif ( _IPP == _IPP_P8 )
        GET_LIBRARY_NAME( p8, "SSE4.1/4.2" )
    #elif ( _IPPLP32 == _IPPLP32_S8 )
        GET_LIBRARY_NAME( s8, "Atom" )
    #elif ( _IPP == _IPP_V8 )
        GET_LIBRARY_NAME( v8, "SSSE3" )
    #elif ( _IPP == _IPP_T7 )
        GET_LIBRARY_NAME( t7, "SSE3" )
    #elif ( _IPP == _IPP_W7 )
        GET_LIBRARY_NAME( w7, "SSE2" )
    #elif ( _IPP == _IPP_A6 )
        GET_LIBRARY_NAME( a6, "SSE" )
    #else
        GET_LIBRARY_NAME( px, "PX" )
    #endif

#elif ( _IPP_ARCH == _IPP_ARCH_IA64 )
    #if ( _IPP64 == _IPP64_I7 )
        GET_LIBRARY_NAME( i7, "" )
    #else
        GET_LIBRARY_NAME( ix, "" )
    #endif

#elif ( _IPP_ARCH == _IPP_ARCH_EM64T ) || ( _IPP_ARCH == _IPP_ARCH_LP64 )
    #if ( _IPP32E == _IPP32E_E9 )
        GET_LIBRARY_NAME( e9, "AVX" )
    #elif ( _IPP32E == _IPP32E_L9 )
        GET_LIBRARY_NAME( l9, "AVX2" )
    #elif ( _IPP32E == _IPP32E_Y8 )
        GET_LIBRARY_NAME( y8, "SSE4.1/4.2" )
    #elif ( _IPPLP64 == _IPPLP64_N8 )
        GET_LIBRARY_NAME( n8, "Atom" )
    #elif ( _IPP32E == _IPP32E_U8 )
        GET_LIBRARY_NAME( u8, "SSSE3" )
    #elif ( _IPP32E == _IPP32E_M7 )
        GET_LIBRARY_NAME( m7, "SSE3" )
    #else
        GET_LIBRARY_NAME( mx, "PX" )
    #endif

#elif ( (_IPP_ARCH == _IPP_ARCH_LRB) || ((_IPP_ARCH == _IPP_ARCH_LRB2)))
    #if ( _IPPLRB == _IPPLRB_BX )
        GET_LIBRARY_NAME( bx, "PX" )
    #elif ( _IPPLRB == _IPPLRB_B1 )
        GET_LIBRARY_NAME( b1, "KNF" )
    #elif ( _IPPLRB == _IPPLRB_B2 )
        GET_LIBRARY_NAME( b2, "KNC" )
    #endif

#elif ( _IPP_ARCH == _IPP_ARCH_XSC )
    #if ( _IPPXSC == _IPPXSC_S1 )
        GET_LIBRARY_NAME( s1, "" )
    #elif ( _IPPXSC == _IPPXSC_S2 )
        GET_LIBRARY_NAME( s2, "" )
    #elif ( _IPPXSC == _IPPXSC_C2 )
        GET_LIBRARY_NAME( c2, "" )
    #else
        GET_LIBRARY_NAME( sx, "PX" )
    #endif

#else
    #error ARCH not supported

#endif

#if defined( TICKTOCK )
  "+"
#endif

/* release Version (by Manager)    */
   ,STR_VERSION()

/* BuildDate (by QA person)        */
   ,__DATE__

};
