求【OpenMP并行运算的头文件】

时间:2022-12-20 02:40:36
本来通过远程客户端操作16核机,无奈最近线路出现故障,只能用手边的4核机进行操作。但是缺少omp.h头文件,有没有人有这个库文件,帮忙发给我。谢谢 求【OpenMP并行运算的头文件】求【OpenMP并行运算的头文件】

4 个解决方案

#1


C:\Program Files\Microsoft Visual Studio 9.0\VC\include\omp.h
//-----------------------------------------------------------------------------
// OpenMP runtime support library for Visual C++
// Copyright (C) Microsoft Corporation.  All rights reserved.
//-----------------------------------------------------------------------------

// OpenMP C/C++ Version 2.0 March 2002

#pragma once

#if defined(__cplusplus)
extern "C" {
#endif

#define _OMPAPI     __cdecl

#if !defined(_OMP_LOCK_T)
#define _OMP_LOCK_T
typedef void * omp_lock_t;
#endif

#if !defined(_OMP_NEST_LOCK_T)
#define _OMP_NEST_LOCK_T
typedef void * omp_nest_lock_t;
#endif

#if !defined(_OPENMP)

#if defined(_DEBUG)
    #pragma comment(lib, "vcompd")
#else   // _DEBUG
    #pragma comment(lib, "vcomp")
#endif  // _DEBUG

#endif // _OPENMP

#if !defined(_OPENMP_NOFORCE_MANIFEST)

    #include <ompassem.h>

    #if defined(_DEBUG)

        #if defined(_M_IX86)
            #pragma comment(linker,"/manifestdependency:\"type='win32' "            \
                "name='" __OPENMP_ASSEMBLY_NAME_PREFIX ".DebugOpenMP' "         \
                "version='" __OPENMP_ASSEMBLY_VERSION "' "                          \
                "processorArchitecture='x86' "                                  \
                "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
        #elif defined(_M_AMD64)
            #pragma comment(linker,"/manifestdependency:\"type='win32' "            \
                "name='" __OPENMP_ASSEMBLY_NAME_PREFIX ".DebugOpenMP' "         \
                "version='" __OPENMP_ASSEMBLY_VERSION "' "                          \
                "processorArchitecture='amd64' "                                  \
                "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
        #elif defined(_M_IA64)
            #pragma comment(linker,"/manifestdependency:\"type='win32' "            \
                "name='" __OPENMP_ASSEMBLY_NAME_PREFIX ".DebugOpenMP' "         \
                "version='" __OPENMP_ASSEMBLY_VERSION "' "                          \
                "processorArchitecture='ia64' "                                  \
                "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
        #endif

    #else   // _DEBUG

        #if defined(_M_IX86)
            #pragma comment(linker,"/manifestdependency:\"type='win32' "            \
                "name='" __OPENMP_ASSEMBLY_NAME_PREFIX ".OpenMP' "              \
                "version='" __OPENMP_ASSEMBLY_VERSION "' "                          \
                "processorArchitecture='x86' "                                  \
                "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
        #elif defined(_M_AMD64)
            #pragma comment(linker,"/manifestdependency:\"type='win32' "            \
                "name='" __OPENMP_ASSEMBLY_NAME_PREFIX ".OpenMP' "              \
                "version='" __OPENMP_ASSEMBLY_VERSION "' "                          \
                "processorArchitecture='amd64' "                                  \
                "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
        #elif defined(_M_IA64)
            #pragma comment(linker,"/manifestdependency:\"type='win32' "            \
                "name='" __OPENMP_ASSEMBLY_NAME_PREFIX ".OpenMP' "              \
                "version='" __OPENMP_ASSEMBLY_VERSION "' "                          \
                "processorArchitecture='ia64' "                                  \
                "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
        #endif

    #endif  // _DEBUG

#endif  // _OPENMP_NOFORCE_MANIFEST

#if !defined(_OMPIMP)
#define _OMPIMP     __declspec(dllimport)
#endif

_OMPIMP void _OMPAPI
omp_set_num_threads(
    int _Num_threads
    );

_OMPIMP int _OMPAPI
omp_get_num_threads(
    void
    );

_OMPIMP int _OMPAPI
omp_get_max_threads(
    void
    );

_OMPIMP int _OMPAPI
omp_get_thread_num(
    void
    );

_OMPIMP int _OMPAPI
omp_get_num_procs(
    void
    );

_OMPIMP void _OMPAPI
omp_set_dynamic(
    int _Dynamic_threads
    );

_OMPIMP int _OMPAPI
omp_get_dynamic(
    void
    );

_OMPIMP int _OMPAPI
omp_in_parallel(
    void
    );

_OMPIMP void _OMPAPI
omp_set_nested(
    int _Nested
    );

_OMPIMP int _OMPAPI
omp_get_nested(
    void
    );

_OMPIMP void _OMPAPI
omp_init_lock(
    omp_lock_t * _Lock
    );

_OMPIMP void _OMPAPI
omp_destroy_lock(
    omp_lock_t * _Lock
    );

_OMPIMP void _OMPAPI
omp_set_lock(
    omp_lock_t * _Lock
    );

_OMPIMP void _OMPAPI
omp_unset_lock(
    omp_lock_t * _Lock
    );

_OMPIMP int _OMPAPI
omp_test_lock(
    omp_lock_t * _Lock
    );

_OMPIMP void _OMPAPI
omp_init_nest_lock(
    omp_nest_lock_t * _Lock
    );

_OMPIMP void _OMPAPI
omp_destroy_nest_lock(
    omp_nest_lock_t * _Lock
    );

_OMPIMP void _OMPAPI
omp_set_nest_lock(
    omp_nest_lock_t * _Lock
    );

_OMPIMP void _OMPAPI
omp_unset_nest_lock(
    omp_nest_lock_t * _Lock
    );

_OMPIMP int _OMPAPI
omp_test_nest_lock(
    omp_nest_lock_t * _Lock
    );

_OMPIMP double _OMPAPI
omp_get_wtime(
    void
    );

_OMPIMP double _OMPAPI
omp_get_wtick(
    void
    );

#if defined(__cplusplus)
}
#endif

#2


引用 1 楼 zhao4zhong1 的回复:
C:\Program Files\Microsoft Visual Studio 9.0\VC\include\omp.h
C/C++ code?12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061……
还缺少一个ompassem.h,您有么?

#3


C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ompassem.h
/***
*ompassem.h - Libraries Assembly information
*
*       Copyright (c) Microsoft Corporation. All rights reserved.
*
*Purpose:
*       This file has information about Libraries Assembly version.
*
*
****/

#pragma once

#ifndef _VC_ASSEMBLY_PUBLICKEYTOKEN
#define _VC_ASSEMBLY_PUBLICKEYTOKEN "1fc8b3b9a1e18e3b"
#endif

#ifndef __OPENMP_ASSEMBLY_VERSION
#define __OPENMP_ASSEMBLY_VERSION "9.0.21022.8"
#endif

#ifndef __OPENMP_ASSEMBLY_NAME_PREFIX
#define __OPENMP_ASSEMBLY_NAME_PREFIX "Microsoft.VC90"
#endif

#4


引用 3 楼 zhao4zhong1 的回复:
C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ompassem.h
C/C++ code?123456789101112131415161718192021222324/****ompassem.h - Libraries Assembly information**       Copyright (c……
Thanx very much 求【OpenMP并行运算的头文件】

#1


C:\Program Files\Microsoft Visual Studio 9.0\VC\include\omp.h
//-----------------------------------------------------------------------------
// OpenMP runtime support library for Visual C++
// Copyright (C) Microsoft Corporation.  All rights reserved.
//-----------------------------------------------------------------------------

// OpenMP C/C++ Version 2.0 March 2002

#pragma once

#if defined(__cplusplus)
extern "C" {
#endif

#define _OMPAPI     __cdecl

#if !defined(_OMP_LOCK_T)
#define _OMP_LOCK_T
typedef void * omp_lock_t;
#endif

#if !defined(_OMP_NEST_LOCK_T)
#define _OMP_NEST_LOCK_T
typedef void * omp_nest_lock_t;
#endif

#if !defined(_OPENMP)

#if defined(_DEBUG)
    #pragma comment(lib, "vcompd")
#else   // _DEBUG
    #pragma comment(lib, "vcomp")
#endif  // _DEBUG

#endif // _OPENMP

#if !defined(_OPENMP_NOFORCE_MANIFEST)

    #include <ompassem.h>

    #if defined(_DEBUG)

        #if defined(_M_IX86)
            #pragma comment(linker,"/manifestdependency:\"type='win32' "            \
                "name='" __OPENMP_ASSEMBLY_NAME_PREFIX ".DebugOpenMP' "         \
                "version='" __OPENMP_ASSEMBLY_VERSION "' "                          \
                "processorArchitecture='x86' "                                  \
                "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
        #elif defined(_M_AMD64)
            #pragma comment(linker,"/manifestdependency:\"type='win32' "            \
                "name='" __OPENMP_ASSEMBLY_NAME_PREFIX ".DebugOpenMP' "         \
                "version='" __OPENMP_ASSEMBLY_VERSION "' "                          \
                "processorArchitecture='amd64' "                                  \
                "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
        #elif defined(_M_IA64)
            #pragma comment(linker,"/manifestdependency:\"type='win32' "            \
                "name='" __OPENMP_ASSEMBLY_NAME_PREFIX ".DebugOpenMP' "         \
                "version='" __OPENMP_ASSEMBLY_VERSION "' "                          \
                "processorArchitecture='ia64' "                                  \
                "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
        #endif

    #else   // _DEBUG

        #if defined(_M_IX86)
            #pragma comment(linker,"/manifestdependency:\"type='win32' "            \
                "name='" __OPENMP_ASSEMBLY_NAME_PREFIX ".OpenMP' "              \
                "version='" __OPENMP_ASSEMBLY_VERSION "' "                          \
                "processorArchitecture='x86' "                                  \
                "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
        #elif defined(_M_AMD64)
            #pragma comment(linker,"/manifestdependency:\"type='win32' "            \
                "name='" __OPENMP_ASSEMBLY_NAME_PREFIX ".OpenMP' "              \
                "version='" __OPENMP_ASSEMBLY_VERSION "' "                          \
                "processorArchitecture='amd64' "                                  \
                "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
        #elif defined(_M_IA64)
            #pragma comment(linker,"/manifestdependency:\"type='win32' "            \
                "name='" __OPENMP_ASSEMBLY_NAME_PREFIX ".OpenMP' "              \
                "version='" __OPENMP_ASSEMBLY_VERSION "' "                          \
                "processorArchitecture='ia64' "                                  \
                "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
        #endif

    #endif  // _DEBUG

#endif  // _OPENMP_NOFORCE_MANIFEST

#if !defined(_OMPIMP)
#define _OMPIMP     __declspec(dllimport)
#endif

_OMPIMP void _OMPAPI
omp_set_num_threads(
    int _Num_threads
    );

_OMPIMP int _OMPAPI
omp_get_num_threads(
    void
    );

_OMPIMP int _OMPAPI
omp_get_max_threads(
    void
    );

_OMPIMP int _OMPAPI
omp_get_thread_num(
    void
    );

_OMPIMP int _OMPAPI
omp_get_num_procs(
    void
    );

_OMPIMP void _OMPAPI
omp_set_dynamic(
    int _Dynamic_threads
    );

_OMPIMP int _OMPAPI
omp_get_dynamic(
    void
    );

_OMPIMP int _OMPAPI
omp_in_parallel(
    void
    );

_OMPIMP void _OMPAPI
omp_set_nested(
    int _Nested
    );

_OMPIMP int _OMPAPI
omp_get_nested(
    void
    );

_OMPIMP void _OMPAPI
omp_init_lock(
    omp_lock_t * _Lock
    );

_OMPIMP void _OMPAPI
omp_destroy_lock(
    omp_lock_t * _Lock
    );

_OMPIMP void _OMPAPI
omp_set_lock(
    omp_lock_t * _Lock
    );

_OMPIMP void _OMPAPI
omp_unset_lock(
    omp_lock_t * _Lock
    );

_OMPIMP int _OMPAPI
omp_test_lock(
    omp_lock_t * _Lock
    );

_OMPIMP void _OMPAPI
omp_init_nest_lock(
    omp_nest_lock_t * _Lock
    );

_OMPIMP void _OMPAPI
omp_destroy_nest_lock(
    omp_nest_lock_t * _Lock
    );

_OMPIMP void _OMPAPI
omp_set_nest_lock(
    omp_nest_lock_t * _Lock
    );

_OMPIMP void _OMPAPI
omp_unset_nest_lock(
    omp_nest_lock_t * _Lock
    );

_OMPIMP int _OMPAPI
omp_test_nest_lock(
    omp_nest_lock_t * _Lock
    );

_OMPIMP double _OMPAPI
omp_get_wtime(
    void
    );

_OMPIMP double _OMPAPI
omp_get_wtick(
    void
    );

#if defined(__cplusplus)
}
#endif

#2


引用 1 楼 zhao4zhong1 的回复:
C:\Program Files\Microsoft Visual Studio 9.0\VC\include\omp.h
C/C++ code?12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061……
还缺少一个ompassem.h,您有么?

#3


C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ompassem.h
/***
*ompassem.h - Libraries Assembly information
*
*       Copyright (c) Microsoft Corporation. All rights reserved.
*
*Purpose:
*       This file has information about Libraries Assembly version.
*
*
****/

#pragma once

#ifndef _VC_ASSEMBLY_PUBLICKEYTOKEN
#define _VC_ASSEMBLY_PUBLICKEYTOKEN "1fc8b3b9a1e18e3b"
#endif

#ifndef __OPENMP_ASSEMBLY_VERSION
#define __OPENMP_ASSEMBLY_VERSION "9.0.21022.8"
#endif

#ifndef __OPENMP_ASSEMBLY_NAME_PREFIX
#define __OPENMP_ASSEMBLY_NAME_PREFIX "Microsoft.VC90"
#endif

#4


引用 3 楼 zhao4zhong1 的回复:
C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ompassem.h
C/C++ code?123456789101112131415161718192021222324/****ompassem.h - Libraries Assembly information**       Copyright (c……
Thanx very much 求【OpenMP并行运算的头文件】