English 中文(简体)
全球变量与开放式管理计划
原标题:Global variable with OpenMP

开放问题 多读法议员:

底线是否共享所有全球变量? 如何使某些全球变数变得私人化,以主人 ?

增 编

PS:它是一部C法典。

问题回答

正确回顾

#pragma omp threadprivate

全球变数是微薄的,如果必须初步确定,则你必须使用第一份指令(即认为正确的名称)。 阅读的私人变量也可能受到重大处罚,因为一些应用的变式接入成为功能要求。





相关问题
Global state in asp.net mvc application

Problem: Our web console shows a list of all computers on which our application is installed. Each machine has some identification information that can be associated with it. Simple strings like ...

How to avoid global variables in JavaScript?

We all know that global variables are anything but best practice. But there are several instances when it is difficult to code without them. What techniques do you use to avoid the use of global ...

Is there a better way of recreating $_SERVER[ QUERY_STRING ]

I want to be able to return all of the parameters that are being passed into a specific page using PHP. $_SERVER[ QUERY_STRING ]; Seems to perform this task adequately, however I have heard many ...

"Global" variable scope in PHP

I have a section of code like the following: ---- file.php ---- require_once("mylib.php"); function($a,$b) { $r = $_GLOBALS[ someGlobal ]; echo $r; } ---- mylib.php ---- $_GLOBALS[ ...

热门标签