25.06.2015 Views

clause

clause

clause

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Private<br />

private(list) 表 明 list 中 所 列 变 量 为 组 内 线 程 私 有 变 量 .<br />

– 对 变 量 不 进 行 初 始 化 ( 有 构 造 函 数 除 外 )<br />

– 私 有 拷 贝 独 立 存 储 , 不 与 原 变 量 一 致<br />

main()<br />

{{<br />

int inti i = 10000;<br />

#pragma omp ompparallel private(i)<br />

{{<br />

i i = -10000;<br />

}}<br />

printf("%d\n",i);<br />

}}<br />

运 行 ::<br />

10000 10000<br />

main()<br />

{{<br />

int inti i = 10000;<br />

#pragma omp ompparallel<br />

{{<br />

i i = -10000;<br />

}}<br />

printf("%d\n",i);<br />

}}<br />

运 行 ::<br />

-10000<br />

2006 年 4 月 共 享 存 储 编 程 67/108

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!