eclipse 我在哪里可以获得 OpenMP 的 .h 文件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4343164/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 15:26:28  来源:igfitidea点击:

Where can i get the .h file for OpenMP?

ceclipseopenmpparallel-processing

提问by tomermes

I'm searching for the omp.hfile for using it in eclipse. I failed to find it in openmp.org.

我正在寻找omp.h在 eclipse 中使用它的文件。我在 openmp.org 中找不到它。

Where do I find omp.h?

我在哪里找到omp.h

thanks.

谢谢。

回答by Dat Chu

Under Linux, you can find a file by

在Linux下,您可以通过以下方式找到文件

locate omp.h

Have you tried to simply use it with

你有没有试过简单地使用它

#include <omp.h>

and add the openmp flag to your g++ compiler flag?

并将 openmp 标志添加到您的 g++ 编译器标志中?

g++ -fopenmp sample.c

回答by jww

Where do I find omp.h?

我在哪里找到omp.h

On Ubuntu 14:

在 Ubuntu 14 上:

$ find /usr -name omp.h
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/omp.h
/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/include/omp.h

回答by arsenm

I think it's essentially a compiler builtin, so you won't find an actual header file for it. You do however need to use whatever flags the compiler uses for OpenMP.

我认为它本质上是一个内置的编译器,所以你不会找到它的实际头文件。但是,您确实需要使用编译器用于 OpenMP 的任何标志。