View Source

{section:border=true}
{column:width=70%}

h2. \_OPENMP Macro Value in OpenMP 3.0

In this implementation, when a program is compiled with the \-xopenmp compiler option, the \_OPENMP macro value is defined to be *200805*, where *2008* and *05* are the year and month of the OpenMP Specification Version 3.0. See Section 2.2, p. 26, of the Specification.

*Example (C/C++):*
{noformat}
#include <stdio.h>

int main()
{
#ifdef _OPENMP
printf("The _OPENMP macro is defined to have the value %d\n", _OPENMP);
#else
printf("The _OPENMP macro is not defined\n");
#endif

return 0;
}


% cc -xO3 test.c
% a.out
The _OPENMP macro is not defined

% cc -xO3 -xopenmp test.c
% a.out
The _OPENMP macro is defined to have the value 200805
{noformat}

{column}
{column:width=30%}
{panel:title=OpenMP 3.0 Features in Express 7.08}
{children:page=Sun Studio OpenMP}
{panel}
{column}
{section}

The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact