Skip to content

Latest commit

 

History

History
48 lines (47 loc) · 951 Bytes

a-30-use-of-reprivatization.md

File metadata and controls

48 lines (47 loc) · 951 Bytes
title A.30 Use of Reprivatization | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-windows
ms.tgt_pltfrm
ms.topic article
dev_langs
C++
ms.assetid 26529090-6c39-40f2-b806-e12374d6b5f8
caps.latest.revision 5
author mikeblome
ms.author mblome
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

A.30 Use of Reprivatization

The following example demonstrates the reprivatization of variables. Private variables can be marked private again in a nested directive. They do not have to be shared in the enclosing parallel region.

int i, a;  
...  
#pragma omp parallel private(a)  
{  
  ...  
  #pragma omp parallel for private(a)  
  for (i=0; i<10; i++)  
     {  
       ...  
     }  
}