head	1.19;
access;
symbols
	netbsd-10-2-RELEASE:1.14.2.1
	netbsd-9-5-RELEASE:1.10
	netbsd-11-0-RELEASE:1.18
	netbsd-11-0-RC7:1.18
	netbsd-11-0-RC6:1.18
	netbsd-11-0-RC5:1.18
	netbsd-11-0-RC4:1.18
	netbsd-11-0-RC3:1.18
	netbsd-11-0-RC2:1.18
	netbsd-11-0-RC1:1.18
	gcc-14-3-0:1.1.1.22
	perseant-exfatfs-base-20250801:1.18
	netbsd-11:1.18.0.2
	netbsd-11-base:1.18
	gcc-12-5-0:1.1.1.21
	netbsd-10-1-RELEASE:1.14.2.1
	perseant-exfatfs-base-20240630:1.17
	gcc-12-4-0:1.1.1.20
	perseant-exfatfs:1.16.0.2
	perseant-exfatfs-base:1.16
	netbsd-8-3-RELEASE:1.6.8.1
	netbsd-9-4-RELEASE:1.10
	netbsd-10-0-RELEASE:1.14.2.1
	netbsd-10-0-RC6:1.14.2.1
	netbsd-10-0-RC5:1.14.2.1
	netbsd-10-0-RC4:1.14.2.1
	netbsd-10-0-RC3:1.14.2.1
	netbsd-10-0-RC2:1.14.2.1
	netbsd-10-0-RC1:1.14.2.1
	gcc-12-3-0:1.1.1.19
	gcc-10-5-0:1.1.1.18
	netbsd-10:1.14.0.2
	netbsd-10-base:1.14
	netbsd-9-3-RELEASE:1.10
	gcc-10-4-0:1.1.1.17
	cjep_sun2x-base1:1.13
	cjep_sun2x:1.13.0.4
	cjep_sun2x-base:1.13
	cjep_staticlib_x-base1:1.13
	netbsd-9-2-RELEASE:1.10
	cjep_staticlib_x:1.13.0.2
	cjep_staticlib_x-base:1.13
	gcc-10-3-0:1.1.1.16
	netbsd-9-1-RELEASE:1.10
	gcc-9-3-0:1.1.1.15
	gcc-7-5-0:1.1.1.13
	phil-wifi-20200421:1.11
	phil-wifi-20200411:1.11
	is-mlppp:1.11.0.2
	is-mlppp-base:1.11
	phil-wifi-20200406:1.11
	netbsd-8-2-RELEASE:1.6.8.1
	gcc-8-4-0:1.1.1.14
	netbsd-9-0-RELEASE:1.10
	netbsd-9-0-RC2:1.10
	netbsd-9-0-RC1:1.10
	phil-wifi-20191119:1.11
	gcc-8-3-0:1.1.1.12
	netbsd-9:1.10.0.2
	netbsd-9-base:1.10
	phil-wifi-20190609:1.10
	netbsd-8-1-RELEASE:1.6.8.1
	netbsd-8-1-RC1:1.6.8.1
	pgoyette-compat-merge-20190127:1.8.2.2
	pgoyette-compat-20190127:1.10
	gcc-7-4-0:1.1.1.11
	pgoyette-compat-20190118:1.9
	pgoyette-compat-1226:1.9
	pgoyette-compat-1126:1.9
	gcc-6-5-0:1.1.1.10
	pgoyette-compat-1020:1.8
	pgoyette-compat-0930:1.8
	pgoyette-compat-0906:1.8
	netbsd-7-2-RELEASE:1.3.2.1
	pgoyette-compat-0728:1.8
	netbsd-8-0-RELEASE:1.6.8.1
	phil-wifi:1.8.0.4
	phil-wifi-base:1.8
	pgoyette-compat-0625:1.8
	netbsd-8-0-RC2:1.6.8.1
	pgoyette-compat-0521:1.8
	pgoyette-compat-0502:1.8
	pgoyette-compat-0422:1.8
	netbsd-8-0-RC1:1.6.8.1
	pgoyette-compat-0415:1.8
	pgoyette-compat-0407:1.8
	pgoyette-compat-0330:1.8
	pgoyette-compat-0322:1.8
	pgoyette-compat-0315:1.8
	netbsd-7-1-2-RELEASE:1.3.2.1
	pgoyette-compat:1.8.0.2
	pgoyette-compat-base:1.8
	gcc-6-4-0:1.1.1.9
	netbsd-7-1-1-RELEASE:1.3.2.1
	gcc-5-5-0:1.1.1.8
	matt-nb8-mediatek:1.6.0.12
	matt-nb8-mediatek-base:1.6
	perseant-stdc-iso10646:1.6.0.10
	perseant-stdc-iso10646-base:1.6
	netbsd-8:1.6.0.8
	netbsd-8-base:1.6
	prg-localcount2-base3:1.6
	prg-localcount2-base2:1.6
	prg-localcount2-base1:1.6
	prg-localcount2:1.6.0.6
	prg-localcount2-base:1.6
	pgoyette-localcount-20170426:1.6
	bouyer-socketcan-base1:1.6
	pgoyette-localcount-20170320:1.6
	netbsd-7-1:1.3.2.1.0.4
	netbsd-7-1-RELEASE:1.3.2.1
	netbsd-7-1-RC2:1.3.2.1
	netbsd-7-nhusb-base-20170116:1.3.2.1
	bouyer-socketcan:1.6.0.4
	bouyer-socketcan-base:1.6
	pgoyette-localcount-20170107:1.6
	netbsd-7-1-RC1:1.3.2.1
	pgoyette-localcount-20161104:1.6
	netbsd-7-0-2-RELEASE:1.3
	localcount-20160914:1.6
	netbsd-7-nhusb:1.3.2.1.0.2
	netbsd-7-nhusb-base:1.3.2.1
	pgoyette-localcount-20160806:1.6
	pgoyette-localcount-20160726:1.6
	pgoyette-localcount:1.6.0.2
	pgoyette-localcount-base:1.6
	gcc-5-4-0:1.1.1.7
	netbsd-7-0-1-RELEASE:1.3
	gcc-5-3-0:1.1.1.6
	netbsd-7-0:1.3.0.4
	netbsd-7-0-RELEASE:1.3
	gcc-4-8-5-pre-gcc-old-import:1.4
	netbsd-7-0-RC3:1.3
	netbsd-7-0-RC2:1.3
	post-gcc-4-8-5-merge:1.4
	gcc-4-8-5:1.1.1.5
	netbsd-7-0-RC1:1.3
	gcc-4-8-4:1.1.1.4
	netbsd-6-0-6-RELEASE:1.1.1.1
	netbsd-6-1-5-RELEASE:1.1.1.1
	netbsd-7:1.3.0.2
	netbsd-7-base:1.3
	gcc-4-8-3:1.1.1.3
	yamt-pagecache-base9:1.2
	yamt-pagecache-tag8:1.1.1.1.2.1
	netbsd-6-1-4-RELEASE:1.1.1.1
	netbsd-6-0-5-RELEASE:1.1.1.1
	tls-earlyentropy:1.2.0.2
	tls-earlyentropy-base:1.3
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.2
	riastradh-drm2-base3:1.2
	imported-to-gcc-old-20140227-0107:1.1.1.2
	netbsd-6-1-3-RELEASE:1.1.1.1
	netbsd-6-0-4-RELEASE:1.1.1.1
	netbsd-6-1-2-RELEASE:1.1.1.1
	netbsd-6-0-3-RELEASE:1.1.1.1
	netbsd-6-1-1-RELEASE:1.1.1.1
	riastradh-drm2-base2:1.1.1.2
	riastradh-drm2-base1:1.1.1.2
	riastradh-drm2:1.1.1.2.0.2
	riastradh-drm2-base:1.1.1.2
	netbsd-6-1:1.1.1.1.0.12
	netbsd-6-0-2-RELEASE:1.1.1.1
	netbsd-6-1-RELEASE:1.1.1.1
	netbsd-6-1-RC4:1.1.1.1
	netbsd-6-1-RC3:1.1.1.1
	agc-symver:1.1.1.2.0.4
	agc-symver-base:1.1.1.2
	netbsd-6-1-RC2:1.1.1.1
	netbsd-6-1-RC1:1.1.1.1
	yamt-pagecache-base8:1.1.1.2
	netbsd-6-0-1-RELEASE:1.1.1.1
	yamt-pagecache-base7:1.1.1.2
	matt-nb6-plus-nbase:1.1.1.1
	yamt-pagecache-base6:1.1.1.2
	netbsd-6-0:1.1.1.1.0.10
	netbsd-6-0-RELEASE:1.1.1.1
	gcc-4-5-4:1.1.1.2
	netbsd-6-0-RC2:1.1.1.1
	tls-maxphys:1.1.1.1.0.8
	tls-maxphys-base:1.3
	matt-nb6-plus:1.1.1.1.0.6
	matt-nb6-plus-base:1.1.1.1
	netbsd-6-0-RC1:1.1.1.1
	yamt-pagecache-base5:1.1.1.1
	yamt-pagecache-base4:1.1.1.1
	netbsd-6:1.1.1.1.0.4
	netbsd-6-base:1.1.1.1
	yamt-pagecache-base3:1.1.1.1
	yamt-pagecache-base2:1.1.1.1
	yamt-pagecache:1.1.1.1.0.2
	yamt-pagecache-base:1.1.1.1
	gcc-4-5-3:1.1.1.1
	FSF:1.1.1;
locks; strict;
comment	@# @;


1.19
date	2025.09.14.00.07.50;	author mrg;	state Exp;
branches;
next	1.18;
commitid	x9D5QEnvbeMI4CaG;

1.18
date	2025.07.21.03.01.13;	author mrg;	state Exp;
branches;
next	1.17;
commitid	0iwx35CAgfJ1Oy3G;

1.17
date	2024.06.30.08.38.42;	author mrg;	state Exp;
branches;
next	1.16;
commitid	kExYYE9GeDZb5ZfF;

1.16
date	2023.07.30.05.51.38;	author mrg;	state Exp;
branches
	1.16.2.1;
next	1.15;
commitid	Iugici1GtQ2mWMyE;

1.15
date	2023.07.11.00.40.42;	author mrg;	state Exp;
branches;
next	1.14;
commitid	UboG1aHS8nDGQjwE;

1.14
date	2022.07.22.20.22.37;	author mrg;	state Exp;
branches
	1.14.2.1;
next	1.13;
commitid	26I33JZwnjoCLVMD;

1.13
date	2021.04.11.00.02.20;	author mrg;	state Exp;
branches;
next	1.12;
commitid	rXajJcXg3xWG0OOC;

1.12
date	2020.09.05.09.12.31;	author mrg;	state Exp;
branches;
next	1.11;
commitid	dS3LXwk3lAvP4QmC;

1.11
date	2019.10.01.10.38.22;	author mrg;	state Exp;
branches;
next	1.10;
commitid	r1DeKUVOMBnJt9FB;

1.10
date	2019.01.19.12.10.10;	author mrg;	state Exp;
branches;
next	1.9;
commitid	k8UsQyKpGt5Abo8B;

1.9
date	2018.11.04.00.38.16;	author mrg;	state Exp;
branches;
next	1.8;
commitid	sRYjqyoImfCCNyYA;

1.8
date	2018.02.02.03.41.08;	author mrg;	state Exp;
branches
	1.8.2.1
	1.8.4.1;
next	1.7;
commitid	YbHkrPGCnw2dEepA;

1.7
date	2017.11.12.00.36.47;	author mrg;	state Exp;
branches;
next	1.6;
commitid	qvf6fubay3FAgGeA;

1.6
date	2016.06.07.06.14.18;	author mrg;	state Exp;
branches
	1.6.8.1;
next	1.5;
commitid	aX9zbVaqoL6JWu9z;

1.5
date	2016.01.24.09.43.36;	author mrg;	state Exp;
branches;
next	1.4;
commitid	dxhNntGC3MSSqaSy;

1.4
date	2015.06.24.14.51.18;	author mrg;	state Exp;
branches;
next	1.3;
commitid	1WAL6q85IgrA1Hqy;

1.3
date	2014.05.27.09.18.55;	author skrll;	state Exp;
branches
	1.3.2.1;
next	1.2;
commitid	Z8i3oVrmy8KgN9Cx;

1.2
date	2014.03.01.08.58.35;	author mrg;	state dead;
branches
	1.2.2.1;
next	1.1;
commitid	PSOLhRBVEIqVuYqx;

1.1
date	2011.06.21.01.23.14;	author mrg;	state Exp;
branches
	1.1.1.1;
next	;

1.16.2.1
date	2024.07.01.01.00.55;	author perseant;	state Exp;
branches;
next	1.16.2.2;
commitid	NkoYLLCQWWw9v4gF;

1.16.2.2
date	2025.08.02.05.25.49;	author perseant;	state Exp;
branches;
next	;
commitid	23j6GFaDws3O875G;

1.14.2.1
date	2023.07.13.09.18.29;	author martin;	state Exp;
branches;
next	;
commitid	nTDZbluVjX9bCCwE;

1.8.2.1
date	2018.11.26.01.50.55;	author pgoyette;	state Exp;
branches;
next	1.8.2.2;
commitid	Zj4q5SspGdKXto1B;

1.8.2.2
date	2019.01.26.21.59.11;	author pgoyette;	state Exp;
branches;
next	;
commitid	JKpcmvSjdT25dl9B;

1.8.4.1
date	2019.06.10.21.54.22;	author christos;	state Exp;
branches;
next	1.8.4.2;
commitid	jtc8rnCzWiEEHGqB;

1.8.4.2
date	2020.04.13.07.58.15;	author martin;	state Exp;
branches;
next	;
commitid	X01YhRUPVUDaec4C;

1.6.8.1
date	2017.11.23.11.01.55;	author martin;	state Exp;
branches;
next	;
commitid	lA6hq5q2Y1dXl9gA;

1.3.2.1
date	2015.10.31.21.35.19;	author snj;	state Exp;
branches;
next	;
commitid	ynIajmFMECdR6jHy;

1.2.2.1
date	2014.08.10.07.10.46;	author tls;	state Exp;
branches;
next	;
commitid	3hJZAsnr6L0lHMLx;

1.1.1.1
date	2011.06.21.01.23.14;	author mrg;	state Exp;
branches
	1.1.1.1.2.1
	1.1.1.1.8.1;
next	1.1.1.2;

1.1.1.2
date	2012.09.18.06.15.50;	author skrll;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	2014.05.27.08.39.52;	author skrll;	state Exp;
branches;
next	1.1.1.4;
commitid	Esid9j2Tay8qt9Cx;

1.1.1.4
date	2015.01.10.00.47.10;	author mrg;	state Exp;
branches;
next	1.1.1.5;
commitid	E07JC7FpnM8mAp5y;

1.1.1.5
date	2015.06.24.14.02.53;	author mrg;	state Exp;
branches;
next	1.1.1.6;
commitid	64Yqx91eMSn0JGqy;

1.1.1.6
date	2016.01.24.06.05.55;	author mrg;	state Exp;
branches;
next	1.1.1.7;
commitid	uWWfbLp08zOK79Sy;

1.1.1.7
date	2016.06.07.05.57.55;	author mrg;	state Exp;
branches;
next	1.1.1.8;
commitid	KKgo7HPiSHWAPu9z;

1.1.1.8
date	2017.11.11.23.49.27;	author mrg;	state Exp;
branches;
next	1.1.1.9;
commitid	KefS4gJN8ajyYFeA;

1.1.1.9
date	2018.02.02.01.58.44;	author mrg;	state Exp;
branches;
next	1.1.1.10;
commitid	XNKaycqpfhzd5epA;

1.1.1.10
date	2018.11.04.00.12.26;	author mrg;	state Exp;
branches;
next	1.1.1.11;
commitid	bulspy67pMB6EyYA;

1.1.1.11
date	2019.01.19.10.14.02;	author mrg;	state Exp;
branches;
next	1.1.1.12;
commitid	VQ8OwWIg5RS9kn8B;

1.1.1.12
date	2019.10.01.09.36.05;	author mrg;	state Exp;
branches;
next	1.1.1.13;
commitid	smvgr2IPAQDr89FB;

1.1.1.13
date	2020.08.11.05.10.31;	author mrg;	state Exp;
branches;
next	1.1.1.14;
commitid	5dBRDT7i6e65xBjC;

1.1.1.14
date	2020.08.11.05.30.07;	author mrg;	state Exp;
branches;
next	1.1.1.15;
commitid	7AI4OfpLi4eqEBjC;

1.1.1.15
date	2020.09.05.07.52.07;	author mrg;	state Exp;
branches;
next	1.1.1.16;
commitid	ZRYA7IOuwfMjAPmC;

1.1.1.16
date	2021.04.10.22.09.57;	author mrg;	state Exp;
branches;
next	1.1.1.17;
commitid	eC4g0MRpqTvEkNOC;

1.1.1.17
date	2022.07.22.19.52.33;	author mrg;	state Exp;
branches;
next	1.1.1.18;
commitid	fUYPgdKzIHqhwVMD;

1.1.1.18
date	2023.07.11.00.32.44;	author mrg;	state Exp;
branches;
next	1.1.1.19;
commitid	3yo4S98RsOFBNjwE;

1.1.1.19
date	2023.07.30.05.21.15;	author mrg;	state Exp;
branches;
next	1.1.1.20;
commitid	tk6nV4mbc9nVEMyE;

1.1.1.20
date	2024.06.30.07.35.36;	author mrg;	state Exp;
branches;
next	1.1.1.21;
commitid	m7BwZsPdfJvuHYfF;

1.1.1.21
date	2025.07.21.02.43.36;	author mrg;	state Exp;
branches;
next	1.1.1.22;
commitid	9k1gPU4fqf8VHy3G;

1.1.1.22
date	2025.09.13.23.45.42;	author mrg;	state Exp;
branches;
next	;
commitid	KwhwN4krNWa6XBaG;

1.1.1.1.2.1
date	2012.10.30.18.57.31;	author yamt;	state Exp;
branches;
next	1.1.1.1.2.2;

1.1.1.1.2.2
date	2014.05.22.16.36.37;	author yamt;	state dead;
branches;
next	;
commitid	Birywjruwc00pyBx;

1.1.1.1.8.1
date	2012.11.20.02.58.32;	author tls;	state Exp;
branches;
next	1.1.1.1.8.2;

1.1.1.1.8.2
date	2014.08.19.23.54.32;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;


desc
@@


1.19
log
@merge GCC 14.3.0.
@
text
@This is libgomp.info, produced by makeinfo version 6.5 from
libgomp.texi.

Copyright (C) 2006-2024 Free Software Foundation, Inc.

   Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover texts
being (a) (see below), and with the Back-Cover Texts being (b) (see
below).  A copy of the license is included in the section entitled "GNU
Free Documentation License".

   (a) The FSF's Front-Cover Text is:

   A GNU Manual

   (b) The FSF's Back-Cover Text is:

   You have freedom to copy and modify this GNU Manual, like GNU
software.  Copies published by the Free Software Foundation raise funds
for GNU development.
INFO-DIR-SECTION GNU Libraries
START-INFO-DIR-ENTRY
* libgomp: (libgomp).          GNU Offloading and Multi Processing Runtime Library.
END-INFO-DIR-ENTRY

   This manual documents libgomp, the GNU Offloading and Multi
Processing Runtime library.  This is the GNU implementation of the
OpenMP and OpenACC APIs for parallel and accelerator programming in
C/C++ and Fortran.

   Published by the Free Software Foundation 51 Franklin Street, Fifth
Floor Boston, MA 02110-1301 USA

   Copyright (C) 2006-2024 Free Software Foundation, Inc.

   Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover texts
being (a) (see below), and with the Back-Cover Texts being (b) (see
below).  A copy of the license is included in the section entitled "GNU
Free Documentation License".

   (a) The FSF's Front-Cover Text is:

   A GNU Manual

   (b) The FSF's Back-Cover Text is:

   You have freedom to copy and modify this GNU Manual, like GNU
software.  Copies published by the Free Software Foundation raise funds
for GNU development.


File: libgomp.info,  Node: Top,  Next: Enabling OpenMP

Introduction
************

This manual documents the usage of libgomp, the GNU Offloading and Multi
Processing Runtime Library.  This includes the GNU implementation of the
OpenMP (https://www.openmp.org) Application Programming Interface (API)
for multi-platform shared-memory parallel programming in C/C++ and
Fortran, and the GNU implementation of the OpenACC
(https://www.openacc.org) Application Programming Interface (API) for
offloading of code to accelerator devices in C/C++ and Fortran.

   Originally, libgomp implemented the GNU OpenMP Runtime Library.
Based on this, support for OpenACC and offloading (both OpenACC and
OpenMP 4's target construct) has been added later on, and the library's
name changed to GNU Offloading and Multi Processing Runtime Library.

* Menu:

* Enabling OpenMP::            How to enable OpenMP for your applications.
* OpenMP Implementation Status:: List of implemented features by OpenMP version
* OpenMP Runtime Library Routines: Runtime Library Routines.
                               The OpenMP runtime application programming
                               interface.
* OpenMP Environment Variables: Environment Variables.
                               Influencing OpenMP runtime behavior with
                               environment variables.
* Enabling OpenACC::           How to enable OpenACC for your
                               applications.
* OpenACC Runtime Library Routines:: The OpenACC runtime application
                               programming interface.
* OpenACC Environment Variables:: Influencing OpenACC runtime behavior with
                               environment variables.
* CUDA Streams Usage::         Notes on the implementation of
                               asynchronous operations.
* OpenACC Library Interoperability:: OpenACC library interoperability with the
                               NVIDIA CUBLAS library.
* OpenACC Profiling Interface::
* OpenMP-Implementation Specifics:: Notes specifics of this OpenMP
                               implementation
* Offload-Target Specifics::   Notes on offload-target specific internals
* The libgomp ABI::            Notes on the external ABI presented by libgomp.
* Reporting Bugs::             How to report bugs in the GNU Offloading and
                               Multi Processing Runtime Library.
* Copying::                    GNU general public license says
                               how you can copy and share libgomp.
* GNU Free Documentation License::
                               How you can copy and share this manual.
* Funding::                    How to help assure continued work for free
                               software.
* Library Index::              Index of this documentation.


File: libgomp.info,  Node: Enabling OpenMP,  Next: OpenMP Implementation Status,  Up: Top

1 Enabling OpenMP
*****************

To activate the OpenMP extensions for C/C++ and Fortran, the
compile-time flag '-fopenmp' must be specified.  For C and C++, this
enables the handling of the OpenMP directives using '#pragma omp' and
the '[[omp::directive(...)]]', '[[omp::sequence(...)]]' and
'[[omp::decl(...)]]' attributes.  For Fortran, it enables for free
source form the '!$omp' sentinel for directives and the '!$' conditional
compilation sentinel and for fixed source form the 'c$omp', '*$omp' and
'!$omp' sentinels for directives and the 'c$', '*$' and '!$' conditional
compilation sentinels.  The flag also arranges for automatic linking of
the OpenMP runtime library (*note Runtime Library Routines::).

   The '-fopenmp-simd' flag can be used to enable a subset of OpenMP
directives that do not require the linking of either the OpenMP runtime
library or the POSIX threads library.

   A complete description of all OpenMP directives may be found in the
OpenMP Application Program Interface (https://www.openmp.org) manuals.
See also *note OpenMP Implementation Status::.


File: libgomp.info,  Node: OpenMP Implementation Status,  Next: Runtime Library Routines,  Prev: Enabling OpenMP,  Up: Top

2 OpenMP Implementation Status
******************************

* Menu:

* OpenMP 4.5:: Feature completion status to 4.5 specification
* OpenMP 5.0:: Feature completion status to 5.0 specification
* OpenMP 5.1:: Feature completion status to 5.1 specification
* OpenMP 5.2:: Feature completion status to 5.2 specification
* OpenMP Technical Report 12:: Feature completion status to second 6.0 preview

The '_OPENMP' preprocessor macro and Fortran's 'openmp_version'
parameter, provided by 'omp_lib.h' and the 'omp_lib' module, have the
value '201511' (i.e.  OpenMP 4.5).


File: libgomp.info,  Node: OpenMP 4.5,  Next: OpenMP 5.0,  Up: OpenMP Implementation Status

2.1 OpenMP 4.5
==============

The OpenMP 4.5 specification is fully supported.


File: libgomp.info,  Node: OpenMP 5.0,  Next: OpenMP 5.1,  Prev: OpenMP 4.5,  Up: OpenMP Implementation Status

2.2 OpenMP 5.0
==============

New features listed in Appendix B of the OpenMP specification
-------------------------------------------------------------

Description                                 Status  Comments
-----------------------------------------------------------------------
Array shaping                               N
Array sections with non-unit strides in C   N
and C++
Iterators                                   Y
'metadirective' directive                   N
'declare variant' directive                 P       _simd_ traits
                                                    not handled
                                                    correctly
TARGET-OFFLOAD-VAR ICV and                  Y
'OMP_TARGET_OFFLOAD' env variable
Nested-parallel changes to                  Y
MAX-ACTIVE-LEVELS-VAR ICV
'requires' directive                        P       complete but no
                                                    non-host device
                                                    provides
                                                    'unified_shared_memory'
'teams' construct outside an enclosing      Y
target region
Non-rectangular loop nests                  P       Full support for
                                                    C/C++, partial
                                                    for Fortran
                                                    (PR110735
                                                    (https://gcc.gnu.org/PR110735))
'!=' as relational-op in canonical loop     Y
form for C/C++
'nonmonotonic' as default loop schedule     Y
modifier for worksharing-loop constructs
Collapse of associated loops that are       Y
imperfectly nested loops
Clauses 'if', 'nontemporal' and             Y
'order(concurrent)' in 'simd' construct
'atomic' constructs in 'simd'               Y
'loop' construct                            Y
'order(concurrent)' clause                  Y
'scan' directive and 'in_scan' modifier     Y
for the 'reduction' clause
'in_reduction' clause on 'task'             Y
constructs
'in_reduction' clause on 'target'           P       'nowait' only
constructs                                          stub
'task_reduction' clause with 'taskgroup'    Y
'task' modifier to 'reduction' clause       Y
'affinity' clause to 'task' construct       Y       Stub only
'detach' clause to 'task' construct         Y
'omp_fulfill_event' runtime routine         Y
'reduction' and 'in_reduction' clauses on   Y
'taskloop' and 'taskloop simd' constructs
'taskloop' construct cancelable by          Y
'cancel' construct
'mutexinoutset' _dependence-type_ for       Y
'depend' clause
Predefined memory spaces, memory            Y       See also
allocators, allocator traits                        *note Memory allocation::
Memory management routines                  Y
'allocate' directive                        P       Only C for
                                                    stack/automatic
                                                    and Fortran for
                                                    stack/automatic
                                                    and
                                                    allocatable/pointer
                                                    variables
'allocate' clause                           P       Initial support
'use_device_addr' clause on 'target data'   Y
'ancestor' modifier on 'device' clause      Y
Implicit declare target directive           Y
Discontiguous array section with 'target    N
update' construct
C/C++'s lvalue expressions in 'to',         Y
'from' and 'map' clauses
C/C++'s lvalue expressions in 'depend'      Y
clauses
Nested 'declare target' directive           Y
Combined 'master' constructs                Y
'depend' clause on 'taskwait'               Y
Weak memory ordering clauses on 'atomic'    Y
and 'flush' construct
'hint' clause on the 'atomic' construct     Y       Stub only
'depobj' construct and depend objects       Y
Lock hints were renamed to                  Y
synchronization hints
'conditional' modifier to 'lastprivate'     Y
clause
Map-order clarifications                    P
'close' _map-type-modifier_                 Y
Mapping C/C++ pointer variables and to      P
assign the address of device memory
mapped by an array section
Mapping of Fortran pointer and              P       Mapping of vars
allocatable variables, including pointer            with allocatable
and allocatable components of variables             components
                                                    unsupported
'defaultmap' extensions                     Y
'declare mapper' directive                  N
'omp_get_supported_active_levels' routine   Y
Runtime routines and environment            Y
variables to display runtime thread
affinity information
'omp_pause_resource' and                    Y
'omp_pause_resource_all' runtime routines
'omp_get_device_num' runtime routine        Y
OMPT interface                              N
OMPD interface                              N

Other new OpenMP 5.0 features
-----------------------------

Description                                 Status  Comments
-----------------------------------------------------------------------
Supporting C++'s range-based for loop       Y


File: libgomp.info,  Node: OpenMP 5.1,  Next: OpenMP 5.2,  Prev: OpenMP 5.0,  Up: OpenMP Implementation Status

2.3 OpenMP 5.1
==============

New features listed in Appendix B of the OpenMP specification
-------------------------------------------------------------

Description                                 Status  Comments
-----------------------------------------------------------------------
OpenMP directive as C++ attribute           Y
specifiers
'omp_all_memory' reserved locator           Y
_target_device trait_ in OpenMP Context     N
'target_device' selector set in context     N
selectors
C/C++'s 'declare variant' directive:        N
elision support of preprocessed code
'declare variant': new clauses              N
'adjust_args' and 'append_args'
'dispatch' construct                        N
device-specific ICV settings with           Y
environment variables
'assume' and 'assumes' directives           Y
'nothing' directive                         Y
'error' directive                           Y
'masked' construct                          Y
'scope' directive                           Y
Loop transformation constructs              N
'strict' modifier in the 'grainsize' and    Y
'num_tasks' clauses of the 'taskloop'
construct
'align' clause in 'allocate' directive      P       Only C and
                                                    Fortran (and not
                                                    for static
                                                    variables)
'align' modifier in 'allocate' clause       Y
'thread_limit' clause to 'target'           Y
construct
'has_device_addr' clause to 'target'        Y
construct
Iterators in 'target update' motion         N
clauses and 'map' clauses
Indirect calls to the device version of a   Y
procedure or function in 'target' regions
'interop' directive                         N
'omp_interop_t' object support in runtime   N
routines
'nowait' clause in 'taskwait' directive     Y
Extensions to the 'atomic' directive        Y
'seq_cst' clause on a 'flush' construct     Y
'inoutset' argument to the 'depend'         Y
clause
'private' and 'firstprivate' argument to    Y
'default' clause in C and C++
'present' argument to 'defaultmap' clause   Y
'omp_set_num_teams',                        Y
'omp_set_teams_thread_limit',
'omp_get_max_teams',
'omp_get_teams_thread_limit' runtime
routines
'omp_target_is_accessible' runtime          Y
routine
'omp_target_memcpy_async' and               Y
'omp_target_memcpy_rect_async' runtime
routines
'omp_get_mapped_ptr' runtime routine        Y
'omp_calloc', 'omp_realloc',                Y
'omp_aligned_alloc' and
'omp_aligned_calloc' runtime routines
'omp_alloctrait_key_t' enum:                Y
'omp_atv_serialized' added,
'omp_atv_default' changed
'omp_display_env' runtime routine           Y
'ompt_scope_endpoint_t' enum:               N
'ompt_scope_beginend'
'ompt_sync_region_t' enum additions         N
'ompt_state_t' enum:                        N
'ompt_state_wait_barrier_implementation'
and 'ompt_state_wait_barrier_teams'
'ompt_callback_target_data_op_emi_t',       N
'ompt_callback_target_emi_t',
'ompt_callback_target_map_emi_t' and
'ompt_callback_target_submit_emi_t'
'ompt_callback_error_t' type                N
'OMP_PLACES' syntax extensions              Y
'OMP_NUM_TEAMS' and                         Y
'OMP_TEAMS_THREAD_LIMIT' environment
variables

Other new OpenMP 5.1 features
-----------------------------

Description                                 Status  Comments
-----------------------------------------------------------------------
Support of strictly structured blocks in    Y
Fortran
Support of structured block sequences in    Y
C/C++
'unconstrained' and 'reproducible'          Y
modifiers on 'order' clause
Support 'begin/end declare target' syntax   Y
in C/C++
Pointer predetermined firstprivate          N
getting initialized to address of
matching mapped list item per 5.1, Sect.
2.21.7.2
For Fortran, diagnose placing declarative   N
before/between 'USE', 'IMPORT', and
'IMPLICIT' as invalid
Optional comma between directive and        Y
clause in the '#pragma' form
'indirect' clause in 'declare target'       Y
'device_type(nohost)'/'device_type(host)'   N
for variables
'present' modifier to the 'map', 'to' and   Y
'from' clauses


File: libgomp.info,  Node: OpenMP 5.2,  Next: OpenMP Technical Report 12,  Prev: OpenMP 5.1,  Up: OpenMP Implementation Status

2.4 OpenMP 5.2
==============

New features listed in Appendix B of the OpenMP specification
-------------------------------------------------------------

Description                                 Status  Comments
-----------------------------------------------------------------------
'omp_in_explicit_task' routine and          Y
EXPLICIT-TASK-VAR ICV
'omp'/'ompx'/'omx' sentinels and            N/A     warning for
'omp_'/'ompx_' namespaces                           'ompx/omx'
                                                    sentinels(1)
Clauses on 'end' directive can be on        Y
directive
'destroy' clause with destroy-var           Y
argument on 'depobj'
Deprecation of no-argument 'destroy'        N
clause on 'depobj'
'linear' clause syntax changes and 'step'   Y
modifier
Deprecation of minus operator for           N
reductions
Deprecation of separating 'map' modifiers   N
without comma
'declare mapper' with iterator and          N
'present' modifiers
If a matching mapped list item is not       Y
found in the data environment, the
pointer retains its original value
New 'enter' clause as alias for 'to' on     Y
declare target directive
Deprecation of 'to' clause on declare       N
target directive
Extended list of directives permitted in    Y
Fortran pure procedures
New 'allocators' directive for Fortran      Y
Deprecation of 'allocate' directive for     N
Fortran allocatables/pointers
Optional paired 'end' directive with        N
'dispatch'
New 'memspace' and 'traits' modifiers for   N
'uses_allocators'
Deprecation of traits array following the   N
allocator_handle expression in
'uses_allocators'
New 'otherwise' clause as alias for         N
'default' on metadirectives
Deprecation of 'default' clause on          N
metadirectives
Deprecation of delimited form of 'declare   N
target'
Reproducible semantics changed for          N
'order(concurrent)'
'allocate' and 'firstprivate' clauses on    Y
'scope'
'ompt_callback_work'                        N
Default map-type for the 'map' clause in    Y
'target enter/exit data'
New 'doacross' clause as alias for          Y
'depend' with 'source'/'sink' modifier
Deprecation of 'depend' with                N
'source'/'sink' modifier
'omp_cur_iteration' keyword                 Y

Other new OpenMP 5.2 features
-----------------------------

Description                                 Status  Comments
-----------------------------------------------------------------------
For Fortran, optional comma between         N
directive and clause
Conforming device numbers and               Y
'omp_initial_device' and
'omp_invalid_device' enum/PARAMETER
Initial value of DEFAULT-DEVICE-VAR ICV     Y
with 'OMP_TARGET_OFFLOAD=mandatory'
'all' as _implicit-behavior_ for            Y
'defaultmap'
_interop_types_ in any position of the      N
modifier list for the 'init' clause of
the 'interop' construct
Invoke virtual member functions of C++      N
objects created on the host device on
other devices

   ---------- Footnotes ----------

   (1) The 'ompx' sentinel as C/C++ pragma and C++ attributes are warned
for with '-Wunknown-pragmas' (implied by '-Wall') and '-Wattributes'
(enabled by default), respectively; for Fortran free-source code, there
is a warning enabled by default and, for fixed-source code, the 'omx'
sentinel is warned for with '-Wsurprising' (enabled by '-Wall').
Unknown clauses are always rejected with an error.


File: libgomp.info,  Node: OpenMP Technical Report 12,  Prev: OpenMP 5.2,  Up: OpenMP Implementation Status

2.5 OpenMP Technical Report 12
==============================

Technical Report (TR) 12 is the second preview for OpenMP 6.0.

New features listed in Appendix B of the OpenMP specification
-------------------------------------------------------------

Features deprecated in versions 5.2, 5.1    N/A     Backward
and 5.0 were removed                                compatibility
Full support for C23 was added              P
Full support for C++23 was added            P
'_ALL' suffix to the device-scope           P       Host device
environment variables                               number wrongly
                                                    accepted
'num_threads' now accepts a list            N
Supporting increments with abstract names   N
in 'OMP_PLACES'
Extension of 'OMP_DEFAULT_DEVICE' and new   N
'OMP_AVAILABLE_DEVICES' environment vars
New 'OMP_THREADS_RESERVE' environment       N
variable
The 'decl' attribute was added to the C++   Y
attribute syntax
The OpenMP directive syntax was extended    Y
to include C 23 attribute specifiers
All inarguable clauses take now an          N
optional Boolean argument
For Fortran, _locator list_ can be also     N
function reference with data pointer
result
Concept of _assumed-size arrays_ in C and   N
C++
_directive-name-modifier_ accepted in all   N
clauses
For Fortran, atomic with BLOCK construct    N
and, for C/C++, with unlimited curly
braces supported
For Fortran, atomic compare with storing    N
the comparison result
New 'looprange' clause                      N
Ref-count change for                        N
'use_device_ptr'/'use_device_addr'
Support for inductions                      N
Implicit reduction identifiers of C++       N
classes
Change of the _map-type_ property from      N
_ultimate_ to _default_
'self' modifier to 'map' and 'self' as      N
'defaultmap' argument
Mapping of _assumed-size arrays_ in C,      N
C++ and Fortran
'groupprivate' directive                    N
'local' clause to 'declare target'          N
directive
'part_size' allocator trait                 N
'pin_device', 'preferred_device' and        N
'target_access' allocator traits
'access' allocator trait changes            N
Extension of 'interop' operation of         N
'append_args', allowing all modifiers of
the 'init' clause
'interop' clause to 'dispatch'              N
'message' and 'severity' clauses to         N
'parallel' directive
'self' clause to 'requires' directive       N
'no_openmp_constructs' assumptions clause   N
'reverse' loop-transformation construct     N
'interchange' loop-transformation           N
construct
'fuse' loop-transformation construct        N
'apply' code to loop-transforming           N
constructs
'omp_curr_progress_width' identifier        N
'safesync' clause to the 'parallel'         N
construct
'omp_get_max_progress_width' runtime        N
routine
'strict' modifier keyword to                N
'num_threads'
'atomic' permitted in a construct with      N
'order(concurrent)'
'workdistribute' directive for Fortran      N       Renamed just
                                                    after TR12;
                                                    added in TR12 as
                                                    'coexecute'
Fortran DO CONCURRENT as associated loop    N
in a 'loop' construct
'threadset' clause in task-generating       N
constructs
'nowait' clause with reverse-offload        N
'target' directives
Boolean argument to 'nowait' and            N
'nogroup' may be non constant
'memscope' clause to 'atomic' and 'flush'   N
'omp_is_free_agent' and                     N
'omp_ancestor_is_free_agent' routines
'omp_target_memset' and                     N
'omp_target_memset_rect_async' routines
Routines for obtaining memory               N
spaces/allocators for shared/device
memory
'omp_get_memspace_num_resources' routine    N
'omp_get_submemspace' routine               N
'ompt_target_data_transfer' and             N
'ompt_target_data_transfer_async' values
in 'ompt_target_data_op_t' enum
'ompt_get_buffer_limits' OMPT routine       N

Other new TR 12 features
------------------------

Canonical loop nest enclosed in             N
(multiple) curly braces (C/C++) or BLOCK
constructs (Fortran)
Relaxed Fortran restrictions to the         N
'aligned' clause
Mapping lambda captures                     N
New 'omp_pause_stop_tool' constant for      N
omp_pause_resource


File: libgomp.info,  Node: Runtime Library Routines,  Next: Environment Variables,  Prev: OpenMP Implementation Status,  Up: Top

3 OpenMP Runtime Library Routines
*********************************

The runtime routines described here are defined by Section 18 of the
OpenMP specification in version 5.2.

* Menu:

* Thread Team Routines::
* Thread Affinity Routines::
* Teams Region Routines::
* Tasking Routines::
* Resource Relinquishing Routines::
* Device Information Routines::
* Device Memory Routines::
* Lock Routines::
* Timing Routines::
* Event Routine::
* Memory Management Routines::
* Environment Display Routine::


File: libgomp.info,  Node: Thread Team Routines,  Next: Thread Affinity Routines,  Up: Runtime Library Routines

3.1 Thread Team Routines
========================

Routines controlling threads in the current contention group.  They have
C linkage and do not throw exceptions.

* Menu:

* omp_set_num_threads::         Set upper team size limit
* omp_get_num_threads::         Size of the active team
* omp_get_max_threads::         Maximum number of threads of parallel region
* omp_get_thread_num::          Current thread ID
* omp_in_parallel::             Whether a parallel region is active
* omp_set_dynamic::             Enable/disable dynamic teams
* omp_get_dynamic::             Dynamic teams setting
* omp_get_cancellation::        Whether cancellation support is enabled
* omp_set_nested::              Enable/disable nested parallel regions
* omp_get_nested::              Nested parallel regions
* omp_set_schedule::            Set the runtime scheduling method
* omp_get_schedule::            Obtain the runtime scheduling method
* omp_get_teams_thread_limit::  Maximum number of threads imposed by teams
* omp_get_supported_active_levels:: Maximum number of active regions supported
* omp_set_max_active_levels::   Limits the number of active parallel regions
* omp_get_max_active_levels::   Current maximum number of active regions
* omp_get_level::               Number of parallel regions
* omp_get_ancestor_thread_num:: Ancestor thread ID
* omp_get_team_size::           Number of threads in a team
* omp_get_active_level::        Number of active parallel regions


File: libgomp.info,  Node: omp_set_num_threads,  Next: omp_get_num_threads,  Up: Thread Team Routines

3.1.1 'omp_set_num_threads' - Set upper team size limit
-------------------------------------------------------

_Description_:
     Specifies the number of threads used by default in subsequent
     parallel sections, if those do not specify a 'num_threads' clause.
     The argument of 'omp_set_num_threads' shall be a positive integer.

_C/C++_:
     _Prototype_:   'void omp_set_num_threads(int num_threads);'

_Fortran_:
     _Interface_:   'subroutine omp_set_num_threads(num_threads)'
                    'integer, intent(in) :: num_threads'

_See also_:
     *note OMP_NUM_THREADS::, *note omp_get_num_threads::, *note
     omp_get_max_threads::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.1.


File: libgomp.info,  Node: omp_get_num_threads,  Next: omp_get_max_threads,  Prev: omp_set_num_threads,  Up: Thread Team Routines

3.1.2 'omp_get_num_threads' - Size of the active team
-----------------------------------------------------

_Description_:
     Returns the number of threads in the current team.  In a sequential
     section of the program 'omp_get_num_threads' returns 1.

     The default team size may be initialized at startup by the
     'OMP_NUM_THREADS' environment variable.  At runtime, the size of
     the current team may be set either by the 'NUM_THREADS' clause or
     by 'omp_set_num_threads'.  If none of the above were used to define
     a specific value and 'OMP_DYNAMIC' is disabled, one thread per CPU
     online is used.

_C/C++_:
     _Prototype_:   'int omp_get_num_threads(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_num_threads()'

_See also_:
     *note omp_get_max_threads::, *note omp_set_num_threads::, *note
     OMP_NUM_THREADS::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.2.


File: libgomp.info,  Node: omp_get_max_threads,  Next: omp_get_thread_num,  Prev: omp_get_num_threads,  Up: Thread Team Routines

3.1.3 'omp_get_max_threads' - Maximum number of threads of parallel region
--------------------------------------------------------------------------

_Description_:
     Return the maximum number of threads used for the current parallel
     region that does not use the clause 'num_threads'.

_C/C++_:
     _Prototype_:   'int omp_get_max_threads(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_max_threads()'

_See also_:
     *note omp_set_num_threads::, *note omp_set_dynamic::, *note
     omp_get_thread_limit::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.3.


File: libgomp.info,  Node: omp_get_thread_num,  Next: omp_in_parallel,  Prev: omp_get_max_threads,  Up: Thread Team Routines

3.1.4 'omp_get_thread_num' - Current thread ID
----------------------------------------------

_Description_:
     Returns a unique thread identification number within the current
     team.  In a sequential parts of the program, 'omp_get_thread_num'
     always returns 0.  In parallel regions the return value varies from
     0 to 'omp_get_num_threads'-1 inclusive.  The return value of the
     primary thread of a team is always 0.

_C/C++_:
     _Prototype_:   'int omp_get_thread_num(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_thread_num()'

_See also_:
     *note omp_get_num_threads::, *note omp_get_ancestor_thread_num::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.4.


File: libgomp.info,  Node: omp_in_parallel,  Next: omp_set_dynamic,  Prev: omp_get_thread_num,  Up: Thread Team Routines

3.1.5 'omp_in_parallel' - Whether a parallel region is active
-------------------------------------------------------------

_Description_:
     This function returns 'true' if currently running in parallel,
     'false' otherwise.  Here, 'true' and 'false' represent their
     language-specific counterparts.

_C/C++_:
     _Prototype_:   'int omp_in_parallel(void);'

_Fortran_:
     _Interface_:   'logical function omp_in_parallel()'

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.6.


File: libgomp.info,  Node: omp_set_dynamic,  Next: omp_get_dynamic,  Prev: omp_in_parallel,  Up: Thread Team Routines

3.1.6 'omp_set_dynamic' - Enable/disable dynamic teams
------------------------------------------------------

_Description_:
     Enable or disable the dynamic adjustment of the number of threads
     within a team.  The function takes the language-specific equivalent
     of 'true' and 'false', where 'true' enables dynamic adjustment of
     team sizes and 'false' disables it.

_C/C++_:
     _Prototype_:   'void omp_set_dynamic(int dynamic_threads);'

_Fortran_:
     _Interface_:   'subroutine omp_set_dynamic(dynamic_threads)'
                    'logical, intent(in) :: dynamic_threads'

_See also_:
     *note OMP_DYNAMIC::, *note omp_get_dynamic::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.7.


File: libgomp.info,  Node: omp_get_dynamic,  Next: omp_get_cancellation,  Prev: omp_set_dynamic,  Up: Thread Team Routines

3.1.7 'omp_get_dynamic' - Dynamic teams setting
-----------------------------------------------

_Description_:
     This function returns 'true' if enabled, 'false' otherwise.  Here,
     'true' and 'false' represent their language-specific counterparts.

     The dynamic team setting may be initialized at startup by the
     'OMP_DYNAMIC' environment variable or at runtime using
     'omp_set_dynamic'.  If undefined, dynamic adjustment is disabled by
     default.

_C/C++_:
     _Prototype_:   'int omp_get_dynamic(void);'

_Fortran_:
     _Interface_:   'logical function omp_get_dynamic()'

_See also_:
     *note omp_set_dynamic::, *note OMP_DYNAMIC::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.8.


File: libgomp.info,  Node: omp_get_cancellation,  Next: omp_set_nested,  Prev: omp_get_dynamic,  Up: Thread Team Routines

3.1.8 'omp_get_cancellation' - Whether cancellation support is enabled
----------------------------------------------------------------------

_Description_:
     This function returns 'true' if cancellation is activated, 'false'
     otherwise.  Here, 'true' and 'false' represent their
     language-specific counterparts.  Unless 'OMP_CANCELLATION' is set
     true, cancellations are deactivated.

_C/C++_:
     _Prototype_:   'int omp_get_cancellation(void);'

_Fortran_:
     _Interface_:   'logical function omp_get_cancellation()'

_See also_:
     *note OMP_CANCELLATION::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.9.


File: libgomp.info,  Node: omp_set_nested,  Next: omp_get_nested,  Prev: omp_get_cancellation,  Up: Thread Team Routines

3.1.9 'omp_set_nested' - Enable/disable nested parallel regions
---------------------------------------------------------------

_Description_:
     Enable or disable nested parallel regions, i.e., whether team
     members are allowed to create new teams.  The function takes the
     language-specific equivalent of 'true' and 'false', where 'true'
     enables dynamic adjustment of team sizes and 'false' disables it.

     Enabling nested parallel regions also sets the maximum number of
     active nested regions to the maximum supported.  Disabling nested
     parallel regions sets the maximum number of active nested regions
     to one.

     Note that the 'omp_set_nested' API routine was deprecated in the
     OpenMP specification 5.2 in favor of 'omp_set_max_active_levels'.

_C/C++_:
     _Prototype_:   'void omp_set_nested(int nested);'

_Fortran_:
     _Interface_:   'subroutine omp_set_nested(nested)'
                    'logical, intent(in) :: nested'

_See also_:
     *note omp_get_nested::, *note omp_set_max_active_levels::, *note
     OMP_MAX_ACTIVE_LEVELS::, *note OMP_NESTED::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.10.


File: libgomp.info,  Node: omp_get_nested,  Next: omp_set_schedule,  Prev: omp_set_nested,  Up: Thread Team Routines

3.1.10 'omp_get_nested' - Nested parallel regions
-------------------------------------------------

_Description_:
     This function returns 'true' if nested parallel regions are
     enabled, 'false' otherwise.  Here, 'true' and 'false' represent
     their language-specific counterparts.

     The state of nested parallel regions at startup depends on several
     environment variables.  If 'OMP_MAX_ACTIVE_LEVELS' is defined and
     is set to greater than one, then nested parallel regions will be
     enabled.  If not defined, then the value of the 'OMP_NESTED'
     environment variable will be followed if defined.  If neither are
     defined, then if either 'OMP_NUM_THREADS' or 'OMP_PROC_BIND' are
     defined with a list of more than one value, then nested parallel
     regions are enabled.  If none of these are defined, then nested
     parallel regions are disabled by default.

     Nested parallel regions can be enabled or disabled at runtime using
     'omp_set_nested', or by setting the maximum number of nested
     regions with 'omp_set_max_active_levels' to one to disable, or
     above one to enable.

     Note that the 'omp_get_nested' API routine was deprecated in the
     OpenMP specification 5.2 in favor of 'omp_get_max_active_levels'.

_C/C++_:
     _Prototype_:   'int omp_get_nested(void);'

_Fortran_:
     _Interface_:   'logical function omp_get_nested()'

_See also_:
     *note omp_get_max_active_levels::, *note omp_set_nested::, *note
     OMP_MAX_ACTIVE_LEVELS::, *note OMP_NESTED::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.11.


File: libgomp.info,  Node: omp_set_schedule,  Next: omp_get_schedule,  Prev: omp_get_nested,  Up: Thread Team Routines

3.1.11 'omp_set_schedule' - Set the runtime scheduling method
-------------------------------------------------------------

_Description_:
     Sets the runtime scheduling method.  The KIND argument can have the
     value 'omp_sched_static', 'omp_sched_dynamic', 'omp_sched_guided'
     or 'omp_sched_auto'.  Except for 'omp_sched_auto', the chunk size
     is set to the value of CHUNK_SIZE if positive, or to the default
     value if zero or negative.  For 'omp_sched_auto' the CHUNK_SIZE
     argument is ignored.

_C/C++_
     _Prototype_:   'void omp_set_schedule(omp_sched_t kind, int
                    chunk_size);'

_Fortran_:
     _Interface_:   'subroutine omp_set_schedule(kind, chunk_size)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer chunk_size'

_See also_:
     *note omp_get_schedule:: *note OMP_SCHEDULE::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.12.


File: libgomp.info,  Node: omp_get_schedule,  Next: omp_get_teams_thread_limit,  Prev: omp_set_schedule,  Up: Thread Team Routines

3.1.12 'omp_get_schedule' - Obtain the runtime scheduling method
----------------------------------------------------------------

_Description_:
     Obtain the runtime scheduling method.  The KIND argument is set to
     'omp_sched_static', 'omp_sched_dynamic', 'omp_sched_guided' or
     'omp_sched_auto'.  The second argument, CHUNK_SIZE, is set to the
     chunk size.

_C/C++_
     _Prototype_:   'void omp_get_schedule(omp_sched_t *kind, int
                    *chunk_size);'

_Fortran_:
     _Interface_:   'subroutine omp_get_schedule(kind, chunk_size)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer chunk_size'

_See also_:
     *note omp_set_schedule::, *note OMP_SCHEDULE::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.13.


File: libgomp.info,  Node: omp_get_teams_thread_limit,  Next: omp_get_supported_active_levels,  Prev: omp_get_schedule,  Up: Thread Team Routines

3.1.13 'omp_get_teams_thread_limit' - Maximum number of threads imposed by teams
--------------------------------------------------------------------------------

_Description_:
     Return the maximum number of threads that are able to participate
     in each team created by a teams construct.

_C/C++_:
     _Prototype_:   'int omp_get_teams_thread_limit(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_teams_thread_limit()'

_See also_:
     *note omp_set_teams_thread_limit::, *note OMP_TEAMS_THREAD_LIMIT::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.4.6.


File: libgomp.info,  Node: omp_get_supported_active_levels,  Next: omp_set_max_active_levels,  Prev: omp_get_teams_thread_limit,  Up: Thread Team Routines

3.1.14 'omp_get_supported_active_levels' - Maximum number of active regions supported
-------------------------------------------------------------------------------------

_Description_:
     This function returns the maximum number of nested, active parallel
     regions supported by this implementation.

_C/C++_
     _Prototype_:   'int omp_get_supported_active_levels(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_supported_active_levels()'

_See also_:
     *note omp_get_max_active_levels::, *note
     omp_set_max_active_levels::

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.2.15.


File: libgomp.info,  Node: omp_set_max_active_levels,  Next: omp_get_max_active_levels,  Prev: omp_get_supported_active_levels,  Up: Thread Team Routines

3.1.15 'omp_set_max_active_levels' - Limits the number of active parallel regions
---------------------------------------------------------------------------------

_Description_:
     This function limits the maximum allowed number of nested, active
     parallel regions.  MAX_LEVELS must be less or equal to the value
     returned by 'omp_get_supported_active_levels'.

_C/C++_
     _Prototype_:   'void omp_set_max_active_levels(int max_levels);'

_Fortran_:
     _Interface_:   'subroutine omp_set_max_active_levels(max_levels)'
                    'integer max_levels'

_See also_:
     *note omp_get_max_active_levels::, *note omp_get_active_level::,
     *note omp_get_supported_active_levels::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.15.


File: libgomp.info,  Node: omp_get_max_active_levels,  Next: omp_get_level,  Prev: omp_set_max_active_levels,  Up: Thread Team Routines

3.1.16 'omp_get_max_active_levels' - Current maximum number of active regions
-----------------------------------------------------------------------------

_Description_:
     This function obtains the maximum allowed number of nested, active
     parallel regions.

_C/C++_
     _Prototype_:   'int omp_get_max_active_levels(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_max_active_levels()'

_See also_:
     *note omp_set_max_active_levels::, *note omp_get_active_level::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.16.


File: libgomp.info,  Node: omp_get_level,  Next: omp_get_ancestor_thread_num,  Prev: omp_get_max_active_levels,  Up: Thread Team Routines

3.1.17 'omp_get_level' - Obtain the current nesting level
---------------------------------------------------------

_Description_:
     This function returns the nesting level for the parallel blocks,
     which enclose the calling call.

_C/C++_
     _Prototype_:   'int omp_get_level(void);'

_Fortran_:
     _Interface_:   'integer function omp_level()'

_See also_:
     *note omp_get_active_level::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.17.


File: libgomp.info,  Node: omp_get_ancestor_thread_num,  Next: omp_get_team_size,  Prev: omp_get_level,  Up: Thread Team Routines

3.1.18 'omp_get_ancestor_thread_num' - Ancestor thread ID
---------------------------------------------------------

_Description_:
     This function returns the thread identification number for the
     given nesting level of the current thread.  For values of LEVEL
     outside zero to 'omp_get_level' -1 is returned; if LEVEL is
     'omp_get_level' the result is identical to 'omp_get_thread_num'.

_C/C++_
     _Prototype_:   'int omp_get_ancestor_thread_num(int level);'

_Fortran_:
     _Interface_:   'integer function omp_get_ancestor_thread_num(level)'
                    'integer level'

_See also_:
     *note omp_get_level::, *note omp_get_thread_num::, *note
     omp_get_team_size::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.18.


File: libgomp.info,  Node: omp_get_team_size,  Next: omp_get_active_level,  Prev: omp_get_ancestor_thread_num,  Up: Thread Team Routines

3.1.19 'omp_get_team_size' - Number of threads in a team
--------------------------------------------------------

_Description_:
     This function returns the number of threads in a thread team to
     which either the current thread or its ancestor belongs.  For
     values of LEVEL outside zero to 'omp_get_level', -1 is returned; if
     LEVEL is zero, 1 is returned, and for 'omp_get_level', the result
     is identical to 'omp_get_num_threads'.

_C/C++_:
     _Prototype_:   'int omp_get_team_size(int level);'

_Fortran_:
     _Interface_:   'integer function omp_get_team_size(level)'
                    'integer level'

_See also_:
     *note omp_get_num_threads::, *note omp_get_level::, *note
     omp_get_ancestor_thread_num::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.19.


File: libgomp.info,  Node: omp_get_active_level,  Prev: omp_get_team_size,  Up: Thread Team Routines

3.1.20 'omp_get_active_level' - Number of parallel regions
----------------------------------------------------------

_Description_:
     This function returns the nesting level for the active parallel
     blocks, which enclose the calling call.

_C/C++_
     _Prototype_:   'int omp_get_active_level(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_active_level()'

_See also_:
     *note omp_get_level::, *note omp_get_max_active_levels::, *note
     omp_set_max_active_levels::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.20.


File: libgomp.info,  Node: Thread Affinity Routines,  Next: Teams Region Routines,  Prev: Thread Team Routines,  Up: Runtime Library Routines

3.2 Thread Affinity Routines
============================

Routines controlling and accessing thread-affinity policies.  They have
C linkage and do not throw exceptions.

* Menu:

* omp_get_proc_bind::           Whether threads may be moved between CPUs


File: libgomp.info,  Node: omp_get_proc_bind,  Up: Thread Affinity Routines

3.2.1 'omp_get_proc_bind' - Whether threads may be moved between CPUs
---------------------------------------------------------------------

_Description_:
     This functions returns the currently active thread affinity policy,
     which is set via 'OMP_PROC_BIND'.  Possible values are
     'omp_proc_bind_false', 'omp_proc_bind_true',
     'omp_proc_bind_primary', 'omp_proc_bind_master',
     'omp_proc_bind_close' and 'omp_proc_bind_spread', where
     'omp_proc_bind_master' is an alias for 'omp_proc_bind_primary'.

_C/C++_:
     _Prototype_:   'omp_proc_bind_t omp_get_proc_bind(void);'

_Fortran_:
     _Interface_:   'integer(kind=omp_proc_bind_kind) function
                    omp_get_proc_bind()'

_See also_:
     *note OMP_PROC_BIND::, *note OMP_PLACES::, *note
     GOMP_CPU_AFFINITY::,

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.22.


File: libgomp.info,  Node: Teams Region Routines,  Next: Tasking Routines,  Prev: Thread Affinity Routines,  Up: Runtime Library Routines

3.3 Teams Region Routines
=========================

Routines controlling the league of teams that are executed in a 'teams'
region.  They have C linkage and do not throw exceptions.

* Menu:

* omp_get_num_teams::           Number of teams
* omp_get_team_num::            Get team number
* omp_set_num_teams::           Set upper teams limit for teams region
* omp_get_max_teams::           Maximum number of teams for teams region
* omp_set_teams_thread_limit::  Set upper thread limit for teams construct
* omp_get_thread_limit::        Maximum number of threads


File: libgomp.info,  Node: omp_get_num_teams,  Next: omp_get_team_num,  Up: Teams Region Routines

3.3.1 'omp_get_num_teams' - Number of teams
-------------------------------------------

_Description_:
     Returns the number of teams in the current team region.

_C/C++_:
     _Prototype_:   'int omp_get_num_teams(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_num_teams()'

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.32.


File: libgomp.info,  Node: omp_get_team_num,  Next: omp_set_num_teams,  Prev: omp_get_num_teams,  Up: Teams Region Routines

3.3.2 'omp_get_team_num' - Get team number
------------------------------------------

_Description_:
     Returns the team number of the calling thread.

_C/C++_:
     _Prototype_:   'int omp_get_team_num(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_team_num()'

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.33.


File: libgomp.info,  Node: omp_set_num_teams,  Next: omp_get_max_teams,  Prev: omp_get_team_num,  Up: Teams Region Routines

3.3.3 'omp_set_num_teams' - Set upper teams limit for teams construct
---------------------------------------------------------------------

_Description_:
     Specifies the upper bound for number of teams created by the teams
     construct which does not specify a 'num_teams' clause.  The
     argument of 'omp_set_num_teams' shall be a positive integer.

_C/C++_:
     _Prototype_:   'void omp_set_num_teams(int num_teams);'

_Fortran_:
     _Interface_:   'subroutine omp_set_num_teams(num_teams)'
                    'integer, intent(in) :: num_teams'

_See also_:
     *note OMP_NUM_TEAMS::, *note omp_get_num_teams::, *note
     omp_get_max_teams::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.4.3.


File: libgomp.info,  Node: omp_get_max_teams,  Next: omp_set_teams_thread_limit,  Prev: omp_set_num_teams,  Up: Teams Region Routines

3.3.4 'omp_get_max_teams' - Maximum number of teams of teams region
-------------------------------------------------------------------

_Description_:
     Return the maximum number of teams used for the teams region that
     does not use the clause 'num_teams'.

_C/C++_:
     _Prototype_:   'int omp_get_max_teams(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_max_teams()'

_See also_:
     *note omp_set_num_teams::, *note omp_get_num_teams::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.4.4.


File: libgomp.info,  Node: omp_set_teams_thread_limit,  Next: omp_get_thread_limit,  Prev: omp_get_max_teams,  Up: Teams Region Routines

3.3.5 'omp_set_teams_thread_limit' - Set upper thread limit for teams construct
-------------------------------------------------------------------------------

_Description_:
     Specifies the upper bound for number of threads that are available
     for each team created by the teams construct which does not specify
     a 'thread_limit' clause.  The argument of
     'omp_set_teams_thread_limit' shall be a positive integer.

_C/C++_:
     _Prototype_:   'void omp_set_teams_thread_limit(int thread_limit);'

_Fortran_:
     _Interface_:   'subroutine omp_set_teams_thread_limit(thread_limit)'
                    'integer, intent(in) :: thread_limit'

_See also_:
     *note OMP_TEAMS_THREAD_LIMIT::, *note omp_get_teams_thread_limit::,
     *note omp_get_thread_limit::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.4.5.


File: libgomp.info,  Node: omp_get_thread_limit,  Prev: omp_set_teams_thread_limit,  Up: Teams Region Routines

3.3.6 'omp_get_thread_limit' - Maximum number of threads
--------------------------------------------------------

_Description_:
     Return the maximum number of threads of the program.

_C/C++_:
     _Prototype_:   'int omp_get_thread_limit(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_thread_limit()'

_See also_:
     *note omp_get_max_threads::, *note OMP_THREAD_LIMIT::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.14.


File: libgomp.info,  Node: Tasking Routines,  Next: Resource Relinquishing Routines,  Prev: Teams Region Routines,  Up: Runtime Library Routines

3.4 Tasking Routines
====================

Routines relating to explicit tasks.  They have C linkage and do not
throw exceptions.

* Menu:

* omp_get_max_task_priority::   Maximum task priority value that can be set
* omp_in_explicit_task::        Whether a given task is an explicit task
* omp_in_final::                Whether in final or included task region


File: libgomp.info,  Node: omp_get_max_task_priority,  Next: omp_in_explicit_task,  Up: Tasking Routines

3.4.1 'omp_get_max_task_priority' - Maximum priority value
----------------------------------------------------------

that can be set for tasks.
_Description_:
     This function obtains the maximum allowed priority number for
     tasks.

_C/C++_
     _Prototype_:   'int omp_get_max_task_priority(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_max_task_priority()'

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.29.


File: libgomp.info,  Node: omp_in_explicit_task,  Next: omp_in_final,  Prev: omp_get_max_task_priority,  Up: Tasking Routines

3.4.2 'omp_in_explicit_task' - Whether a given task is an explicit task
-----------------------------------------------------------------------

_Description_:
     The function returns the EXPLICIT-TASK-VAR ICV; it returns true
     when the encountering task was generated by a task-generating
     construct such as 'target', 'task' or 'taskloop'.  Otherwise, the
     encountering task is in an implicit task region such as generated
     by the implicit or explicit 'parallel' region and
     'omp_in_explicit_task' returns false.

_C/C++_
     _Prototype_:   'int omp_in_explicit_task(void);'

_Fortran_:
     _Interface_:   'logical function omp_in_explicit_task()'

_Reference_:
     OpenMP specification v5.2 (https://www.openmp.org), Section 18.5.2.


File: libgomp.info,  Node: omp_in_final,  Prev: omp_in_explicit_task,  Up: Tasking Routines

3.4.3 'omp_in_final' - Whether in final or included task region
---------------------------------------------------------------

_Description_:
     This function returns 'true' if currently running in a final or
     included task region, 'false' otherwise.  Here, 'true' and 'false'
     represent their language-specific counterparts.

_C/C++_:
     _Prototype_:   'int omp_in_final(void);'

_Fortran_:
     _Interface_:   'logical function omp_in_final()'

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.21.


File: libgomp.info,  Node: Resource Relinquishing Routines,  Next: Device Information Routines,  Prev: Tasking Routines,  Up: Runtime Library Routines

3.5 Resource Relinquishing Routines
===================================

Routines releasing resources used by the OpenMP runtime.  They have C
linkage and do not throw exceptions.

* Menu:

* omp_pause_resource:: Release OpenMP resources on a device
* omp_pause_resource_all:: Release OpenMP resources on all devices


File: libgomp.info,  Node: omp_pause_resource,  Next: omp_pause_resource_all,  Up: Resource Relinquishing Routines

3.5.1 'omp_pause_resource' - Release OpenMP resources on a device
-----------------------------------------------------------------

_Description_:
     Free resources used by the OpenMP program and the runtime library
     on and for the device specified by DEVICE_NUM; on success, zero is
     returned and non-zero otherwise.

     The value of DEVICE_NUM must be a conforming device number.  The
     routine may not be called from within any explicit region and all
     explicit threads that do not bind to the implicit parallel region
     have finalized execution.

_C/C++_:
     _Prototype_:   'int omp_pause_resource(omp_pause_resource_t kind, int
                    device_num);'

_Fortran_:
     _Interface_:   'integer function omp_pause_resource(kind, device_num)'
                    'integer (kind=omp_pause_resource_kind) kind'
                    'integer device_num'

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.2.43.


File: libgomp.info,  Node: omp_pause_resource_all,  Prev: omp_pause_resource,  Up: Resource Relinquishing Routines

3.5.2 'omp_pause_resource_all' - Release OpenMP resources on all devices
------------------------------------------------------------------------

_Description_:
     Free resources used by the OpenMP program and the runtime library
     on all devices, including the host.  On success, zero is returned
     and non-zero otherwise.

     The routine may not be called from within any explicit region and
     all explicit threads that do not bind to the implicit parallel
     region have finalized execution.

_C/C++_:
     _Prototype_:   'int omp_pause_resource(omp_pause_resource_t kind);'

_Fortran_:
     _Interface_:   'integer function omp_pause_resource(kind)'
                    'integer (kind=omp_pause_resource_kind) kind'

_See also_:
     *note omp_pause_resource::

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.2.44.


File: libgomp.info,  Node: Device Information Routines,  Next: Device Memory Routines,  Prev: Resource Relinquishing Routines,  Up: Runtime Library Routines

3.6 Device Information Routines
===============================

Routines related to devices available to an OpenMP program.  They have C
linkage and do not throw exceptions.

* Menu:

* omp_get_num_procs::           Number of processors online
* omp_set_default_device::      Set the default device for target regions
* omp_get_default_device::      Get the default device for target regions
* omp_get_num_devices::         Number of target devices
* omp_get_device_num::          Get device that current thread is running on
* omp_is_initial_device::       Whether executing on the host device
* omp_get_initial_device::      Device number of host device


File: libgomp.info,  Node: omp_get_num_procs,  Next: omp_set_default_device,  Up: Device Information Routines

3.6.1 'omp_get_num_procs' - Number of processors online
-------------------------------------------------------

_Description_:
     Returns the number of processors online on that device.

_C/C++_:
     _Prototype_:   'int omp_get_num_procs(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_num_procs()'

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.5.


File: libgomp.info,  Node: omp_set_default_device,  Next: omp_get_default_device,  Prev: omp_get_num_procs,  Up: Device Information Routines

3.6.2 'omp_set_default_device' - Set the default device for target regions
--------------------------------------------------------------------------

_Description_:
     Set the default device for target regions without device clause.
     The argument shall be a nonnegative device number.

_C/C++_:
     _Prototype_:   'void omp_set_default_device(int device_num);'

_Fortran_:
     _Interface_:   'subroutine omp_set_default_device(device_num)'
                    'integer device_num'

_See also_:
     *note OMP_DEFAULT_DEVICE::, *note omp_get_default_device::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.29.


File: libgomp.info,  Node: omp_get_default_device,  Next: omp_get_num_devices,  Prev: omp_set_default_device,  Up: Device Information Routines

3.6.3 'omp_get_default_device' - Get the default device for target regions
--------------------------------------------------------------------------

_Description_:
     Get the default device for target regions without device clause.

_C/C++_:
     _Prototype_:   'int omp_get_default_device(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_default_device()'

_See also_:
     *note OMP_DEFAULT_DEVICE::, *note omp_set_default_device::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.30.


File: libgomp.info,  Node: omp_get_num_devices,  Next: omp_get_device_num,  Prev: omp_get_default_device,  Up: Device Information Routines

3.6.4 'omp_get_num_devices' - Number of target devices
------------------------------------------------------

_Description_:
     Returns the number of target devices.

_C/C++_:
     _Prototype_:   'int omp_get_num_devices(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_num_devices()'

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.31.


File: libgomp.info,  Node: omp_get_device_num,  Next: omp_is_initial_device,  Prev: omp_get_num_devices,  Up: Device Information Routines

3.6.5 'omp_get_device_num' - Return device number of current device
-------------------------------------------------------------------

_Description_:
     This function returns a device number that represents the device
     that the current thread is executing on.  For OpenMP 5.0, this must
     be equal to the value returned by the 'omp_get_initial_device'
     function when called from the host.

_C/C++_
     _Prototype_:   'int omp_get_device_num(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_device_num()'

_See also_:
     *note omp_get_initial_device::

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.2.37.


File: libgomp.info,  Node: omp_is_initial_device,  Next: omp_get_initial_device,  Prev: omp_get_device_num,  Up: Device Information Routines

3.6.6 'omp_is_initial_device' - Whether executing on the host device
--------------------------------------------------------------------

_Description_:
     This function returns 'true' if currently running on the host
     device, 'false' otherwise.  Here, 'true' and 'false' represent
     their language-specific counterparts.

_C/C++_:
     _Prototype_:   'int omp_is_initial_device(void);'

_Fortran_:
     _Interface_:   'logical function omp_is_initial_device()'

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.34.


File: libgomp.info,  Node: omp_get_initial_device,  Prev: omp_is_initial_device,  Up: Device Information Routines

3.6.7 'omp_get_initial_device' - Return device number of initial device
-----------------------------------------------------------------------

_Description_:
     This function returns a device number that represents the host
     device.  For OpenMP 5.1, this must be equal to the value returned
     by the 'omp_get_num_devices' function.

_C/C++_
     _Prototype_:   'int omp_get_initial_device(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_initial_device()'

_See also_:
     *note omp_get_num_devices::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.35.


File: libgomp.info,  Node: Device Memory Routines,  Next: Lock Routines,  Prev: Device Information Routines,  Up: Runtime Library Routines

3.7 Device Memory Routines
==========================

Routines related to memory allocation and managing corresponding
pointers on devices.  They have C linkage and do not throw exceptions.

* Menu:

* omp_target_alloc:: Allocate device memory
* omp_target_free:: Free device memory
* omp_target_is_present:: Check whether storage is mapped
* omp_target_is_accessible:: Check whether memory is device accessible
* omp_target_memcpy:: Copy data between devices
* omp_target_memcpy_async:: Copy data between devices asynchronously
* omp_target_memcpy_rect:: Copy a subvolume of data between devices
* omp_target_memcpy_rect_async:: Copy a subvolume of data between devices asynchronously
* omp_target_associate_ptr:: Associate a device pointer with a host pointer
* omp_target_disassociate_ptr:: Remove device-host pointer association
* omp_get_mapped_ptr:: Return device pointer to a host pointer


File: libgomp.info,  Node: omp_target_alloc,  Next: omp_target_free,  Up: Device Memory Routines

3.7.1 'omp_target_alloc' - Allocate device memory
-------------------------------------------------

_Description_:
     This routine allocates SIZE bytes of memory in the device
     environment associated with the device number DEVICE_NUM.  If
     successful, a device pointer is returned, otherwise a null pointer.

     In GCC, when the device is the host or the device shares memory
     with the host, the memory is allocated on the host; in that case,
     when SIZE is zero, either NULL or a unique pointer value that can
     later be successfully passed to 'omp_target_free' is returned.
     When the allocation is not performed on the host, a null pointer is
     returned when SIZE is zero; in that case, additionally a diagnostic
     might be printed to standard error (stderr).

     Running this routine in a 'target' region except on the initial
     device is not supported.

_C/C++_
     _Prototype_:   'void *omp_target_alloc(size_t size, int device_num)'

_Fortran_:
     _Interface_:   'type(c_ptr) function omp_target_alloc(size, device_num)
                    bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_int,
                    c_size_t'
                    'integer(c_size_t), value :: size'
                    'integer(c_int), value :: device_num'

_See also_:
     *note omp_target_free::, *note omp_target_associate_ptr::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.1


File: libgomp.info,  Node: omp_target_free,  Next: omp_target_is_present,  Prev: omp_target_alloc,  Up: Device Memory Routines

3.7.2 'omp_target_free' - Free device memory
--------------------------------------------

_Description_:
     This routine frees memory allocated by the 'omp_target_alloc'
     routine.  The DEVICE_PTR argument must be either a null pointer or
     a device pointer returned by 'omp_target_alloc' for the specified
     'device_num'.  The device number DEVICE_NUM must be a conforming
     device number.

     Running this routine in a 'target' region except on the initial
     device is not supported.

_C/C++_
     _Prototype_:   'void omp_target_free(void *device_ptr, int device_num)'

_Fortran_:
     _Interface_:   'subroutine omp_target_free(device_ptr, device_num)
                    bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_int'
                    'type(c_ptr), value :: device_ptr'
                    'integer(c_int), value :: device_num'

_See also_:
     *note omp_target_alloc::, *note omp_target_disassociate_ptr::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.2


File: libgomp.info,  Node: omp_target_is_present,  Next: omp_target_is_accessible,  Prev: omp_target_free,  Up: Device Memory Routines

3.7.3 'omp_target_is_present' - Check whether storage is mapped
---------------------------------------------------------------

_Description_:
     This routine tests whether storage, identified by the host pointer
     PTR is mapped to the device specified by DEVICE_NUM.  If so, it
     returns a nonzero value and otherwise zero.

     In GCC, this includes self mapping such that
     'omp_target_is_present' returns _true_ when DEVICE_NUM specifies
     the host or when the host and the device share memory.  If PTR is a
     null pointer, TRUE is returned and if DEVICE_NUM is an invalid
     device number, FALSE is returned.

     If those conditions do not apply, _true_ is returned if the
     association has been established by an explicit or implicit 'map'
     clause, the 'declare target' directive or a call to the
     'omp_target_associate_ptr' routine.

     Running this routine in a 'target' region except on the initial
     device is not supported.

_C/C++_
     _Prototype_:   'int omp_target_is_present(const void *ptr,'
                    ' int device_num)'

_Fortran_:
     _Interface_:   'integer(c_int) function omp_target_is_present(ptr, &'
                    ' device_num) bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_int'
                    'type(c_ptr), value :: ptr'
                    'integer(c_int), value :: device_num'

_See also_:
     *note omp_target_associate_ptr::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.3


File: libgomp.info,  Node: omp_target_is_accessible,  Next: omp_target_memcpy,  Prev: omp_target_is_present,  Up: Device Memory Routines

3.7.4 'omp_target_is_accessible' - Check whether memory is device accessible
----------------------------------------------------------------------------

_Description_:
     This routine tests whether memory, starting at the address given by
     PTR and extending SIZE bytes, is accessibly on the device specified
     by DEVICE_NUM.  If so, it returns a nonzero value and otherwise
     zero.

     The address given by PTR is interpreted to be in the address space
     of the device and SIZE must be positive.

     Note that GCC's current implementation assumes that PTR is a valid
     host pointer.  Therefore, all addresses given by PTR are assumed to
     be accessible on the initial device.  And, to err on the safe side,
     this memory is only available on a non-host device that can access
     all host memory ([uniform] shared memory access).

     Running this routine in a 'target' region except on the initial
     device is not supported.

_C/C++_
     _Prototype_:   'int omp_target_is_accessible(const void *ptr,'
                    ' size_t size,'
                    ' int device_num)'

_Fortran_:
     _Interface_:   'integer(c_int) function omp_target_is_accessible(ptr,
                    &'
                    ' size, device_num) bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_size_t,
                    c_int'
                    'type(c_ptr), value :: ptr'
                    'integer(c_size_t), value :: size'
                    'integer(c_int), value :: device_num'

_See also_:
     *note omp_target_associate_ptr::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.4


File: libgomp.info,  Node: omp_target_memcpy,  Next: omp_target_memcpy_async,  Prev: omp_target_is_accessible,  Up: Device Memory Routines

3.7.5 'omp_target_memcpy' - Copy data between devices
-----------------------------------------------------

_Description_:
     This routine copies LENGTH of bytes of data from the device
     identified by device number SRC_DEVICE_NUM to device
     DST_DEVICE_NUM.  The data is copied from the source device from the
     address provided by SRC, shifted by the offset of SRC_OFFSET bytes,
     to the destination device's DST address shifted by DST_OFFSET.  The
     routine returns zero on success and non-zero otherwise.

     Running this routine in a 'target' region except on the initial
     device is not supported.

_C/C++_
     _Prototype_:   'int omp_target_memcpy(void *dst,'
                    ' const void *src,'
                    ' size_t length,'
                    ' size_t dst_offset,'
                    ' size_t src_offset,'
                    ' int dst_device_num,'
                    ' int src_device_num)'

_Fortran_:
     _Interface_:   'integer(c_int) function omp_target_memcpy( &'
                    ' dst, src, length, dst_offset, src_offset, &'
                    ' dst_device_num, src_device_num) bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_size_t,
                    c_int'
                    'type(c_ptr), value :: dst, src'
                    'integer(c_size_t), value :: length, dst_offset,
                    src_offset'
                    'integer(c_int), value :: dst_device_num,
                    src_device_num'

_See also_:
     *note omp_target_memcpy_async::, *note omp_target_memcpy_rect::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.5


File: libgomp.info,  Node: omp_target_memcpy_async,  Next: omp_target_memcpy_rect,  Prev: omp_target_memcpy,  Up: Device Memory Routines

3.7.6 'omp_target_memcpy_async' - Copy data between devices asynchronously
--------------------------------------------------------------------------

_Description_:
     This routine copies asynchronously LENGTH of bytes of data from the
     device identified by device number SRC_DEVICE_NUM to device
     DST_DEVICE_NUM.  The data is copied from the source device from the
     address provided by SRC, shifted by the offset of SRC_OFFSET bytes,
     to the destination device's DST address shifted by DST_OFFSET.
     Task dependence is expressed by passing an array of depend objects
     to DEPOBJ_LIST, where the number of array elements is passed as
     DEPOBJ_COUNT; if the count is zero, the DEPOBJ_LIST argument is
     ignored.  The routine returns zero if the copying process has
     successfully been started and non-zero otherwise.

     Running this routine in a 'target' region except on the initial
     device is not supported.

_C/C++_
     _Prototype_:   'int omp_target_memcpy_async(void *dst,'
                    ' const void *src,'
                    ' size_t length,'
                    ' size_t dst_offset,'
                    ' size_t src_offset,'
                    ' int dst_device_num,'
                    ' int src_device_num,'
                    ' int depobj_count,'
                    ' omp_depend_t *depobj_list)'

_Fortran_:
     _Interface_:   'integer(c_int) function omp_target_memcpy_async( &'
                    ' dst, src, length, dst_offset, src_offset, &'
                    ' dst_device_num, src_device_num, &'
                    ' depobj_count, depobj_list) bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_size_t,
                    c_int'
                    'type(c_ptr), value :: dst, src'
                    'integer(c_size_t), value :: length, dst_offset,
                    src_offset'
                    'integer(c_int), value :: dst_device_num,
                    src_device_num, depobj_count'
                    'integer(omp_depend_kind), optional :: depobj_list(*)'

_See also_:
     *note omp_target_memcpy::, *note omp_target_memcpy_rect_async::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.7


File: libgomp.info,  Node: omp_target_memcpy_rect,  Next: omp_target_memcpy_rect_async,  Prev: omp_target_memcpy_async,  Up: Device Memory Routines

3.7.7 'omp_target_memcpy_rect' - Copy a subvolume of data between devices
-------------------------------------------------------------------------

_Description_:
     This routine copies a subvolume of data from the device identified
     by device number SRC_DEVICE_NUM to device DST_DEVICE_NUM.  The
     array has NUM_DIMS dimensions and each array element has a size of
     ELEMENT_SIZE bytes.  The VOLUME array specifies how many elements
     per dimension are copied.  The full sizes of the destination and
     source arrays are given by the DST_DIMENSIONS and SRC_DIMENSIONS
     arguments, respectively.  The offset per dimension to the first
     element to be copied is given by the DST_OFFSET and SRC_OFFSET
     arguments.  The routine returns zero on success and non-zero
     otherwise.

     The OpenMP specification only requires that NUM_DIMS up to three is
     supported.  In order to find implementation-specific maximally
     supported number of dimensions, the routine returns this value when
     invoked with a null pointer to both the DST and SRC arguments.  As
     GCC supports arbitrary dimensions, it returns 'INT_MAX'.

     The device-number arguments must be conforming device numbers, the
     SRC and DST must be either both null pointers or all of the
     following must be fulfilled: ELEMENT_SIZE and NUM_DIMS must be
     positive and the VOLUME, offset and dimension arrays must have at
     least NUM_DIMS dimensions.

     Running this routine in a 'target' region is not supported except
     on the initial device.

_C/C++_
     _Prototype_:   'int omp_target_memcpy_rect(void *dst,'
                    ' const void *src,'
                    ' size_t element_size,'
                    ' int num_dims,'
                    ' const size_t *volume,'
                    ' const size_t *dst_offset,'
                    ' const size_t *src_offset,'
                    ' const size_t *dst_dimensions,'
                    ' const size_t *src_dimensions,'
                    ' int dst_device_num,'
                    ' int src_device_num)'

_Fortran_:
     _Interface_:   'integer(c_int) function omp_target_memcpy_rect( &'
                    ' dst, src, element_size, num_dims, volume, &'
                    ' dst_offset, src_offset, dst_dimensions, &'
                    ' src_dimensions, dst_device_num, src_device_num)
                    bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_size_t,
                    c_int'
                    'type(c_ptr), value :: dst, src'
                    'integer(c_size_t), value :: element_size, dst_offset,
                    src_offset'
                    'integer(c_size_t), value :: volume, dst_dimensions,
                    src_dimensions'
                    'integer(c_int), value :: num_dims, dst_device_num,
                    src_device_num'

_See also_:
     *note omp_target_memcpy_rect_async::, *note omp_target_memcpy::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.6


File: libgomp.info,  Node: omp_target_memcpy_rect_async,  Next: omp_target_associate_ptr,  Prev: omp_target_memcpy_rect,  Up: Device Memory Routines

3.7.8 'omp_target_memcpy_rect_async' - Copy a subvolume of data between devices asynchronously
----------------------------------------------------------------------------------------------

_Description_:
     This routine copies asynchronously a subvolume of data from the
     device identified by device number SRC_DEVICE_NUM to device
     DST_DEVICE_NUM.  The array has NUM_DIMS dimensions and each array
     element has a size of ELEMENT_SIZE bytes.  The VOLUME array
     specifies how many elements per dimension are copied.  The full
     sizes of the destination and source arrays are given by the
     DST_DIMENSIONS and SRC_DIMENSIONS arguments, respectively.  The
     offset per dimension to the first element to be copied is given by
     the DST_OFFSET and SRC_OFFSET arguments.  Task dependence is
     expressed by passing an array of depend objects to DEPOBJ_LIST,
     where the number of array elements is passed as DEPOBJ_COUNT; if
     the count is zero, the DEPOBJ_LIST argument is ignored.  The
     routine returns zero on success and non-zero otherwise.

     The OpenMP specification only requires that NUM_DIMS up to three is
     supported.  In order to find implementation-specific maximally
     supported number of dimensions, the routine returns this value when
     invoked with a null pointer to both the DST and SRC arguments.  As
     GCC supports arbitrary dimensions, it returns 'INT_MAX'.

     The device-number arguments must be conforming device numbers, the
     SRC and DST must be either both null pointers or all of the
     following must be fulfilled: ELEMENT_SIZE and NUM_DIMS must be
     positive and the VOLUME, offset and dimension arrays must have at
     least NUM_DIMS dimensions.

     Running this routine in a 'target' region is not supported except
     on the initial device.

_C/C++_
     _Prototype_:   'int omp_target_memcpy_rect_async(void *dst,'
                    ' const void *src,'
                    ' size_t element_size,'
                    ' int num_dims,'
                    ' const size_t *volume,'
                    ' const size_t *dst_offset,'
                    ' const size_t *src_offset,'
                    ' const size_t *dst_dimensions,'
                    ' const size_t *src_dimensions,'
                    ' int dst_device_num,'
                    ' int src_device_num,'
                    ' int depobj_count,'
                    ' omp_depend_t *depobj_list)'

_Fortran_:
     _Interface_:   'integer(c_int) function omp_target_memcpy_rect_async(
                    &'
                    ' dst, src, element_size, num_dims, volume, &'
                    ' dst_offset, src_offset, dst_dimensions, &'
                    ' src_dimensions, dst_device_num, src_device_num, &'
                    ' depobj_count, depobj_list) bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_size_t,
                    c_int'
                    'type(c_ptr), value :: dst, src'
                    'integer(c_size_t), value :: element_size, dst_offset,
                    src_offset'
                    'integer(c_size_t), value :: volume, dst_dimensions,
                    src_dimensions'
                    'integer(c_int), value :: num_dims, dst_device_num,
                    src_device_num'
                    'integer(c_int), value :: depobj_count'
                    'integer(omp_depend_kind), optional :: depobj_list(*)'

_See also_:
     *note omp_target_memcpy_rect::, *note omp_target_memcpy_async::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.8


File: libgomp.info,  Node: omp_target_associate_ptr,  Next: omp_target_disassociate_ptr,  Prev: omp_target_memcpy_rect_async,  Up: Device Memory Routines

3.7.9 'omp_target_associate_ptr' - Associate a device pointer with a host pointer
---------------------------------------------------------------------------------

_Description_:
     This routine associates storage on the host with storage on a
     device identified by DEVICE_NUM.  The device pointer is usually
     obtained by calling 'omp_target_alloc' or by other means (but not
     by using the 'map' clauses or the 'declare target' directive).  The
     host pointer should point to memory that has a storage size of at
     least SIZE.

     The DEVICE_OFFSET parameter specifies the offset into DEVICE_PTR
     that is used as the base address for the device side of the
     mapping; the storage size should be at least DEVICE_OFFSET plus
     SIZE.

     After the association, the host pointer can be used in a 'map'
     clause and in the 'to' and 'from' clauses of the 'target update'
     directive to transfer data between the associated pointers.  The
     reference count of such associated storage is infinite.  The
     association can be removed by calling 'omp_target_disassociate_ptr'
     which should be done before the lifetime of either storage ends.

     The routine returns nonzero ('EINVAL') when the DEVICE_NUM invalid,
     for when the initial device or the associated device shares memory
     with the host.  'omp_target_associate_ptr' returns zero if HOST_PTR
     points into already associated storage that is fully inside of a
     previously associated memory.  Otherwise, if the association was
     successful zero is returned; if none of the cases above apply,
     nonzero ('EINVAL') is returned.

     The 'omp_target_is_present' routine can be used to test whether
     associated storage for a device pointer exists.

     Running this routine in a 'target' region except on the initial
     device is not supported.

_C/C++_
     _Prototype_:   'int omp_target_associate_ptr(const void *host_ptr,'
                    ' const void *device_ptr,'
                    ' size_t size,'
                    ' size_t device_offset,'
                    ' int device_num)'

_Fortran_:
     _Interface_:   'integer(c_int) function
                    omp_target_associate_ptr(host_ptr, &'
                    ' device_ptr, size, device_offset, device_num) bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_int,
                    c_size_t'
                    'type(c_ptr), value :: host_ptr, device_ptr'
                    'integer(c_size_t), value :: size, device_offset'
                    'integer(c_int), value :: device_num'

_See also_:
     *note omp_target_disassociate_ptr::, *note omp_target_is_present::,
     *note omp_target_alloc::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.9


File: libgomp.info,  Node: omp_target_disassociate_ptr,  Next: omp_get_mapped_ptr,  Prev: omp_target_associate_ptr,  Up: Device Memory Routines

3.7.10 'omp_target_disassociate_ptr' - Remove device-host pointer association
-----------------------------------------------------------------------------

_Description_:
     This routine removes the storage association established by calling
     'omp_target_associate_ptr' and sets the reference count to zero,
     even if 'omp_target_associate_ptr' was invoked multiple times for
     for host pointer 'ptr'.  If applicable, the device memory needs to
     be freed by the user.

     If an associated device storage location for the DEVICE_NUM was
     found and has infinite reference count, the association is removed
     and zero is returned.  In all other cases, nonzero ('EINVAL') is
     returned and no other action is taken.

     Note that passing a host pointer where the association to the
     device pointer was established with the 'declare target' directive
     yields undefined behavior.

     Running this routine in a 'target' region except on the initial
     device is not supported.

_C/C++_
     _Prototype_:   'int omp_target_disassociate_ptr(const void *ptr,'
                    ' int device_num)'

_Fortran_:
     _Interface_:   'integer(c_int) function
                    omp_target_disassociate_ptr(ptr, &'
                    ' device_num) bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_int'
                    'type(c_ptr), value :: ptr'
                    'integer(c_int), value :: device_num'

_See also_:
     *note omp_target_associate_ptr::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.10


File: libgomp.info,  Node: omp_get_mapped_ptr,  Prev: omp_target_disassociate_ptr,  Up: Device Memory Routines

3.7.11 'omp_get_mapped_ptr' - Return device pointer to a host pointer
---------------------------------------------------------------------

_Description_:
     If the device number is refers to the initial device or to a device
     with memory accessible from the host (shared memory), the
     'omp_get_mapped_ptr' routines returns the value of the passed PTR.
     Otherwise, if associated storage to the passed host pointer PTR
     exists on device associated with DEVICE_NUM, it returns that
     pointer.  In all other cases and in cases of an error, a null
     pointer is returned.

     The association of storage location is established either via an
     explicit or implicit 'map' clause, the 'declare target' directive
     or the 'omp_target_associate_ptr' routine.

     Running this routine in a 'target' region except on the initial
     device is not supported.

_C/C++_
     _Prototype_:   'void *omp_get_mapped_ptr(const void *ptr, int
                    device_num);'

_Fortran_:
     _Interface_:   'type(c_ptr) function omp_get_mapped_ptr(ptr,
                    device_num) bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_int'
                    'type(c_ptr), value :: ptr'
                    'integer(c_int), value :: device_num'

_See also_:
     *note omp_target_associate_ptr::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.11


File: libgomp.info,  Node: Lock Routines,  Next: Timing Routines,  Prev: Device Memory Routines,  Up: Runtime Library Routines

3.8 Lock Routines
=================

Initialize, set, test, unset and destroy simple and nested locks.  The
routines have C linkage and do not throw exceptions.

* Menu:

* omp_init_lock::            Initialize simple lock
* omp_init_nest_lock::       Initialize nested lock
* omp_destroy_lock::         Destroy simple lock
* omp_destroy_nest_lock::    Destroy nested lock
* omp_set_lock::             Wait for and set simple lock
* omp_set_nest_lock::        Wait for and set simple lock
* omp_unset_lock::           Unset simple lock
* omp_unset_nest_lock::      Unset nested lock
* omp_test_lock::            Test and set simple lock if available
* omp_test_nest_lock::       Test and set nested lock if available


File: libgomp.info,  Node: omp_init_lock,  Next: omp_init_nest_lock,  Up: Lock Routines

3.8.1 'omp_init_lock' - Initialize simple lock
----------------------------------------------

_Description_:
     Initialize a simple lock.  After initialization, the lock is in an
     unlocked state.

_C/C++_:
     _Prototype_:   'void omp_init_lock(omp_lock_t *lock);'

_Fortran_:
     _Interface_:   'subroutine omp_init_lock(svar)'
                    'integer(omp_lock_kind), intent(out) :: svar'

_See also_:
     *note omp_destroy_lock::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.1.


File: libgomp.info,  Node: omp_init_nest_lock,  Next: omp_destroy_lock,  Prev: omp_init_lock,  Up: Lock Routines

3.8.2 'omp_init_nest_lock' - Initialize nested lock
---------------------------------------------------

_Description_:
     Initialize a nested lock.  After initialization, the lock is in an
     unlocked state and the nesting count is set to zero.

_C/C++_:
     _Prototype_:   'void omp_init_nest_lock(omp_nest_lock_t *lock);'

_Fortran_:
     _Interface_:   'subroutine omp_init_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(out) :: nvar'

_See also_:
     *note omp_destroy_nest_lock::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.1.


File: libgomp.info,  Node: omp_destroy_lock,  Next: omp_destroy_nest_lock,  Prev: omp_init_nest_lock,  Up: Lock Routines

3.8.3 'omp_destroy_lock' - Destroy simple lock
----------------------------------------------

_Description_:
     Destroy a simple lock.  In order to be destroyed, a simple lock
     must be in the unlocked state.

_C/C++_:
     _Prototype_:   'void omp_destroy_lock(omp_lock_t *lock);'

_Fortran_:
     _Interface_:   'subroutine omp_destroy_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'

_See also_:
     *note omp_init_lock::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.3.


File: libgomp.info,  Node: omp_destroy_nest_lock,  Next: omp_set_lock,  Prev: omp_destroy_lock,  Up: Lock Routines

3.8.4 'omp_destroy_nest_lock' - Destroy nested lock
---------------------------------------------------

_Description_:
     Destroy a nested lock.  In order to be destroyed, a nested lock
     must be in the unlocked state and its nesting count must equal
     zero.

_C/C++_:
     _Prototype_:   'void omp_destroy_nest_lock(omp_nest_lock_t *);'

_Fortran_:
     _Interface_:   'subroutine omp_destroy_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'

_See also_:
     *note omp_init_lock::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.3.


File: libgomp.info,  Node: omp_set_lock,  Next: omp_set_nest_lock,  Prev: omp_destroy_nest_lock,  Up: Lock Routines

3.8.5 'omp_set_lock' - Wait for and set simple lock
---------------------------------------------------

_Description_:
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  The calling thread is blocked until the lock
     is available.  If the lock is already held by the current thread, a
     deadlock occurs.

_C/C++_:
     _Prototype_:   'void omp_set_lock(omp_lock_t *lock);'

_Fortran_:
     _Interface_:   'subroutine omp_set_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'

_See also_:
     *note omp_init_lock::, *note omp_test_lock::, *note
     omp_unset_lock::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.4.


File: libgomp.info,  Node: omp_set_nest_lock,  Next: omp_unset_lock,  Prev: omp_set_lock,  Up: Lock Routines

3.8.6 'omp_set_nest_lock' - Wait for and set nested lock
--------------------------------------------------------

_Description_:
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  The calling thread is blocked until the
     lock is available.  If the lock is already held by the current
     thread, the nesting count for the lock is incremented.

_C/C++_:
     _Prototype_:   'void omp_set_nest_lock(omp_nest_lock_t *lock);'

_Fortran_:
     _Interface_:   'subroutine omp_set_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'

_See also_:
     *note omp_init_nest_lock::, *note omp_unset_nest_lock::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.4.


File: libgomp.info,  Node: omp_unset_lock,  Next: omp_unset_nest_lock,  Prev: omp_set_nest_lock,  Up: Lock Routines

3.8.7 'omp_unset_lock' - Unset simple lock
------------------------------------------

_Description_:
     A simple lock about to be unset must have been locked by
     'omp_set_lock' or 'omp_test_lock' before.  In addition, the lock
     must be held by the thread calling 'omp_unset_lock'.  Then, the
     lock becomes unlocked.  If one or more threads attempted to set the
     lock before, one of them is chosen to, again, set the lock to
     itself.

_C/C++_:
     _Prototype_:   'void omp_unset_lock(omp_lock_t *lock);'

_Fortran_:
     _Interface_:   'subroutine omp_unset_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'

_See also_:
     *note omp_set_lock::, *note omp_test_lock::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.5.


File: libgomp.info,  Node: omp_unset_nest_lock,  Next: omp_test_lock,  Prev: omp_unset_lock,  Up: Lock Routines

3.8.8 'omp_unset_nest_lock' - Unset nested lock
-----------------------------------------------

_Description_:
     A nested lock about to be unset must have been locked by
     'omp_set_nested_lock' or 'omp_test_nested_lock' before.  In
     addition, the lock must be held by the thread calling
     'omp_unset_nested_lock'.  If the nesting count drops to zero, the
     lock becomes unlocked.  If one ore more threads attempted to set
     the lock before, one of them is chosen to, again, set the lock to
     itself.

_C/C++_:
     _Prototype_:   'void omp_unset_nest_lock(omp_nest_lock_t *lock);'

_Fortran_:
     _Interface_:   'subroutine omp_unset_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'

_See also_:
     *note omp_set_nest_lock::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.5.


File: libgomp.info,  Node: omp_test_lock,  Next: omp_test_nest_lock,  Prev: omp_unset_nest_lock,  Up: Lock Routines

3.8.9 'omp_test_lock' - Test and set simple lock if available
-------------------------------------------------------------

_Description_:
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  Contrary to 'omp_set_lock', 'omp_test_lock'
     does not block if the lock is not available.  This function returns
     'true' upon success, 'false' otherwise.  Here, 'true' and 'false'
     represent their language-specific counterparts.

_C/C++_:
     _Prototype_:   'int omp_test_lock(omp_lock_t *lock);'

_Fortran_:
     _Interface_:   'logical function omp_test_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'

_See also_:
     *note omp_init_lock::, *note omp_set_lock::, *note omp_set_lock::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.6.


File: libgomp.info,  Node: omp_test_nest_lock,  Prev: omp_test_lock,  Up: Lock Routines

3.8.10 'omp_test_nest_lock' - Test and set nested lock if available
-------------------------------------------------------------------

_Description_:
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  Contrary to 'omp_set_nest_lock',
     'omp_test_nest_lock' does not block if the lock is not available.
     If the lock is already held by the current thread, the new nesting
     count is returned.  Otherwise, the return value equals zero.

_C/C++_:
     _Prototype_:   'int omp_test_nest_lock(omp_nest_lock_t *lock);'

_Fortran_:
     _Interface_:   'logical function omp_test_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'

_See also_:
     *note omp_init_lock::, *note omp_set_lock::, *note omp_set_lock::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.6.


File: libgomp.info,  Node: Timing Routines,  Next: Event Routine,  Prev: Lock Routines,  Up: Runtime Library Routines

3.9 Timing Routines
===================

Portable, thread-based, wall clock timer.  The routines have C linkage
and do not throw exceptions.

* Menu:

* omp_get_wtick::            Get timer precision.
* omp_get_wtime::            Elapsed wall clock time.


File: libgomp.info,  Node: omp_get_wtick,  Next: omp_get_wtime,  Up: Timing Routines

3.9.1 'omp_get_wtick' - Get timer precision
-------------------------------------------

_Description_:
     Gets the timer precision, i.e., the number of seconds between two
     successive clock ticks.

_C/C++_:
     _Prototype_:   'double omp_get_wtick(void);'

_Fortran_:
     _Interface_:   'double precision function omp_get_wtick()'

_See also_:
     *note omp_get_wtime::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.4.2.


File: libgomp.info,  Node: omp_get_wtime,  Prev: omp_get_wtick,  Up: Timing Routines

3.9.2 'omp_get_wtime' - Elapsed wall clock time
-----------------------------------------------

_Description_:
     Elapsed wall clock time in seconds.  The time is measured per
     thread, no guarantee can be made that two distinct threads measure
     the same time.  Time is measured from some "time in the past",
     which is an arbitrary time guaranteed not to change during the
     execution of the program.

_C/C++_:
     _Prototype_:   'double omp_get_wtime(void);'

_Fortran_:
     _Interface_:   'double precision function omp_get_wtime()'

_See also_:
     *note omp_get_wtick::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.4.1.


File: libgomp.info,  Node: Event Routine,  Next: Memory Management Routines,  Prev: Timing Routines,  Up: Runtime Library Routines

3.10 Event Routine
==================

Support for event objects.  The routine has C linkage and do not throw
exceptions.

* Menu:

* omp_fulfill_event::        Fulfill and destroy an OpenMP event.


File: libgomp.info,  Node: omp_fulfill_event,  Up: Event Routine

3.10.1 'omp_fulfill_event' - Fulfill and destroy an OpenMP event
----------------------------------------------------------------

_Description_:
     Fulfill the event associated with the event handle argument.
     Currently, it is only used to fulfill events generated by detach
     clauses on task constructs - the effect of fulfilling the event is
     to allow the task to complete.

     The result of calling 'omp_fulfill_event' with an event handle
     other than that generated by a detach clause is undefined.  Calling
     it with an event handle that has already been fulfilled is also
     undefined.

_C/C++_:
     _Prototype_:   'void omp_fulfill_event(omp_event_handle_t event);'

_Fortran_:
     _Interface_:   'subroutine omp_fulfill_event(event)'
                    'integer (kind=omp_event_handle_kind) :: event'

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.5.1.


File: libgomp.info,  Node: Memory Management Routines,  Next: Environment Display Routine,  Prev: Event Routine,  Up: Runtime Library Routines

3.11 Memory Management Routines
===============================

Routines to manage and allocate memory on the current device.  They have
C linkage and do not throw exceptions.

* Menu:

* omp_init_allocator:: Create an allocator
* omp_destroy_allocator:: Destroy an allocator
* omp_set_default_allocator:: Set the default allocator
* omp_get_default_allocator:: Get the default allocator
* omp_alloc:: Memory allocation with an allocator
* omp_aligned_alloc:: Memory allocation with an allocator and alignment
* omp_free:: Freeing memory allocated with OpenMP routines
* omp_calloc:: Allocate nullified memory with an allocator
* omp_aligned_calloc:: Allocate nullified aligned memory with an allocator
* omp_realloc:: Reallocate memory allocated with OpenMP routines


File: libgomp.info,  Node: omp_init_allocator,  Next: omp_destroy_allocator,  Up: Memory Management Routines

3.11.1 'omp_init_allocator' - Create an allocator
-------------------------------------------------

_Description_:
     Create an allocator that uses the specified memory space and has
     the specified traits; if an allocator that fulfills the
     requirements cannot be created, 'omp_null_allocator' is returned.

     The predefined memory spaces and available traits can be found at
     *note OMP_ALLOCATOR::, where the trait names have to be prefixed by
     'omp_atk_' (e.g.  'omp_atk_pinned') and the named trait values by
     'omp_atv_' (e.g.  'omp_atv_true'); additionally, 'omp_atv_default'
     may be used as trait value to specify that the default value should
     be used.

_C/C++_:
     _Prototype_:   'omp_allocator_handle_t omp_init_allocator('
                    ' omp_memspace_handle_t memspace,'
                    ' int ntraits,'
                    ' const omp_alloctrait_t traits[]);'

_Fortran_:
     _Interface_:   'function omp_init_allocator(memspace, ntraits, traits)'
                    'integer (omp_allocator_handle_kind) ::
                    omp_init_allocator'
                    'integer (omp_memspace_handle_kind), intent(in) ::
                    memspace'
                    'integer, intent(in) :: ntraits'
                    'type (omp_alloctrait), intent(in) :: traits(*)'

_See also_:
     *note OMP_ALLOCATOR::, *note Memory allocation::, *note
     omp_destroy_allocator::

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.7.2


File: libgomp.info,  Node: omp_destroy_allocator,  Next: omp_set_default_allocator,  Prev: omp_init_allocator,  Up: Memory Management Routines

3.11.2 'omp_destroy_allocator' - Destroy an allocator
-----------------------------------------------------

_Description_:
     Releases all resources used by a memory allocator, which must not
     represent a predefined memory allocator.  Accessing memory after
     its allocator has been destroyed has unspecified behavior.  Passing
     'omp_null_allocator' to the routine is permitted but has no effect.

_C/C++_:
     _Prototype_:   'void omp_destroy_allocator (omp_allocator_handle_t
                    allocator);'

_Fortran_:
     _Interface_:   'subroutine omp_destroy_allocator(allocator)'
                    'integer (omp_allocator_handle_kind), intent(in) ::
                    allocator'

_See also_:
     *note omp_init_allocator::

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.7.3


File: libgomp.info,  Node: omp_set_default_allocator,  Next: omp_get_default_allocator,  Prev: omp_destroy_allocator,  Up: Memory Management Routines

3.11.3 'omp_set_default_allocator' - Set the default allocator
--------------------------------------------------------------

_Description_:
     Sets the default allocator that is used when no allocator has been
     specified in the 'allocate' or 'allocator' clause or if an OpenMP
     memory routine is invoked with the 'omp_null_allocator' allocator.

_C/C++_:
     _Prototype_:   'void omp_set_default_allocator(omp_allocator_handle_t
                    allocator);'

_Fortran_:
     _Interface_:   'subroutine omp_set_default_allocator(allocator)'
                    'integer (omp_allocator_handle_kind), intent(in) ::
                    allocator'

_See also_:
     *note omp_get_default_allocator::, *note omp_init_allocator::,
     *note OMP_ALLOCATOR::, *note Memory allocation::

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.7.4


File: libgomp.info,  Node: omp_get_default_allocator,  Next: omp_alloc,  Prev: omp_set_default_allocator,  Up: Memory Management Routines

3.11.4 'omp_get_default_allocator' - Get the default allocator
--------------------------------------------------------------

_Description_:
     The routine returns the default allocator that is used when no
     allocator has been specified in the 'allocate' or 'allocator'
     clause or if an OpenMP memory routine is invoked with the
     'omp_null_allocator' allocator.

_C/C++_:
     _Prototype_:   'omp_allocator_handle_t omp_get_default_allocator();'

_Fortran_:
     _Interface_:   'function omp_get_default_allocator()'
                    'integer (omp_allocator_handle_kind) ::
                    omp_get_default_allocator'

_See also_:
     *note omp_set_default_allocator::, *note OMP_ALLOCATOR::

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.7.5


File: libgomp.info,  Node: omp_alloc,  Next: omp_aligned_alloc,  Prev: omp_get_default_allocator,  Up: Memory Management Routines

3.11.5 'omp_alloc' - Memory allocation with an allocator
--------------------------------------------------------

_Description_:
     Allocate memory with the specified allocator, which can either be a
     predefined allocator, an allocator handle or 'omp_null_allocator'.
     If the allocators is 'omp_null_allocator', the allocator specified
     by the DEF-ALLOCATOR-VAR ICV is used.  SIZE must be a nonnegative
     number denoting the number of bytes to be allocated; if SIZE is
     zero, 'omp_alloc' will return a null pointer.  If successful, a
     pointer to the allocated memory is returned, otherwise the
     'fallback' trait of the allocator determines the behavior.  The
     content of the allocated memory is unspecified.

     In 'target' regions, either the 'dynamic_allocators' clause must
     appear on a 'requires' directive in the same compilation unit - or
     the ALLOCATOR argument may only be a constant expression with the
     value of one of the predefined allocators and may not be
     'omp_null_allocator'.

     Memory allocated by 'omp_alloc' must be freed using 'omp_free'.

_C_:
     _Prototype_:   'void* omp_alloc(size_t size,'
                    ' omp_allocator_handle_t allocator)'

_C++_:
     _Prototype_:   'void* omp_alloc(size_t size,'
                    ' omp_allocator_handle_t allocator=omp_null_allocator)'

_Fortran_:
     _Interface_:   'type(c_ptr) function omp_alloc(size, allocator)
                    bind(C)'
                    'use, intrinsic :: iso_c_binding, only : c_ptr,
                    c_size_t'
                    'integer (c_size_t), value :: size'
                    'integer (omp_allocator_handle_kind), value ::
                    allocator'

_See also_:
     *note OMP_ALLOCATOR::, *note Memory allocation::, *note
     omp_set_default_allocator::, *note omp_free::, *note
     omp_init_allocator::

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.7.6


File: libgomp.info,  Node: omp_aligned_alloc,  Next: omp_free,  Prev: omp_alloc,  Up: Memory Management Routines

3.11.6 'omp_aligned_alloc' - Memory allocation with an allocator and alignment
------------------------------------------------------------------------------

_Description_:
     Allocate memory with the specified allocator, which can either be a
     predefined allocator, an allocator handle or 'omp_null_allocator'.
     If the allocators is 'omp_null_allocator', the allocator specified
     by the DEF-ALLOCATOR-VAR ICV is used.  ALIGNMENT must be a positive
     power of two and SIZE must be a nonnegative number that is a
     multiple of the alignment and denotes the number of bytes to be
     allocated; if SIZE is zero, 'omp_aligned_alloc' will return a null
     pointer.  The alignment will be at least the maximal value required
     by 'alignment' trait of the allocator and the value of the passed
     ALIGNMENT argument.  If successful, a pointer to the allocated
     memory is returned, otherwise the 'fallback' trait of the allocator
     determines the behavior.  The content of the allocated memory is
     unspecified.

     In 'target' regions, either the 'dynamic_allocators' clause must
     appear on a 'requires' directive in the same compilation unit - or
     the ALLOCATOR argument may only be a constant expression with the
     value of one of the predefined allocators and may not be
     'omp_null_allocator'.

     Memory allocated by 'omp_aligned_alloc' must be freed using
     'omp_free'.

_C_:
     _Prototype_:   'void* omp_aligned_alloc(size_t alignment,'
                    ' size_t size,'
                    ' omp_allocator_handle_t allocator)'

_C++_:
     _Prototype_:   'void* omp_aligned_alloc(size_t alignment,'
                    ' size_t size,'
                    ' omp_allocator_handle_t allocator=omp_null_allocator)'

_Fortran_:
     _Interface_:   'type(c_ptr) function omp_aligned_alloc(alignment, size,
                    allocator) bind(C)'
                    'use, intrinsic :: iso_c_binding, only : c_ptr,
                    c_size_t'
                    'integer (c_size_t), value :: alignment, size'
                    'integer (omp_allocator_handle_kind), value ::
                    allocator'

_See also_:
     *note OMP_ALLOCATOR::, *note Memory allocation::, *note
     omp_set_default_allocator::, *note omp_free::, *note
     omp_init_allocator::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.13.6


File: libgomp.info,  Node: omp_free,  Next: omp_calloc,  Prev: omp_aligned_alloc,  Up: Memory Management Routines

3.11.7 'omp_free' - Freeing memory allocated with OpenMP routines
-----------------------------------------------------------------

_Description_:
     The 'omp_free' routine deallocates memory previously allocated by
     an OpenMP memory-management routine.  The PTR argument must point
     to such memory or be a null pointer; if it is a null pointer, no
     operation is performed.  If specified, the ALLOCATOR argument must
     be either the memory allocator that was used for the allocation or
     'omp_null_allocator'; if it is 'omp_null_allocator', the
     implementation will determine the value automatically.

     Calling 'omp_free' invokes undefined behavior if the memory was
     already deallocated or when the used allocator has already been
     destroyed.

_C_:
     _Prototype_:   'void omp_free(void *ptr,'
                    ' omp_allocator_handle_t allocator)'

_C++_:
     _Prototype_:   'void omp_free(void *ptr,'
                    ' omp_allocator_handle_t allocator=omp_null_allocator)'

_Fortran_:
     _Interface_:   'subroutine omp_free(ptr, allocator) bind(C)'
                    'use, intrinsic :: iso_c_binding, only : c_ptr'
                    'type (c_ptr), value :: ptr'
                    'integer (omp_allocator_handle_kind), value ::
                    allocator'

_See also_:
     *note omp_alloc::, *note omp_aligned_alloc::, *note omp_calloc::,
     *note omp_aligned_calloc::, *note omp_realloc::

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.7.7


File: libgomp.info,  Node: omp_calloc,  Next: omp_aligned_calloc,  Prev: omp_free,  Up: Memory Management Routines

3.11.8 'omp_calloc' - Allocate nullified memory with an allocator
-----------------------------------------------------------------

_Description_:
     Allocate zero-initialized memory with the specified allocator,
     which can either be a predefined allocator, an allocator handle or
     'omp_null_allocator'.  If the allocators is 'omp_null_allocator',
     the allocator specified by the DEF-ALLOCATOR-VAR ICV is used.  The
     to-be allocated memory is for an array with NMEMB elements, each
     having a size of SIZE bytes.  Both NMEMB and SIZE must be
     nonnegative numbers; if either of them is zero, 'omp_calloc' will
     return a null pointer.  If successful, a pointer to the
     zero-initialized allocated memory is returned, otherwise the
     'fallback' trait of the allocator determines the behavior.

     In 'target' regions, either the 'dynamic_allocators' clause must
     appear on a 'requires' directive in the same compilation unit - or
     the ALLOCATOR argument may only be a constant expression with the
     value of one of the predefined allocators and may not be
     'omp_null_allocator'.

     Memory allocated by 'omp_calloc' must be freed using 'omp_free'.

_C_:
     _Prototype_:   'void* omp_calloc(size_t nmemb, size_t size,'
                    ' omp_allocator_handle_t allocator)'

_C++_:
     _Prototype_:   'void* omp_calloc(size_t nmemb, size_t size,'
                    ' omp_allocator_handle_t allocator=omp_null_allocator)'

_Fortran_:
     _Interface_:   'type(c_ptr) function omp_calloc(nmemb, size, allocator)
                    bind(C)'
                    'use, intrinsic :: iso_c_binding, only : c_ptr,
                    c_size_t'
                    'integer (c_size_t), value :: nmemb, size'
                    'integer (omp_allocator_handle_kind), value ::
                    allocator'

_See also_:
     *note OMP_ALLOCATOR::, *note Memory allocation::, *note
     omp_set_default_allocator::, *note omp_free::, *note
     omp_init_allocator::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.13.8


File: libgomp.info,  Node: omp_aligned_calloc,  Next: omp_realloc,  Prev: omp_calloc,  Up: Memory Management Routines

3.11.9 'omp_aligned_calloc' - Allocate aligned nullified memory with an allocator
---------------------------------------------------------------------------------

_Description_:
     Allocate zero-initialized memory with the specified allocator,
     which can either be a predefined allocator, an allocator handle or
     'omp_null_allocator'.  If the allocators is 'omp_null_allocator',
     the allocator specified by the DEF-ALLOCATOR-VAR ICV is used.  The
     to-be allocated memory is for an array with NMEMB elements, each
     having a size of SIZE bytes.  Both NMEMB and SIZE must be
     nonnegative numbers; if either of them is zero,
     'omp_aligned_calloc' will return a null pointer.  ALIGNMENT must be
     a positive power of two and SIZE must be a multiple of the
     alignment; the alignment will be at least the maximal value
     required by 'alignment' trait of the allocator and the value of the
     passed ALIGNMENT argument.  If successful, a pointer to the
     zero-initialized allocated memory is returned, otherwise the
     'fallback' trait of the allocator determines the behavior.

     In 'target' regions, either the 'dynamic_allocators' clause must
     appear on a 'requires' directive in the same compilation unit - or
     the ALLOCATOR argument may only be a constant expression with the
     value of one of the predefined allocators and may not be
     'omp_null_allocator'.

     Memory allocated by 'omp_aligned_calloc' must be freed using
     'omp_free'.

_C_:
     _Prototype_:   'void* omp_aligned_calloc(size_t nmemb, size_t size,'
                    ' omp_allocator_handle_t allocator)'

_C++_:
     _Prototype_:   'void* omp_aligned_calloc(size_t nmemb, size_t size,'
                    ' omp_allocator_handle_t allocator=omp_null_allocator)'

_Fortran_:
     _Interface_:   'type(c_ptr) function omp_aligned_calloc(nmemb, size,
                    allocator) bind(C)'
                    'use, intrinsic :: iso_c_binding, only : c_ptr,
                    c_size_t'
                    'integer (c_size_t), value :: nmemb, size'
                    'integer (omp_allocator_handle_kind), value ::
                    allocator'

_See also_:
     *note OMP_ALLOCATOR::, *note Memory allocation::, *note
     omp_set_default_allocator::, *note omp_free::, *note
     omp_init_allocator::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.13.8


File: libgomp.info,  Node: omp_realloc,  Prev: omp_aligned_calloc,  Up: Memory Management Routines

3.11.10 'omp_realloc' - Reallocate memory allocated with OpenMP routines
------------------------------------------------------------------------

_Description_:
     The 'omp_realloc' routine deallocates memory to which PTR points to
     and allocates new memory with the specified ALLOCATOR argument; the
     new memory will have the content of the old memory up to the
     minimum of the old size and the new SIZE, otherwise the content of
     the returned memory is unspecified.  If the new allocator is the
     same as the old one, the routine tries to resize the existing
     memory allocation, returning the same address as PTR if successful.
     PTR must point to memory allocated by an OpenMP memory-management
     routine.

     The ALLOCATOR and FREE_ALLOCATOR arguments must be a predefined
     allocator, an allocator handle or 'omp_null_allocator'.  If
     FREE_ALLOCATOR is 'omp_null_allocator', the implementation
     automatically determines the allocator used for the allocation of
     PTR.  If ALLOCATOR is 'omp_null_allocator' and PTR is not a null
     pointer, the same allocator as 'free_allocator' is used and when
     PTR is a null pointer the allocator specified by the
     DEF-ALLOCATOR-VAR ICV is used.

     The SIZE must be a nonnegative number denoting the number of bytes
     to be allocated; if SIZE is zero, 'omp_realloc' will return free
     the memory and return a null pointer.  When SIZE is nonzero: if
     successful, a pointer to the allocated memory is returned,
     otherwise the 'fallback' trait of the allocator determines the
     behavior.

     In 'target' regions, either the 'dynamic_allocators' clause must
     appear on a 'requires' directive in the same compilation unit - or
     the FREE_ALLOCATOR and ALLOCATOR arguments may only be a constant
     expression with the value of one of the predefined allocators and
     may not be 'omp_null_allocator'.

     Memory allocated by 'omp_realloc' must be freed using 'omp_free'.
     Calling 'omp_free' invokes undefined behavior if the memory was
     already deallocated or when the used allocator has already been
     destroyed.

_C_:
     _Prototype_:   'void* omp_realloc(void *ptr, size_t size,'
                    ' omp_allocator_handle_t allocator,'
                    ' omp_allocator_handle_t free_allocator)'

_C++_:
     _Prototype_:   'void* omp_realloc(void *ptr, size_t size,'
                    ' omp_allocator_handle_t allocator=omp_null_allocator,'
                    ' omp_allocator_handle_t
                    free_allocator=omp_null_allocator)'

_Fortran_:
     _Interface_:   'type(c_ptr) function omp_realloc(ptr, size, allocator,
                    free_allocator) bind(C)'
                    'use, intrinsic :: iso_c_binding, only : c_ptr,
                    c_size_t'
                    'type(C_ptr), value :: ptr'
                    'integer (c_size_t), value :: size'
                    'integer (omp_allocator_handle_kind), value ::
                    allocator, free_allocator'

_See also_:
     *note OMP_ALLOCATOR::, *note Memory allocation::, *note
     omp_set_default_allocator::, *note omp_free::, *note
     omp_init_allocator::

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.7.9


File: libgomp.info,  Node: Environment Display Routine,  Prev: Memory Management Routines,  Up: Runtime Library Routines

3.12 Environment Display Routine
================================

Routine to display the OpenMP version number and the initial value of
ICVs.  It has C linkage and does not throw exceptions.

* Menu:

* omp_display_env:: print the initial ICV values


File: libgomp.info,  Node: omp_display_env,  Up: Environment Display Routine

3.12.1 'omp_display_env' - print the initial ICV values
-------------------------------------------------------

_Description_:
     Each time this routine is invoked, the OpenMP version number and
     initial value of internal control variables (ICVs) is printed on
     'stderr'.  The displayed values are those at startup after
     evaluating the environment variables; later calls to API routines
     or clauses used in enclosing constructs do not affect the output.

     If the VERBOSE argument is 'false', only the OpenMP version and
     standard OpenMP ICVs are shown; if it is 'true', additionally, the
     GCC-specific ICVs are shown.

     The output consists of multiple lines and starts with 'OPENMP
     DISPLAY ENVIRONMENT BEGIN' followed by the name-value lines and
     ends with 'OPENMP DISPLAY ENVIRONMENT END'.  The NAME is followed
     by an equal sign and the VALUE is enclosed in single quotes.

     The first line has as NAME either '_OPENMP' or 'openmp_version' and
     shows as value the supported OpenMP version number (4-digit year,
     2-digit month) of the implementation, matching the value of the
     '_OPENMP' macro and, in Fortran, the named constant
     'openmp_version'.

     In each of the succeeding lines, the NAME matches the
     environment-variable name of an ICV and shows its value.  Those
     line are might be prefixed by pair of brackets and a space, where
     the brackets enclose a comma-separated list of devices to which the
     ICV-value combination applies to; the value can either be a numeric
     device number or an abstract name denoting all devices ('all'), the
     initial host device ('host') or all devices but the host
     ('device').  Note that the same ICV might be printed multiple times
     for multiple devices, even if all have the same value.

     The effect when invoked from within a 'target' region is
     unspecified.

_C/C++_:
     _Prototype_:   'void omp_display_env(int verbose)'

_Fortran_:
     _Interface_:   'subroutine omp_display_env(vebose)'
                    'logical, intent(in) :: verbose'

_Example_:
     Note that the GCC-specific ICVs, such as the shown
     'GOMP_SPINCOUNT', are only printed when VARBOSE set to 'true'.

          OPENMP DISPLAY ENVIRONMENT BEGIN
            _OPENMP = '201511'
            [host] OMP_DYNAMIC = 'FALSE'
            [host] OMP_NESTED = 'FALSE'
            [all] OMP_CANCELLATION = 'FALSE'
            ...
            [host] GOMP_SPINCOUNT = '300000'
          OPENMP DISPLAY ENVIRONMENT END

_See also_:
     *note OMP_DISPLAY_ENV::, *note Environment Variables::, *note
     Implementation-defined ICV Initialization::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.15


File: libgomp.info,  Node: Environment Variables,  Next: Enabling OpenACC,  Prev: Runtime Library Routines,  Up: Top

4 OpenMP Environment Variables
******************************

The environment variables which beginning with 'OMP_' are defined by
section 4 of the OpenMP specification in version 4.5 or in a later
version of the specification, while those beginning with 'GOMP_' are GNU
extensions.  Most 'OMP_' environment variables have an associated
internal control variable (ICV).

   For any OpenMP environment variable that sets an ICV and is neither
'OMP_DEFAULT_DEVICE' nor has global ICV scope, associated
device-specific environment variables exist.  For them, the environment
variable without suffix affects the host.  The suffix '_DEV_' followed
by a non-negative device number less that the number of available
devices sets the ICV for the corresponding device.  The suffix '_DEV'
sets the ICV of all non-host devices for which a device-specific
corresponding environment variable has not been set while the '_ALL'
suffix sets the ICV of all host and non-host devices for which a more
specific corresponding environment variable is not set.

* Menu:

* OMP_ALLOCATOR::           Set the default allocator
* OMP_AFFINITY_FORMAT::     Set the format string used for affinity display
* OMP_CANCELLATION::        Set whether cancellation is activated
* OMP_DISPLAY_AFFINITY::    Display thread affinity information
* OMP_DISPLAY_ENV::         Show OpenMP version and environment variables
* OMP_DEFAULT_DEVICE::      Set the device used in target regions
* OMP_DYNAMIC::             Dynamic adjustment of threads
* OMP_MAX_ACTIVE_LEVELS::   Set the maximum number of nested parallel regions
* OMP_MAX_TASK_PRIORITY::   Set the maximum task priority value
* OMP_NESTED::              Nested parallel regions
* OMP_NUM_TEAMS::           Specifies the number of teams to use by teams region
* OMP_NUM_THREADS::         Specifies the number of threads to use
* OMP_PROC_BIND::           Whether threads may be moved between CPUs
* OMP_PLACES::              Specifies on which CPUs the threads should be placed
* OMP_STACKSIZE::           Set default thread stack size
* OMP_SCHEDULE::            How threads are scheduled
* OMP_TARGET_OFFLOAD::      Controls offloading behavior
* OMP_TEAMS_THREAD_LIMIT::  Set the maximum number of threads imposed by teams
* OMP_THREAD_LIMIT::        Set the maximum number of threads
* OMP_WAIT_POLICY::         How waiting threads are handled
* GOMP_CPU_AFFINITY::       Bind threads to specific CPUs
* GOMP_DEBUG::              Enable debugging output
* GOMP_STACKSIZE::          Set default thread stack size
* GOMP_SPINCOUNT::          Set the busy-wait spin count
* GOMP_RTEMS_THREAD_POOLS:: Set the RTEMS specific thread pools


File: libgomp.info,  Node: OMP_ALLOCATOR,  Next: OMP_AFFINITY_FORMAT,  Up: Environment Variables

4.1 'OMP_ALLOCATOR' - Set the default allocator
===============================================

_ICV:_ DEF-ALLOCATOR-VAR
_Scope:_ data environment
_Description_:
     Sets the default allocator that is used when no allocator has been
     specified in the 'allocate' or 'allocator' clause or if an OpenMP
     memory routine is invoked with the 'omp_null_allocator' allocator.
     If unset, 'omp_default_mem_alloc' is used.

     The value can either be a predefined allocator or a predefined
     memory space or a predefined memory space followed by a colon and a
     comma-separated list of memory trait and value pairs, separated by
     '='.

     Note: The corresponding device environment variables are currently
     not supported.  Therefore, the non-host DEF-ALLOCATOR-VAR ICVs are
     always initialized to 'omp_default_mem_alloc'.  However, on all
     devices, the 'omp_set_default_allocator' API routine can be used to
     change value.

     Predefined allocators            Associated predefined memory
                                      spaces
     ------------------------------------------------------------------
     omp_default_mem_alloc            omp_default_mem_space
     omp_large_cap_mem_alloc          omp_large_cap_mem_space
     omp_const_mem_alloc              omp_const_mem_space
     omp_high_bw_mem_alloc            omp_high_bw_mem_space
     omp_low_lat_mem_alloc            omp_low_lat_mem_space
     omp_cgroup_mem_alloc             omp_low_lat_mem_space
                                      (implementation defined)
     omp_pteam_mem_alloc              omp_low_lat_mem_space
                                      (implementation defined)
     omp_thread_mem_alloc             omp_low_lat_mem_space
                                      (implementation defined)

     The predefined allocators use the default values for the traits, as
     listed below.  Except that the last three allocators have the
     'access' trait set to 'cgroup', 'pteam', and 'thread',
     respectively.

     Trait              Allowed values                Default value
     --------------------------------------------------------------------
     'sync_hint'        'contended', 'uncontended',   'contended'
                        'serialized', 'private'
     'alignment'        Positive integer being a      1 byte
                        power of two
     'access'           'all', 'cgroup', 'pteam',     'all'
                        'thread'
     'pool_size'        Positive integer              See
                                                      *note Memory allocation::
     'fallback'         'default_mem_fb',             See below
                        'null_fb', 'abort_fb',
                        'allocator_fb'
     'fb_data'          _unsupported as it needs an   (none)
                        allocator handle_
     'pinned'           'true', 'false'               'false'
     'partition'        'environment', 'nearest',     'environment'
                        'blocked', 'interleaved'

     For the 'fallback' trait, the default value is 'null_fb' for the
     'omp_default_mem_alloc' allocator and any allocator that is
     associated with device memory; for all other allocators, it is
     'default_mem_fb' by default.

     Examples:
          OMP_ALLOCATOR=omp_high_bw_mem_alloc
          OMP_ALLOCATOR=omp_large_cap_mem_space
          OMP_ALLOCATOR=omp_low_lat_mem_space:pinned=true,partition=nearest

_See also_:
     *note Memory allocation::, *note omp_get_default_allocator::, *note
     omp_set_default_allocator::, *note Offload-Target Specifics::

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 6.21


File: libgomp.info,  Node: OMP_AFFINITY_FORMAT,  Next: OMP_CANCELLATION,  Prev: OMP_ALLOCATOR,  Up: Environment Variables

4.2 'OMP_AFFINITY_FORMAT' - Set the format string used for affinity display
===========================================================================

_ICV:_ AFFINITY-FORMAT-VAR
_Scope:_ device
_Description_:
     Sets the format string used when displaying OpenMP thread affinity
     information.  Special values are output using '%' followed by an
     optional size specification and then either the single-character
     field type or its long name enclosed in curly braces; using '%%'
     displays a literal percent.  The size specification consists of an
     optional '0.' or '.' followed by a positive integer, specifying the
     minimal width of the output.  With '0.' and numerical values, the
     output is padded with zeros on the left; with '.', the output is
     padded by spaces on the left; otherwise, the output is padded by
     spaces on the right.  If unset, the value is "'level %L thread %i
     affinity %A'".

     Supported field types are:

     t       team_num           value returned by 'omp_get_team_num'
     T       num_teams          value returned by 'omp_get_num_teams'
     L       nesting_level      value returned by 'omp_get_level'
     n       thread_num         value returned by 'omp_get_thread_num'
     N       num_threads        value returned by 'omp_get_num_threads'
     a       ancestor_tnum      value returned by
                                'omp_get_ancestor_thread_num(omp_get_level()-1)'
     H       host               name of the host that executes the thread
     P       process_id         process identifier
     i       native_thread_id   native thread identifier
     A       thread_affinity    comma separated list of integer values or
                                ranges, representing the processors on
                                which a process might execute, subject to
                                affinity mechanisms

     For instance, after setting

          OMP_AFFINITY_FORMAT="%0.2a!%n!%.4L!%N;%.2t;%0.2T;%{team_num};%{num_teams};%A"

     with either 'OMP_DISPLAY_AFFINITY' being set or when calling
     'omp_display_affinity' with 'NULL' or an empty string, the program
     might display the following:

          00!0!   1!4; 0;01;0;1;0-11
          00!3!   1!4; 0;01;0;1;0-11
          00!2!   1!4; 0;01;0;1;0-11
          00!1!   1!4; 0;01;0;1;0-11

_See also_:
     *note OMP_DISPLAY_AFFINITY::

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 6.14


File: libgomp.info,  Node: OMP_CANCELLATION,  Next: OMP_DISPLAY_AFFINITY,  Prev: OMP_AFFINITY_FORMAT,  Up: Environment Variables

4.3 'OMP_CANCELLATION' - Set whether cancellation is activated
==============================================================

_ICV:_ CANCEL-VAR
_Scope:_ global
_Description_:
     If set to 'TRUE', the cancellation is activated.  If set to 'FALSE'
     or if unset, cancellation is disabled and the 'cancel' construct is
     ignored.

_See also_:
     *note omp_get_cancellation::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.11


File: libgomp.info,  Node: OMP_DISPLAY_AFFINITY,  Next: OMP_DISPLAY_ENV,  Prev: OMP_CANCELLATION,  Up: Environment Variables

4.4 'OMP_DISPLAY_AFFINITY' - Display thread affinity information
================================================================

_ICV:_ DISPLAY-AFFINITY-VAR
_Scope:_ global
_Description_:
     If set to 'FALSE' or if unset, affinity displaying is disabled.  If
     set to 'TRUE', the runtime displays affinity information about
     OpenMP threads in a parallel region upon entering the region and
     every time any change occurs.

_See also_:
     *note OMP_AFFINITY_FORMAT::

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 6.13


File: libgomp.info,  Node: OMP_DISPLAY_ENV,  Next: OMP_DEFAULT_DEVICE,  Prev: OMP_DISPLAY_AFFINITY,  Up: Environment Variables

4.5 'OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
=====================================================================

_ICV:_ none
_Scope:_ not applicable
_Description_:
     If set to 'TRUE', the runtime displays the same information to
     'stderr' as shown by the 'omp_display_env' routine invoked with
     VERBOSE argument set to 'false'.  If set to 'VERBOSE', the same
     information is shown as invoking the routine with VERBOSE set to
     'true'.  If unset or set to 'FALSE', this information is not shown.
     The result for any other value is unspecified.

_See also_:
     *note omp_display_env::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.12


File: libgomp.info,  Node: OMP_DEFAULT_DEVICE,  Next: OMP_DYNAMIC,  Prev: OMP_DISPLAY_ENV,  Up: Environment Variables

4.6 'OMP_DEFAULT_DEVICE' - Set the device used in target regions
================================================================

_ICV:_ DEFAULT-DEVICE-VAR
_Scope:_ data environment
_Description_:
     Set to choose the device which is used in a 'target' region, unless
     the value is overridden by 'omp_set_default_device' or by a
     'device' clause.  The value shall be the nonnegative device number.
     If no device with the given device number exists, the code is
     executed on the host.  If unset, 'OMP_TARGET_OFFLOAD' is
     'mandatory' and no non-host devices are available, it is set to
     'omp_invalid_device'.  Otherwise, if unset, device number 0 is
     used.

_See also_:
     *note omp_get_default_device::, *note omp_set_default_device::,
     *note OMP_TARGET_OFFLOAD::

_Reference_:
     OpenMP specification v5.2 (https://www.openmp.org), Section 21.2.7


File: libgomp.info,  Node: OMP_DYNAMIC,  Next: OMP_MAX_ACTIVE_LEVELS,  Prev: OMP_DEFAULT_DEVICE,  Up: Environment Variables

4.7 'OMP_DYNAMIC' - Dynamic adjustment of threads
=================================================

_ICV:_ DYN-VAR
_Scope:_ global
_Description_:
     Enable or disable the dynamic adjustment of the number of threads
     within a team.  The value of this environment variable shall be
     'TRUE' or 'FALSE'.  If undefined, dynamic adjustment is disabled by
     default.

_See also_:
     *note omp_set_dynamic::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.3


File: libgomp.info,  Node: OMP_MAX_ACTIVE_LEVELS,  Next: OMP_MAX_TASK_PRIORITY,  Prev: OMP_DYNAMIC,  Up: Environment Variables

4.8 'OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
===============================================================================

_ICV:_ MAX-ACTIVE-LEVELS-VAR
_Scope:_ data environment
_Description_:
     Specifies the initial value for the maximum number of nested
     parallel regions.  The value of this variable shall be a positive
     integer.  If undefined, then if 'OMP_NESTED' is defined and set to
     true, or if 'OMP_NUM_THREADS' or 'OMP_PROC_BIND' are defined and
     set to a list with more than one item, the maximum number of nested
     parallel regions is initialized to the largest number supported,
     otherwise it is set to one.

_See also_:
     *note omp_set_max_active_levels::, *note OMP_NESTED::, *note
     OMP_PROC_BIND::, *note OMP_NUM_THREADS::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.9


File: libgomp.info,  Node: OMP_MAX_TASK_PRIORITY,  Next: OMP_NESTED,  Prev: OMP_MAX_ACTIVE_LEVELS,  Up: Environment Variables

4.9 'OMP_MAX_TASK_PRIORITY' - Set the maximum priority
======================================================

number that can be set for a task.
_ICV:_ MAX-TASK-PRIORITY-VAR
_Scope:_ global
_Description_:
     Specifies the initial value for the maximum priority value that can
     be set for a task.  The value of this variable shall be a
     non-negative integer, and zero is allowed.  If undefined, the
     default priority is 0.

_See also_:
     *note omp_get_max_task_priority::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.14


File: libgomp.info,  Node: OMP_NESTED,  Next: OMP_NUM_TEAMS,  Prev: OMP_MAX_TASK_PRIORITY,  Up: Environment Variables

4.10 'OMP_NESTED' - Nested parallel regions
===========================================

_ICV:_ MAX-ACTIVE-LEVELS-VAR
_Scope:_ data environment
_Description_:
     Enable or disable nested parallel regions, i.e., whether team
     members are allowed to create new teams.  The value of this
     environment variable shall be 'TRUE' or 'FALSE'.  If set to 'TRUE',
     the number of maximum active nested regions supported is by default
     set to the maximum supported, otherwise it is set to one.  If
     'OMP_MAX_ACTIVE_LEVELS' is defined, its setting overrides this
     setting.  If both are undefined, nested parallel regions are
     enabled if 'OMP_NUM_THREADS' or 'OMP_PROC_BINDS' are defined to a
     list with more than one item, otherwise they are disabled by
     default.

     Note that the 'OMP_NESTED' environment variable was deprecated in
     the OpenMP specification 5.2 in favor of 'OMP_MAX_ACTIVE_LEVELS'.

_See also_:
     *note omp_set_max_active_levels::, *note omp_set_nested::, *note
     OMP_MAX_ACTIVE_LEVELS::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.6


File: libgomp.info,  Node: OMP_NUM_TEAMS,  Next: OMP_NUM_THREADS,  Prev: OMP_NESTED,  Up: Environment Variables

4.11 'OMP_NUM_TEAMS' - Specifies the number of teams to use by teams region
===========================================================================

_ICV:_ NTEAMS-VAR
_Scope:_ device
_Description_:
     Specifies the upper bound for number of teams to use in teams
     regions without explicit 'num_teams' clause.  The value of this
     variable shall be a positive integer.  If undefined it defaults to
     0 which means implementation defined upper bound.

_See also_:
     *note omp_set_num_teams::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 6.23


File: libgomp.info,  Node: OMP_NUM_THREADS,  Next: OMP_PROC_BIND,  Prev: OMP_NUM_TEAMS,  Up: Environment Variables

4.12 'OMP_NUM_THREADS' - Specifies the number of threads to use
===============================================================

_ICV:_ NTHREADS-VAR
_Scope:_ data environment
_Description_:
     Specifies the default number of threads to use in parallel regions.
     The value of this variable shall be a comma-separated list of
     positive integers; the value specifies the number of threads to use
     for the corresponding nested level.  Specifying more than one item
     in the list automatically enables nesting by default.  If undefined
     one thread per CPU is used.

     When a list with more than value is specified, it also affects the
     MAX-ACTIVE-LEVELS-VAR ICV as described in *note
     OMP_MAX_ACTIVE_LEVELS::.

_See also_:
     *note omp_set_num_threads::, *note OMP_MAX_ACTIVE_LEVELS::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.2


File: libgomp.info,  Node: OMP_PROC_BIND,  Next: OMP_PLACES,  Prev: OMP_NUM_THREADS,  Up: Environment Variables

4.13 'OMP_PROC_BIND' - Whether threads may be moved between CPUs
================================================================

_ICV:_ BIND-VAR
_Scope:_ data environment
_Description_:
     Specifies whether threads may be moved between processors.  If set
     to 'TRUE', OpenMP threads should not be moved; if set to 'FALSE'
     they may be moved.  Alternatively, a comma separated list with the
     values 'PRIMARY', 'MASTER', 'CLOSE' and 'SPREAD' can be used to
     specify the thread affinity policy for the corresponding nesting
     level.  With 'PRIMARY' and 'MASTER' the worker threads are in the
     same place partition as the primary thread.  With 'CLOSE' those are
     kept close to the primary thread in contiguous place partitions.
     And with 'SPREAD' a sparse distribution across the place partitions
     is used.  Specifying more than one item in the list automatically
     enables nesting by default.

     When a list is specified, it also affects the MAX-ACTIVE-LEVELS-VAR
     ICV as described in *note OMP_MAX_ACTIVE_LEVELS::.

     When undefined, 'OMP_PROC_BIND' defaults to 'TRUE' when
     'OMP_PLACES' or 'GOMP_CPU_AFFINITY' is set and 'FALSE' otherwise.

_See also_:
     *note omp_get_proc_bind::, *note GOMP_CPU_AFFINITY::, *note
     OMP_PLACES::, *note OMP_MAX_ACTIVE_LEVELS::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.4


File: libgomp.info,  Node: OMP_PLACES,  Next: OMP_STACKSIZE,  Prev: OMP_PROC_BIND,  Up: Environment Variables

4.14 'OMP_PLACES' - Specifies on which CPUs the threads should be placed
========================================================================

_ICV:_ PLACE-PARTITION-VAR
_Scope:_ implicit tasks
_Description_:
     The thread placement can be either specified using an abstract name
     or by an explicit list of the places.  The abstract names
     'threads', 'cores', 'sockets', 'll_caches' and 'numa_domains' can
     be optionally followed by a positive number in parentheses, which
     denotes the how many places shall be created.  With 'threads' each
     place corresponds to a single hardware thread; 'cores' to a single
     core with the corresponding number of hardware threads; with
     'sockets' the place corresponds to a single socket; with
     'll_caches' to a set of cores that shares the last level cache on
     the device; and 'numa_domains' to a set of cores for which their
     closest memory on the device is the same memory and at a similar
     distance from the cores.  The resulting placement can be shown by
     setting the 'OMP_DISPLAY_ENV' environment variable.

     Alternatively, the placement can be specified explicitly as
     comma-separated list of places.  A place is specified by set of
     nonnegative numbers in curly braces, denoting the hardware threads.
     The curly braces can be omitted when only a single number has been
     specified.  The hardware threads belonging to a place can either be
     specified as comma-separated list of nonnegative thread numbers or
     using an interval.  Multiple places can also be either specified by
     a comma-separated list of places or by an interval.  To specify an
     interval, a colon followed by the count is placed after the
     hardware thread number or the place.  Optionally, the length can be
     followed by a colon and the stride number - otherwise a unit stride
     is assumed.  Placing an exclamation mark ('!') directly before a
     curly brace or numbers inside the curly braces (excluding
     intervals) excludes those hardware threads.

     For instance, the following specifies the same places list:
     '"{0,1,2}, {3,4,6}, {7,8,9}, {10,11,12}"'; '"{0:3}, {3:3}, {7:3},
     {10:3}"'; and '"{0:2}:4:3"'.

     If 'OMP_PLACES' and 'GOMP_CPU_AFFINITY' are unset and
     'OMP_PROC_BIND' is either unset or 'false', threads may be moved
     between CPUs following no placement policy.

_See also_:
     *note OMP_PROC_BIND::, *note GOMP_CPU_AFFINITY::, *note
     omp_get_proc_bind::, *note OMP_DISPLAY_ENV::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.5


File: libgomp.info,  Node: OMP_STACKSIZE,  Next: OMP_SCHEDULE,  Prev: OMP_PLACES,  Up: Environment Variables

4.15 'OMP_STACKSIZE' - Set default thread stack size
====================================================

_ICV:_ STACKSIZE-VAR
_Scope:_ device
_Description_:
     Set the default thread stack size in kilobytes, unless the number
     is suffixed by 'B', 'K', 'M' or 'G', in which case the size is,
     respectively, in bytes, kilobytes, megabytes or gigabytes.  This is
     different from 'pthread_attr_setstacksize' which gets the number of
     bytes as an argument.  If the stack size cannot be set due to
     system constraints, an error is reported and the initial stack size
     is left unchanged.  If undefined, the stack size is system
     dependent.

_See also_:
     *note GOMP_STACKSIZE::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.7


File: libgomp.info,  Node: OMP_SCHEDULE,  Next: OMP_TARGET_OFFLOAD,  Prev: OMP_STACKSIZE,  Up: Environment Variables

4.16 'OMP_SCHEDULE' - How threads are scheduled
===============================================

_ICV:_ RUN-SCHED-VAR
_Scope:_ data environment
_Description_:
     Allows to specify 'schedule type' and 'chunk size'.  The value of
     the variable shall have the form: 'type[,chunk]' where 'type' is
     one of 'static', 'dynamic', 'guided' or 'auto' The optional 'chunk'
     size shall be a positive integer.  If undefined, dynamic scheduling
     and a chunk size of 1 is used.

_See also_:
     *note omp_set_schedule::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Sections
     2.7.1.1 and 4.1


File: libgomp.info,  Node: OMP_TARGET_OFFLOAD,  Next: OMP_TEAMS_THREAD_LIMIT,  Prev: OMP_SCHEDULE,  Up: Environment Variables

4.17 'OMP_TARGET_OFFLOAD' - Controls offloading behavior
========================================================

_ICV:_ TARGET-OFFLOAD-VAR
_Scope:_ global
_Description_:
     Specifies the behavior with regard to offloading code to a device.
     This variable can be set to one of three values - 'MANDATORY',
     'DISABLED' or 'DEFAULT'.

     If set to 'MANDATORY', the program terminates with an error if any
     device construct or device memory routine uses a device that is
     unavailable or not supported by the implementation, or uses a
     non-conforming device number.  If set to 'DISABLED', then
     offloading is disabled and all code runs on the host.  If set to
     'DEFAULT', the program tries offloading to the device first, then
     falls back to running code on the host if it cannot.

     If undefined, then the program behaves as if 'DEFAULT' was set.

     Note: Even with 'MANDATORY', no run-time termination is performed
     when the device number in a 'device' clause or argument to a device
     memory routine is for host, which includes using the device number
     in the DEFAULT-DEVICE-VAR ICV. However, the initial value of the
     DEFAULT-DEVICE-VAR ICV is affected by 'MANDATORY'.

_See also_:
     *note OMP_DEFAULT_DEVICE::

_Reference_:
     OpenMP specification v5.2 (https://www.openmp.org), Section 21.2.8


File: libgomp.info,  Node: OMP_TEAMS_THREAD_LIMIT,  Next: OMP_THREAD_LIMIT,  Prev: OMP_TARGET_OFFLOAD,  Up: Environment Variables

4.18 'OMP_TEAMS_THREAD_LIMIT' - Set the maximum number of threads imposed by teams
==================================================================================

_ICV:_ TEAMS-THREAD-LIMIT-VAR
_Scope:_ device
_Description_:
     Specifies an upper bound for the number of threads to use by each
     contention group created by a teams construct without explicit
     'thread_limit' clause.  The value of this variable shall be a
     positive integer.  If undefined, the value of 0 is used which
     stands for an implementation defined upper limit.

_See also_:
     *note OMP_THREAD_LIMIT::, *note omp_set_teams_thread_limit::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 6.24


File: libgomp.info,  Node: OMP_THREAD_LIMIT,  Next: OMP_WAIT_POLICY,  Prev: OMP_TEAMS_THREAD_LIMIT,  Up: Environment Variables

4.19 'OMP_THREAD_LIMIT' - Set the maximum number of threads
===========================================================

_ICV:_ THREAD-LIMIT-VAR
_Scope:_ data environment
_Description_:
     Specifies the number of threads to use for the whole program.  The
     value of this variable shall be a positive integer.  If undefined,
     the number of threads is not limited.

_See also_:
     *note OMP_NUM_THREADS::, *note omp_get_thread_limit::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.10


File: libgomp.info,  Node: OMP_WAIT_POLICY,  Next: GOMP_CPU_AFFINITY,  Prev: OMP_THREAD_LIMIT,  Up: Environment Variables

4.20 'OMP_WAIT_POLICY' - How waiting threads are handled
========================================================

_Description_:
     Specifies whether waiting threads should be active or passive.  If
     the value is 'PASSIVE', waiting threads should not consume CPU
     power while waiting; while the value is 'ACTIVE' specifies that
     they should.  If undefined, threads wait actively for a short time
     before waiting passively.

_See also_:
     *note GOMP_SPINCOUNT::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.8


File: libgomp.info,  Node: GOMP_CPU_AFFINITY,  Next: GOMP_DEBUG,  Prev: OMP_WAIT_POLICY,  Up: Environment Variables

4.21 'GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
========================================================

_Description_:
     Binds threads to specific CPUs.  The variable should contain a
     space-separated or comma-separated list of CPUs.  This list may
     contain different kinds of entries: either single CPU numbers in
     any order, a range of CPUs (M-N) or a range with some stride
     (M-N:S). CPU numbers are zero based.  For example,
     'GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' binds the initial thread to
     CPU 0, the second to CPU 3, the third to CPU 1, the fourth to CPU
     2, the fifth to CPU 4, the sixth through tenth to CPUs 6, 8, 10,
     12, and 14 respectively and then starts assigning back from the
     beginning of the list.  'GOMP_CPU_AFFINITY=0' binds all threads to
     CPU 0.

     There is no libgomp library routine to determine whether a CPU
     affinity specification is in effect.  As a workaround,
     language-specific library functions, e.g., 'getenv' in C or
     'GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
     setting of the 'GOMP_CPU_AFFINITY' environment variable.  A defined
     CPU affinity on startup cannot be changed or disabled during the
     runtime of the application.

     If both 'GOMP_CPU_AFFINITY' and 'OMP_PROC_BIND' are set,
     'OMP_PROC_BIND' has a higher precedence.  If neither has been set
     and 'OMP_PROC_BIND' is unset, or when 'OMP_PROC_BIND' is set to
     'FALSE', the host system handles the assignment of threads to CPUs.

_See also_:
     *note OMP_PLACES::, *note OMP_PROC_BIND::


File: libgomp.info,  Node: GOMP_DEBUG,  Next: GOMP_STACKSIZE,  Prev: GOMP_CPU_AFFINITY,  Up: Environment Variables

4.22 'GOMP_DEBUG' - Enable debugging output
===========================================

_Description_:
     Enable debugging output.  The variable should be set to '0'
     (disabled, also the default if not set), or '1' (enabled).

     If enabled, some debugging output is printed during execution.
     This is currently not specified in more detail, and subject to
     change.


File: libgomp.info,  Node: GOMP_STACKSIZE,  Next: GOMP_SPINCOUNT,  Prev: GOMP_DEBUG,  Up: Environment Variables

4.23 'GOMP_STACKSIZE' - Set default thread stack size
=====================================================

_Description_:
     Set the default thread stack size in kilobytes.  This is different
     from 'pthread_attr_setstacksize' which gets the number of bytes as
     an argument.  If the stack size cannot be set due to system
     constraints, an error is reported and the initial stack size is
     left unchanged.  If undefined, the stack size is system dependent.

_See also_:
     *note OMP_STACKSIZE::

_Reference_:
     GCC Patches Mailinglist
     (https://gcc.gnu.org/ml/gcc-patches/2006-06/msg00493.html), GCC
     Patches Mailinglist
     (https://gcc.gnu.org/ml/gcc-patches/2006-06/msg00496.html)


File: libgomp.info,  Node: GOMP_SPINCOUNT,  Next: GOMP_RTEMS_THREAD_POOLS,  Prev: GOMP_STACKSIZE,  Up: Environment Variables

4.24 'GOMP_SPINCOUNT' - Set the busy-wait spin count
====================================================

_Description_:
     Determines how long a threads waits actively with consuming CPU
     power before waiting passively without consuming CPU power.  The
     value may be either 'INFINITE', 'INFINITY' to always wait actively
     or an integer which gives the number of spins of the busy-wait
     loop.  The integer may optionally be followed by the following
     suffixes acting as multiplication factors: 'k' (kilo, thousand),
     'M' (mega, million), 'G' (giga, billion), or 'T' (tera, trillion).
     If undefined, 0 is used when 'OMP_WAIT_POLICY' is 'PASSIVE',
     300,000 is used when 'OMP_WAIT_POLICY' is undefined and 30 billion
     is used when 'OMP_WAIT_POLICY' is 'ACTIVE'.  If there are more
     OpenMP threads than available CPUs, 1000 and 100 spins are used for
     'OMP_WAIT_POLICY' being 'ACTIVE' or undefined, respectively; unless
     the 'GOMP_SPINCOUNT' is lower or 'OMP_WAIT_POLICY' is 'PASSIVE'.

_See also_:
     *note OMP_WAIT_POLICY::


File: libgomp.info,  Node: GOMP_RTEMS_THREAD_POOLS,  Prev: GOMP_SPINCOUNT,  Up: Environment Variables

4.25 'GOMP_RTEMS_THREAD_POOLS' - Set the RTEMS specific thread pools
====================================================================

_Description_:
     This environment variable is only used on the RTEMS real-time
     operating system.  It determines the scheduler instance specific
     thread pools.  The format for 'GOMP_RTEMS_THREAD_POOLS' is a list
     of optional '<thread-pool-count>[$<priority>]@@<scheduler-name>'
     configurations separated by ':' where:
        * '<thread-pool-count>' is the thread pool count for this
          scheduler instance.
        * '$<priority>' is an optional priority for the worker threads
          of a thread pool according to 'pthread_setschedparam'.  In
          case a priority value is omitted, then a worker thread
          inherits the priority of the OpenMP primary thread that
          created it.  The priority of the worker thread is not changed
          after creation, even if a new OpenMP primary thread using the
          worker has a different priority.
        * '@@<scheduler-name>' is the scheduler instance name according
          to the RTEMS application configuration.
     In case no thread pool configuration is specified for a scheduler
     instance, then each OpenMP primary thread of this scheduler
     instance uses its own dynamically allocated thread pool.  To limit
     the worker thread count of the thread pools, each OpenMP primary
     thread must call 'omp_set_num_threads'.
_Example_:
     Lets suppose we have three scheduler instances 'IO', 'WRK0', and
     'WRK1' with 'GOMP_RTEMS_THREAD_POOLS' set to '"1@@WRK0:3$4@@WRK1"'.
     Then there are no thread pool restrictions for scheduler instance
     'IO'.  In the scheduler instance 'WRK0' there is one thread pool
     available.  Since no priority is specified for this scheduler
     instance, the worker thread inherits the priority of the OpenMP
     primary thread that created it.  In the scheduler instance 'WRK1'
     there are three thread pools available and their worker threads run
     at priority four.


File: libgomp.info,  Node: Enabling OpenACC,  Next: OpenACC Runtime Library Routines,  Prev: Environment Variables,  Up: Top

5 Enabling OpenACC
******************

To activate the OpenACC extensions for C/C++ and Fortran, the
compile-time flag '-fopenacc' must be specified.  This enables the
OpenACC directive '#pragma acc' in C/C++ and, in Fortran, the '!$acc'
sentinel in free source form and the 'c$acc', '*$acc' and '!$acc'
sentinels in fixed source form.  The flag also arranges for automatic
linking of the OpenACC runtime library (*note OpenACC Runtime Library
Routines::).

   See <https://gcc.gnu.org/wiki/OpenACC> for more information.

   A complete description of all OpenACC directives accepted may be
found in the OpenACC (https://www.openacc.org) Application Programming
Interface manual, version 2.6.


File: libgomp.info,  Node: OpenACC Runtime Library Routines,  Next: OpenACC Environment Variables,  Prev: Enabling OpenACC,  Up: Top

6 OpenACC Runtime Library Routines
**********************************

The runtime routines described here are defined by section 3 of the
OpenACC specifications in version 2.6.  They have C linkage, and do not
throw exceptions.  Generally, they are available only for the host, with
the exception of 'acc_on_device', which is available for both the host
and the acceleration device.

* Menu:

* acc_get_num_devices::         Get number of devices for the given device
                                type.
* acc_set_device_type::         Set type of device accelerator to use.
* acc_get_device_type::         Get type of device accelerator to be used.
* acc_set_device_num::          Set device number to use.
* acc_get_device_num::          Get device number to be used.
* acc_get_property::            Get device property.
* acc_async_test::              Tests for completion of a specific asynchronous
                                operation.
* acc_async_test_all::          Tests for completion of all asynchronous
                                operations.
* acc_wait::                    Wait for completion of a specific asynchronous
                                operation.
* acc_wait_all::                Waits for completion of all asynchronous
                                operations.
* acc_wait_all_async::          Wait for completion of all asynchronous
                                operations.
* acc_wait_async::              Wait for completion of asynchronous operations.
* acc_init::                    Initialize runtime for a specific device type.
* acc_shutdown::                Shuts down the runtime for a specific device
                                type.
* acc_on_device::               Whether executing on a particular device
* acc_malloc::                  Allocate device memory.
* acc_free::                    Free device memory.
* acc_copyin::                  Allocate device memory and copy host memory to
                                it.
* acc_present_or_copyin::       If the data is not present on the device,
                                allocate device memory and copy from host
                                memory.
* acc_create::                  Allocate device memory and map it to host
                                memory.
* acc_present_or_create::       If the data is not present on the device,
                                allocate device memory and map it to host
                                memory.
* acc_copyout::                 Copy device memory to host memory.
* acc_delete::                  Free device memory.
* acc_update_device::           Update device memory from mapped host memory.
* acc_update_self::             Update host memory from mapped device memory.
* acc_map_data::                Map previously allocated device memory to host
                                memory.
* acc_unmap_data::              Unmap device memory from host memory.
* acc_deviceptr::               Get device pointer associated with specific
                                host address.
* acc_hostptr::                 Get host pointer associated with specific
                                device address.
* acc_is_present::              Indicate whether host variable / array is
                                present on device.
* acc_memcpy_to_device::        Copy host memory to device memory.
* acc_memcpy_from_device::      Copy device memory to host memory.
* acc_attach::                  Let device pointer point to device-pointer target.
* acc_detach::                  Let device pointer point to host-pointer target.

API routines for target platforms.

* acc_get_current_cuda_device:: Get CUDA device handle.
* acc_get_current_cuda_context::Get CUDA context handle.
* acc_get_cuda_stream::         Get CUDA stream handle.
* acc_set_cuda_stream::         Set CUDA stream handle.

API routines for the OpenACC Profiling Interface.

* acc_prof_register::           Register callbacks.
* acc_prof_unregister::         Unregister callbacks.
* acc_prof_lookup::             Obtain inquiry functions.
* acc_register_library::        Library registration.


File: libgomp.info,  Node: acc_get_num_devices,  Next: acc_set_device_type,  Up: OpenACC Runtime Library Routines

6.1 'acc_get_num_devices' - Get number of devices for given device type
=======================================================================

_Description_
     This function returns a value indicating the number of devices
     available for the device type specified in DEVICETYPE.

_C/C++_:
     _Prototype_:   'int acc_get_num_devices(acc_device_t devicetype);'

_Fortran_:
     _Interface_:   'integer function acc_get_num_devices(devicetype)'
                    'integer(kind=acc_device_kind) devicetype'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.1.


File: libgomp.info,  Node: acc_set_device_type,  Next: acc_get_device_type,  Prev: acc_get_num_devices,  Up: OpenACC Runtime Library Routines

6.2 'acc_set_device_type' - Set type of device accelerator to use.
==================================================================

_Description_
     This function indicates to the runtime library which device type,
     specified in DEVICETYPE, to use when executing a parallel or
     kernels region.

_C/C++_:
     _Prototype_:   'acc_set_device_type(acc_device_t devicetype);'

_Fortran_:
     _Interface_:   'subroutine acc_set_device_type(devicetype)'
                    'integer(kind=acc_device_kind) devicetype'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.2.


File: libgomp.info,  Node: acc_get_device_type,  Next: acc_set_device_num,  Prev: acc_set_device_type,  Up: OpenACC Runtime Library Routines

6.3 'acc_get_device_type' - Get type of device accelerator to be used.
======================================================================

_Description_
     This function returns what device type will be used when executing
     a parallel or kernels region.

     This function returns 'acc_device_none' if 'acc_get_device_type' is
     called from 'acc_ev_device_init_start', 'acc_ev_device_init_end'
     callbacks of the OpenACC Profiling Interface (*note OpenACC
     Profiling Interface::), that is, if the device is currently being
     initialized.

_C/C++_:
     _Prototype_:   'acc_device_t acc_get_device_type(void);'

_Fortran_:
     _Interface_:   'function acc_get_device_type(void)'
                    'integer(kind=acc_device_kind) acc_get_device_type'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.3.


File: libgomp.info,  Node: acc_set_device_num,  Next: acc_get_device_num,  Prev: acc_get_device_type,  Up: OpenACC Runtime Library Routines

6.4 'acc_set_device_num' - Set device number to use.
====================================================

_Description_
     This function will indicate to the runtime which device number,
     specified by DEVICENUM, associated with the specified device type
     DEVICETYPE.

_C/C++_:
     _Prototype_:   'acc_set_device_num(int devicenum, acc_device_t
                    devicetype);'

_Fortran_:
     _Interface_:   'subroutine acc_set_device_num(devicenum, devicetype)'
                    'integer devicenum'
                    'integer(kind=acc_device_kind) devicetype'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.4.


File: libgomp.info,  Node: acc_get_device_num,  Next: acc_get_property,  Prev: acc_set_device_num,  Up: OpenACC Runtime Library Routines

6.5 'acc_get_device_num' - Get device number to be used.
========================================================

_Description_
     This function returns which device number associated with the
     specified device type DEVICETYPE, will be used when executing a
     parallel or kernels region.

_C/C++_:
     _Prototype_:   'int acc_get_device_num(acc_device_t devicetype);'

_Fortran_:
     _Interface_:   'function acc_get_device_num(devicetype)'
                    'integer(kind=acc_device_kind) devicetype'
                    'integer acc_get_device_num'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.5.


File: libgomp.info,  Node: acc_get_property,  Next: acc_async_test,  Prev: acc_get_device_num,  Up: OpenACC Runtime Library Routines

6.6 'acc_get_property' - Get device property.
=============================================

_Description_
     These routines return the value of the specified PROPERTY for the
     device being queried according to DEVICENUM and DEVICETYPE.
     Integer-valued and string-valued properties are returned by
     'acc_get_property' and 'acc_get_property_string' respectively.  The
     Fortran 'acc_get_property_string' subroutine returns the string
     retrieved in its fourth argument while the remaining entry points
     are functions, which pass the return value as their result.

     Note for Fortran, only: the OpenACC technical committee corrected
     and, hence, modified the interface introduced in OpenACC 2.6.  The
     kind-value parameter 'acc_device_property' has been renamed to
     'acc_device_property_kind' for consistency and the return type of
     the 'acc_get_property' function is now a 'c_size_t' integer instead
     of a 'acc_device_property' integer.  The parameter
     'acc_device_property' is still provided, but might be removed in a
     future version of GCC.

_C/C++_:
     _Prototype_:   'size_t acc_get_property(int devicenum, acc_device_t
                    devicetype, acc_device_property_t property);'
     _Prototype_:   'const char *acc_get_property_string(int devicenum,
                    acc_device_t devicetype, acc_device_property_t
                    property);'

_Fortran_:
     _Interface_:   'function acc_get_property(devicenum, devicetype,
                    property)'
     _Interface_:   'subroutine acc_get_property_string(devicenum,
                    devicetype, property, string)'
                    'use ISO_C_Binding, only: c_size_t'
                    'integer devicenum'
                    'integer(kind=acc_device_kind) devicetype'
                    'integer(kind=acc_device_property_kind) property'
                    'integer(kind=c_size_t) acc_get_property'
                    'character(*) string'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.6.


File: libgomp.info,  Node: acc_async_test,  Next: acc_async_test_all,  Prev: acc_get_property,  Up: OpenACC Runtime Library Routines

6.7 'acc_async_test' - Test for completion of a specific asynchronous operation.
================================================================================

_Description_
     This function tests for completion of the asynchronous operation
     specified in ARG.  In C/C++, a non-zero value is returned to
     indicate the specified asynchronous operation has completed while
     Fortran returns 'true'.  If the asynchronous operation has not
     completed, C/C++ returns zero and Fortran returns 'false'.

_C/C++_:
     _Prototype_:   'int acc_async_test(int arg);'

_Fortran_:
     _Interface_:   'function acc_async_test(arg)'
                    'integer(kind=acc_handle_kind) arg'
                    'logical acc_async_test'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.9.


File: libgomp.info,  Node: acc_async_test_all,  Next: acc_wait,  Prev: acc_async_test,  Up: OpenACC Runtime Library Routines

6.8 'acc_async_test_all' - Tests for completion of all asynchronous operations.
===============================================================================

_Description_
     This function tests for completion of all asynchronous operations.
     In C/C++, a non-zero value is returned to indicate all asynchronous
     operations have completed while Fortran returns 'true'.  If any
     asynchronous operation has not completed, C/C++ returns zero and
     Fortran returns 'false'.

_C/C++_:
     _Prototype_:   'int acc_async_test_all(void);'

_Fortran_:
     _Interface_:   'function acc_async_test()'
                    'logical acc_get_device_num'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.10.


File: libgomp.info,  Node: acc_wait,  Next: acc_wait_all,  Prev: acc_async_test_all,  Up: OpenACC Runtime Library Routines

6.9 'acc_wait' - Wait for completion of a specific asynchronous operation.
==========================================================================

_Description_
     This function waits for completion of the asynchronous operation
     specified in ARG.

_C/C++_:
     _Prototype_:   'acc_wait(arg);'
     _Prototype     'acc_async_wait(arg);'
     (OpenACC 1.0
     compatibility)_:

_Fortran_:
     _Interface_:   'subroutine acc_wait(arg)'
                    'integer(acc_handle_kind) arg'
     _Interface     'subroutine acc_async_wait(arg)'
     (OpenACC 1.0
     compatibility)_:
                    'integer(acc_handle_kind) arg'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.11.


File: libgomp.info,  Node: acc_wait_all,  Next: acc_wait_all_async,  Prev: acc_wait,  Up: OpenACC Runtime Library Routines

6.10 'acc_wait_all' - Waits for completion of all asynchronous operations.
==========================================================================

_Description_
     This function waits for the completion of all asynchronous
     operations.

_C/C++_:
     _Prototype_:   'acc_wait_all(void);'
     _Prototype     'acc_async_wait_all(void);'
     (OpenACC 1.0
     compatibility)_:

_Fortran_:
     _Interface_:   'subroutine acc_wait_all()'
     _Interface     'subroutine acc_async_wait_all()'
     (OpenACC 1.0
     compatibility)_:

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.13.


File: libgomp.info,  Node: acc_wait_all_async,  Next: acc_wait_async,  Prev: acc_wait_all,  Up: OpenACC Runtime Library Routines

6.11 'acc_wait_all_async' - Wait for completion of all asynchronous operations.
===============================================================================

_Description_
     This function enqueues a wait operation on the queue ASYNC for any
     and all asynchronous operations that have been previously enqueued
     on any queue.

_C/C++_:
     _Prototype_:   'acc_wait_all_async(int async);'

_Fortran_:
     _Interface_:   'subroutine acc_wait_all_async(async)'
                    'integer(acc_handle_kind) async'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.14.


File: libgomp.info,  Node: acc_wait_async,  Next: acc_init,  Prev: acc_wait_all_async,  Up: OpenACC Runtime Library Routines

6.12 'acc_wait_async' - Wait for completion of asynchronous operations.
=======================================================================

_Description_
     This function enqueues a wait operation on queue ASYNC for any and
     all asynchronous operations enqueued on queue ARG.

_C/C++_:
     _Prototype_:   'acc_wait_async(int arg, int async);'

_Fortran_:
     _Interface_:   'subroutine acc_wait_async(arg, async)'
                    'integer(acc_handle_kind) arg, async'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.12.


File: libgomp.info,  Node: acc_init,  Next: acc_shutdown,  Prev: acc_wait_async,  Up: OpenACC Runtime Library Routines

6.13 'acc_init' - Initialize runtime for a specific device type.
================================================================

_Description_
     This function initializes the runtime for the device type specified
     in DEVICETYPE.

_C/C++_:
     _Prototype_:   'acc_init(acc_device_t devicetype);'

_Fortran_:
     _Interface_:   'subroutine acc_init(devicetype)'
                    'integer(acc_device_kind) devicetype'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.7.


File: libgomp.info,  Node: acc_shutdown,  Next: acc_on_device,  Prev: acc_init,  Up: OpenACC Runtime Library Routines

6.14 'acc_shutdown' - Shuts down the runtime for a specific device type.
========================================================================

_Description_
     This function shuts down the runtime for the device type specified
     in DEVICETYPE.

_C/C++_:
     _Prototype_:   'acc_shutdown(acc_device_t devicetype);'

_Fortran_:
     _Interface_:   'subroutine acc_shutdown(devicetype)'
                    'integer(acc_device_kind) devicetype'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.8.


File: libgomp.info,  Node: acc_on_device,  Next: acc_malloc,  Prev: acc_shutdown,  Up: OpenACC Runtime Library Routines

6.15 'acc_on_device' - Whether executing on a particular device
===============================================================

_Description_:
     This function returns whether the program is executing on a
     particular device specified in DEVICETYPE.  In C/C++ a non-zero
     value is returned to indicate the device is executing on the
     specified device type.  In Fortran, 'true' is returned.  If the
     program is not executing on the specified device type C/C++ returns
     zero, while Fortran returns 'false'.

_C/C++_:
     _Prototype_:   'acc_on_device(acc_device_t devicetype);'

_Fortran_:
     _Interface_:   'function acc_on_device(devicetype)'
                    'integer(acc_device_kind) devicetype'
                    'logical acc_on_device'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.17.


File: libgomp.info,  Node: acc_malloc,  Next: acc_free,  Prev: acc_on_device,  Up: OpenACC Runtime Library Routines

6.16 'acc_malloc' - Allocate device memory.
===========================================

_Description_
     This function allocates BYTES bytes of device memory.  It returns
     the device address of the allocated memory.

_C/C++_:
     _Prototype_:   'd_void* acc_malloc(size_t bytes);'

_Fortran_:
     _Interface_:   'type(c_ptr) function acc_malloc(bytes)'
                    'integer(c_size_t), value :: bytes'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.18.  openacc specification v3.3 (https://www.openacc.org),
     section 3.2.16.


File: libgomp.info,  Node: acc_free,  Next: acc_copyin,  Prev: acc_malloc,  Up: OpenACC Runtime Library Routines

6.17 'acc_free' - Free device memory.
=====================================

_Description_
     Free previously allocated device memory at the device address
     'data_dev'.

_C/C++_:
     _Prototype_:   'void acc_free(d_void *data_dev);'

_Fortran_:
     _Interface_:   'subroutine acc_free(data_dev)'
                    'type(c_ptr), value :: data_dev'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.19.  openacc specification v3.3 (https://www.openacc.org),
     section 3.2.17.


File: libgomp.info,  Node: acc_copyin,  Next: acc_present_or_copyin,  Prev: acc_free,  Up: OpenACC Runtime Library Routines

6.18 'acc_copyin' - Allocate device memory and copy host memory to it.
======================================================================

_Description_
     In C/C++, this function allocates LEN bytes of device memory and
     maps it to the specified host address in A.  The device address of
     the newly allocated device memory is returned.

     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
     a variable or array element and LEN specifies the length in bytes.

_C/C++_:
     _Prototype_:   'void *acc_copyin(h_void *a, size_t len);'
     _Prototype_:   'void *acc_copyin_async(h_void *a, size_t len, int
                    async);'

_Fortran_:
     _Interface_:   'subroutine acc_copyin(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_copyin(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_copyin_async(a, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer(acc_handle_kind) :: async'
     _Interface_:   'subroutine acc_copyin_async(a, len, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'integer(acc_handle_kind) :: async'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.20.


File: libgomp.info,  Node: acc_present_or_copyin,  Next: acc_create,  Prev: acc_copyin,  Up: OpenACC Runtime Library Routines

6.19 'acc_present_or_copyin' - If the data is not present on the device, allocate device memory and copy from host memory.
==========================================================================================================================

_Description_
     This function tests if the host data specified by A and of length
     LEN is present or not.  If it is not present, device memory is
     allocated and the host memory copied.  The device address of the
     newly allocated device memory is returned.

     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
     a variable or array element and LEN specifies the length in bytes.

     Note that 'acc_present_or_copyin' and 'acc_pcopyin' exist for
     backward compatibility with OpenACC 2.0; use *note acc_copyin::
     instead.

_C/C++_:
     _Prototype_:   'void *acc_present_or_copyin(h_void *a, size_t len);'
     _Prototype_:   'void *acc_pcopyin(h_void *a, size_t len);'

_Fortran_:
     _Interface_:   'subroutine acc_present_or_copyin(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_present_or_copyin(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_pcopyin(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_pcopyin(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.20.


File: libgomp.info,  Node: acc_create,  Next: acc_present_or_create,  Prev: acc_present_or_copyin,  Up: OpenACC Runtime Library Routines

6.20 'acc_create' - Allocate device memory and map it to host memory.
=====================================================================

_Description_
     This function allocates device memory and maps it to host memory
     specified by the host address A with a length of LEN bytes.  In
     C/C++, the function returns the device address of the allocated
     device memory.

     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
     a variable or array element and LEN specifies the length in bytes.

_C/C++_:
     _Prototype_:   'void *acc_create(h_void *a, size_t len);'
     _Prototype_:   'void *acc_create_async(h_void *a, size_t len, int
                    async);'

_Fortran_:
     _Interface_:   'subroutine acc_create(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_create(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_create_async(a, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer(acc_handle_kind) :: async'
     _Interface_:   'subroutine acc_create_async(a, len, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'integer(acc_handle_kind) :: async'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.21.


File: libgomp.info,  Node: acc_present_or_create,  Next: acc_copyout,  Prev: acc_create,  Up: OpenACC Runtime Library Routines

6.21 'acc_present_or_create' - If the data is not present on the device, allocate device memory and map it to host memory.
==========================================================================================================================

_Description_
     This function tests if the host data specified by A and of length
     LEN is present or not.  If it is not present, device memory is
     allocated and mapped to host memory.  In C/C++, the device address
     of the newly allocated device memory is returned.

     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
     a variable or array element and LEN specifies the length in bytes.

     Note that 'acc_present_or_create' and 'acc_pcreate' exist for
     backward compatibility with OpenACC 2.0; use *note acc_create::
     instead.

_C/C++_:
     _Prototype_:   'void *acc_present_or_create(h_void *a, size_t len)'
     _Prototype_:   'void *acc_pcreate(h_void *a, size_t len)'

_Fortran_:
     _Interface_:   'subroutine acc_present_or_create(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_present_or_create(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_pcreate(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_pcreate(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.21.


File: libgomp.info,  Node: acc_copyout,  Next: acc_delete,  Prev: acc_present_or_create,  Up: OpenACC Runtime Library Routines

6.22 'acc_copyout' - Copy device memory to host memory.
=======================================================

_Description_
     This function copies mapped device memory to host memory which is
     specified by host address A for a length LEN bytes in C/C++.

     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
     a variable or array element and LEN specifies the length in bytes.

_C/C++_:
     _Prototype_:   'acc_copyout(h_void *a, size_t len);'
     _Prototype_:   'acc_copyout_async(h_void *a, size_t len, int async);'
     _Prototype_:   'acc_copyout_finalize(h_void *a, size_t len);'
     _Prototype_:   'acc_copyout_finalize_async(h_void *a, size_t len, int
                    async);'

_Fortran_:
     _Interface_:   'subroutine acc_copyout(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_copyout(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_copyout_async(a, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer(acc_handle_kind) :: async'
     _Interface_:   'subroutine acc_copyout_async(a, len, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'integer(acc_handle_kind) :: async'
     _Interface_:   'subroutine acc_copyout_finalize(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_copyout_finalize(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_copyout_finalize_async(a, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer(acc_handle_kind) :: async'
     _Interface_:   'subroutine acc_copyout_finalize_async(a, len, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'integer(acc_handle_kind) :: async'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.22.


File: libgomp.info,  Node: acc_delete,  Next: acc_update_device,  Prev: acc_copyout,  Up: OpenACC Runtime Library Routines

6.23 'acc_delete' - Free device memory.
=======================================

_Description_
     This function frees previously allocated device memory specified by
     the device address A and the length of LEN bytes.

     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
     a variable or array element and LEN specifies the length in bytes.

_C/C++_:
     _Prototype_:   'acc_delete(h_void *a, size_t len);'
     _Prototype_:   'acc_delete_async(h_void *a, size_t len, int async);'
     _Prototype_:   'acc_delete_finalize(h_void *a, size_t len);'
     _Prototype_:   'acc_delete_finalize_async(h_void *a, size_t len, int
                    async);'

_Fortran_:
     _Interface_:   'subroutine acc_delete(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_delete(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_delete_async(a, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer(acc_handle_kind) :: async'
     _Interface_:   'subroutine acc_delete_async(a, len, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'integer(acc_handle_kind) :: async'
     _Interface_:   'subroutine acc_delete_finalize(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_delete_finalize(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_delete_async_finalize(a, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer(acc_handle_kind) :: async'
     _Interface_:   'subroutine acc_delete_async_finalize(a, len, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'integer(acc_handle_kind) :: async'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.23.


File: libgomp.info,  Node: acc_update_device,  Next: acc_update_self,  Prev: acc_delete,  Up: OpenACC Runtime Library Routines

6.24 'acc_update_device' - Update device memory from mapped host memory.
========================================================================

_Description_
     This function updates the device copy from the previously mapped
     host memory.  The host memory is specified with the host address A
     and a length of LEN bytes.

     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
     a variable or array element and LEN specifies the length in bytes.

_C/C++_:
     _Prototype_:   'acc_update_device(h_void *a, size_t len);'
     _Prototype_:   'acc_update_device(h_void *a, size_t len, async);'

_Fortran_:
     _Interface_:   'subroutine acc_update_device(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_update_device(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_update_device_async(a, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer(acc_handle_kind) :: async'
     _Interface_:   'subroutine acc_update_device_async(a, len, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'integer(acc_handle_kind) :: async'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.24.


File: libgomp.info,  Node: acc_update_self,  Next: acc_map_data,  Prev: acc_update_device,  Up: OpenACC Runtime Library Routines

6.25 'acc_update_self' - Update host memory from mapped device memory.
======================================================================

_Description_
     This function updates the host copy from the previously mapped
     device memory.  The host memory is specified with the host address
     A and a length of LEN bytes.

     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
     a variable or array element and LEN specifies the length in bytes.

_C/C++_:
     _Prototype_:   'acc_update_self(h_void *a, size_t len);'
     _Prototype_:   'acc_update_self_async(h_void *a, size_t len, int
                    async);'

_Fortran_:
     _Interface_:   'subroutine acc_update_self(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_update_self(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_update_self_async(a, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer(acc_handle_kind) :: async'
     _Interface_:   'subroutine acc_update_self_async(a, len, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'integer(acc_handle_kind) :: async'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.25.


File: libgomp.info,  Node: acc_map_data,  Next: acc_unmap_data,  Prev: acc_update_self,  Up: OpenACC Runtime Library Routines

6.26 'acc_map_data' - Map previously allocated device memory to host memory.
============================================================================

_Description_
     This function maps previously allocated device and host memory.
     The device memory is specified with the device address DATA_DEV.
     The host memory is specified with the host address DATA_ARG and a
     length of BYTES.

_C/C++_:
     _Prototype_:   'void acc_map_data(h_void *data_arg, d_void *data_dev,
                    size_t bytes);'

_Fortran_:
     _Interface_:   'subroutine acc_map_data(data_arg, data_dev, bytes)'
                    'type(*), dimension(*) :: data_arg'
                    'type(c_ptr), value :: data_dev'
                    'integer(c_size_t), value :: bytes'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.26.  OpenACC specification v3.3 (https://www.openacc.org),
     section 3.2.21.


File: libgomp.info,  Node: acc_unmap_data,  Next: acc_deviceptr,  Prev: acc_map_data,  Up: OpenACC Runtime Library Routines

6.27 'acc_unmap_data' - Unmap device memory from host memory.
=============================================================

_Description_
     This function unmaps previously mapped device and host memory.  The
     latter specified by DATA_ARG.

_C/C++_:
     _Prototype_:   'void acc_unmap_data(h_void *data_arg);'

_Fortran_:
     _Interface_:   'subroutine acc_unmap_data(data_arg)'
                    'type(*), dimension(*) :: data_arg'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.27.  OpenACC specification v3.3 (https://www.openacc.org),
     section 3.2.22.


File: libgomp.info,  Node: acc_deviceptr,  Next: acc_hostptr,  Prev: acc_unmap_data,  Up: OpenACC Runtime Library Routines

6.28 'acc_deviceptr' - Get device pointer associated with specific host address.
================================================================================

_Description_
     This function returns the device address that has been mapped to
     the host address specified by DATA_ARG.

_C/C++_:
     _Prototype_:   'void *acc_deviceptr(h_void *data_arg);'

_Fortran_:
     _Interface_:   'type(c_ptr) function acc_deviceptr(data_arg)'
                    'type(*), dimension(*) :: data_arg'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.28.  OpenACC specification v3.3 (https://www.openacc.org),
     section 3.2.23.


File: libgomp.info,  Node: acc_hostptr,  Next: acc_is_present,  Prev: acc_deviceptr,  Up: OpenACC Runtime Library Routines

6.29 'acc_hostptr' - Get host pointer associated with specific device address.
==============================================================================

_Description_
     This function returns the host address that has been mapped to the
     device address specified by DATA_DEV.

_C/C++_:
     _Prototype_:   'void *acc_hostptr(d_void *data_dev);'

_Fortran_:
     _Interface_:   'type(c_ptr) function acc_hostptr(data_dev)'
                    'type(c_ptr), value :: data_dev'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.29.  OpenACC specification v3.3 (https://www.openacc.org),
     section 3.2.24.


File: libgomp.info,  Node: acc_is_present,  Next: acc_memcpy_to_device,  Prev: acc_hostptr,  Up: OpenACC Runtime Library Routines

6.30 'acc_is_present' - Indicate whether host variable / array is present on device.
====================================================================================

_Description_
     This function indicates whether the specified host address in A and
     a length of LEN bytes is present on the device.  In C/C++, a
     non-zero value is returned to indicate the presence of the mapped
     memory on the device.  A zero is returned to indicate the memory is
     not mapped on the device.

     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
     a variable or array element and LEN specifies the length in bytes.
     If the host memory is mapped to device memory, then a 'true' is
     returned.  Otherwise, a 'false' is return to indicate the mapped
     memory is not present.

_C/C++_:
     _Prototype_:   'int acc_is_present(h_void *a, size_t len);'

_Fortran_:
     _Interface_:   'function acc_is_present(a)'
                    'type, dimension(:[,:]...) :: a'
                    'logical acc_is_present'
     _Interface_:   'function acc_is_present(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'logical acc_is_present'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.30.


File: libgomp.info,  Node: acc_memcpy_to_device,  Next: acc_memcpy_from_device,  Prev: acc_is_present,  Up: OpenACC Runtime Library Routines

6.31 'acc_memcpy_to_device' - Copy host memory to device memory.
================================================================

_Description_
     This function copies host memory specified by host address of
     DATA_HOST_SRC to device memory specified by the device address
     DATA_DEV_DEST for a length of BYTES bytes.

_C/C++_:
     _Prototype_:   'void acc_memcpy_to_device(d_void* data_dev_dest,'
                    'h_void* data_host_src, size_t bytes);'
     _Prototype_:   'void acc_memcpy_to_device_async(d_void* data_dev_dest,'
                    'h_void* data_host_src, size_t bytes, int async_arg);'

_Fortran_:
     _Interface_:   'subroutine acc_memcpy_to_device(data_dev_dest, &'
                    'data_host_src, bytes)'
     _Interface_:   'subroutine acc_memcpy_to_device_async(data_dev_dest, &'
                    'data_host_src, bytes, async_arg)'
                    'type(c_ptr), value :: data_dev_dest'
                    'type(*), dimension(*) :: data_host_src'
                    'integer(c_size_t), value :: bytes'
                    'integer(acc_handle_kind), value :: async_arg'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.31 OpenACC specification v3.3 (https://www.openacc.org),
     section 3.2.26.


File: libgomp.info,  Node: acc_memcpy_from_device,  Next: acc_attach,  Prev: acc_memcpy_to_device,  Up: OpenACC Runtime Library Routines

6.32 'acc_memcpy_from_device' - Copy device memory to host memory.
==================================================================

_Description_
     This function copies device memory specified by device address of
     DATA_DEV_SRC to host memory specified by the host address
     DATA_HOST_DEST for a length of BYTES bytes.

_C/C++_:
     _Prototype_:   'void acc_memcpy_from_device(h_void* data_host_dest,'
                    'd_void* data_dev_src, size_t bytes);'
     _Prototype_:   'void acc_memcpy_from_device_async(h_void*
                    data_host_dest,'
                    'd_void* data_dev_src, size_t bytes, int async_arg);'

_Fortran_:
     _Interface_:   'subroutine acc_memcpy_from_device(data_host_dest, &'
                    'data_dev_src, bytes)'
     _Interface_:   'subroutine acc_memcpy_from_device_async(data_host_dest,
                    &'
                    'data_dev_src, bytes, async_arg)'
                    'type(*), dimension(*) :: data_host_dest'
                    'type(c_ptr), value :: data_dev_src'
                    'integer(c_size_t), value :: bytes'
                    'integer(acc_handle_kind), value :: async_arg'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.32.  OpenACC specification v3.3 (https://www.openacc.org),
     section 3.2.27.


File: libgomp.info,  Node: acc_attach,  Next: acc_detach,  Prev: acc_memcpy_from_device,  Up: OpenACC Runtime Library Routines

6.33 'acc_attach' - Let device pointer point to device-pointer target.
======================================================================

_Description_
     This function updates a pointer on the device from pointing to a
     host-pointer address to pointing to the corresponding device data.

_C/C++_:
     _Prototype_:   'void acc_attach(h_void **ptr_addr);'
     _Prototype_:   'void acc_attach_async(h_void **ptr_addr, int async);'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.34.


File: libgomp.info,  Node: acc_detach,  Next: acc_get_current_cuda_device,  Prev: acc_attach,  Up: OpenACC Runtime Library Routines

6.34 'acc_detach' - Let device pointer point to host-pointer target.
====================================================================

_Description_
     This function updates a pointer on the device from pointing to a
     device-pointer address to pointing to the corresponding host data.

_C/C++_:
     _Prototype_:   'void acc_detach(h_void **ptr_addr);'
     _Prototype_:   'void acc_detach_async(h_void **ptr_addr, int async);'
     _Prototype_:   'void acc_detach_finalize(h_void **ptr_addr);'
     _Prototype_:   'void acc_detach_finalize_async(h_void **ptr_addr, int
                    async);'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.35.


File: libgomp.info,  Node: acc_get_current_cuda_device,  Next: acc_get_current_cuda_context,  Prev: acc_detach,  Up: OpenACC Runtime Library Routines

6.35 'acc_get_current_cuda_device' - Get CUDA device handle.
============================================================

_Description_
     This function returns the CUDA device handle.  This handle is the
     same as used by the CUDA Runtime or Driver API's.

_C/C++_:
     _Prototype_:   'void *acc_get_current_cuda_device(void);'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     A.2.1.1.


File: libgomp.info,  Node: acc_get_current_cuda_context,  Next: acc_get_cuda_stream,  Prev: acc_get_current_cuda_device,  Up: OpenACC Runtime Library Routines

6.36 'acc_get_current_cuda_context' - Get CUDA context handle.
==============================================================

_Description_
     This function returns the CUDA context handle.  This handle is the
     same as used by the CUDA Runtime or Driver API's.

_C/C++_:
     _Prototype_:   'void *acc_get_current_cuda_context(void);'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     A.2.1.2.


File: libgomp.info,  Node: acc_get_cuda_stream,  Next: acc_set_cuda_stream,  Prev: acc_get_current_cuda_context,  Up: OpenACC Runtime Library Routines

6.37 'acc_get_cuda_stream' - Get CUDA stream handle.
====================================================

_Description_
     This function returns the CUDA stream handle for the queue ASYNC.
     This handle is the same as used by the CUDA Runtime or Driver
     API's.

_C/C++_:
     _Prototype_:   'void *acc_get_cuda_stream(int async);'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     A.2.1.3.


File: libgomp.info,  Node: acc_set_cuda_stream,  Next: acc_prof_register,  Prev: acc_get_cuda_stream,  Up: OpenACC Runtime Library Routines

6.38 'acc_set_cuda_stream' - Set CUDA stream handle.
====================================================

_Description_
     This function associates the stream handle specified by STREAM with
     the queue ASYNC.

     This cannot be used to change the stream handle associated with
     'acc_async_sync'.

     The return value is not specified.

_C/C++_:
     _Prototype_:   'int acc_set_cuda_stream(int async, void *stream);'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     A.2.1.4.


File: libgomp.info,  Node: acc_prof_register,  Next: acc_prof_unregister,  Prev: acc_set_cuda_stream,  Up: OpenACC Runtime Library Routines

6.39 'acc_prof_register' - Register callbacks.
==============================================

_Description_:
     This function registers callbacks.

_C/C++_:
     _Prototype_:   'void acc_prof_register (acc_event_t, acc_prof_callback,
                    acc_register_t);'

_See also_:
     *note OpenACC Profiling Interface::

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section 5.3.


File: libgomp.info,  Node: acc_prof_unregister,  Next: acc_prof_lookup,  Prev: acc_prof_register,  Up: OpenACC Runtime Library Routines

6.40 'acc_prof_unregister' - Unregister callbacks.
==================================================

_Description_:
     This function unregisters callbacks.

_C/C++_:
     _Prototype_:   'void acc_prof_unregister (acc_event_t,
                    acc_prof_callback, acc_register_t);'

_See also_:
     *note OpenACC Profiling Interface::

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section 5.3.


File: libgomp.info,  Node: acc_prof_lookup,  Next: acc_register_library,  Prev: acc_prof_unregister,  Up: OpenACC Runtime Library Routines

6.41 'acc_prof_lookup' - Obtain inquiry functions.
==================================================

_Description_:
     Function to obtain inquiry functions.

_C/C++_:
     _Prototype_:   'acc_query_fn acc_prof_lookup (const char *);'

_See also_:
     *note OpenACC Profiling Interface::

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section 5.3.


File: libgomp.info,  Node: acc_register_library,  Prev: acc_prof_lookup,  Up: OpenACC Runtime Library Routines

6.42 'acc_register_library' - Library registration.
===================================================

_Description_:
     Function for library registration.

_C/C++_:
     _Prototype_:   'void acc_register_library (acc_prof_reg, acc_prof_reg,
                    acc_prof_lookup_func);'

_See also_:
     *note OpenACC Profiling Interface::, *note ACC_PROFLIB::

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section 5.3.


File: libgomp.info,  Node: OpenACC Environment Variables,  Next: CUDA Streams Usage,  Prev: OpenACC Runtime Library Routines,  Up: Top

7 OpenACC Environment Variables
*******************************

The variables 'ACC_DEVICE_TYPE' and 'ACC_DEVICE_NUM' are defined by
section 4 of the OpenACC specification in version 2.0.  The variable
'ACC_PROFLIB' is defined by section 4 of the OpenACC specification in
version 2.6.

* Menu:

* ACC_DEVICE_TYPE::
* ACC_DEVICE_NUM::
* ACC_PROFLIB::


File: libgomp.info,  Node: ACC_DEVICE_TYPE,  Next: ACC_DEVICE_NUM,  Up: OpenACC Environment Variables

7.1 'ACC_DEVICE_TYPE'
=====================

_Description_:
     Control the default device type to use when executing compute
     regions.  If unset, the code can be run on any device type,
     favoring a non-host device type.

     Supported values in GCC (if compiled in) are
        * 'host'
        * 'nvidia'
        * 'radeon'
_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section 4.1.


File: libgomp.info,  Node: ACC_DEVICE_NUM,  Next: ACC_PROFLIB,  Prev: ACC_DEVICE_TYPE,  Up: OpenACC Environment Variables

7.2 'ACC_DEVICE_NUM'
====================

_Description_:
     Control which device, identified by device number, is the default
     device.  The value must be a nonnegative integer less than the
     number of devices.  If unset, device number zero is used.
_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section 4.2.


File: libgomp.info,  Node: ACC_PROFLIB,  Prev: ACC_DEVICE_NUM,  Up: OpenACC Environment Variables

7.3 'ACC_PROFLIB'
=================

_Description_:
     Semicolon-separated list of dynamic libraries that are loaded as
     profiling libraries.  Each library must provide at least the
     'acc_register_library' routine.  Each library file is found as
     described by the documentation of 'dlopen' of your operating
     system.
_See also_:
     *note acc_register_library::, *note OpenACC Profiling Interface::

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section 4.3.


File: libgomp.info,  Node: CUDA Streams Usage,  Next: OpenACC Library Interoperability,  Prev: OpenACC Environment Variables,  Up: Top

8 CUDA Streams Usage
********************

This applies to the 'nvptx' plugin only.

   The library provides elements that perform asynchronous movement of
data and asynchronous operation of computing constructs.  This
asynchronous functionality is implemented by making use of CUDA
streams(1).

   The primary means by that the asynchronous functionality is accessed
is through the use of those OpenACC directives which make use of the
'async' and 'wait' clauses.  When the 'async' clause is first used with
a directive, it creates a CUDA stream.  If an 'async-argument' is used
with the 'async' clause, then the stream is associated with the
specified 'async-argument'.

   Following the creation of an association between a CUDA stream and
the 'async-argument' of an 'async' clause, both the 'wait' clause and
the 'wait' directive can be used.  When either the clause or directive
is used after stream creation, it creates a rendezvous point whereby
execution waits until all operations associated with the
'async-argument', that is, stream, have completed.

   Normally, the management of the streams that are created as a result
of using the 'async' clause, is done without any intervention by the
caller.  This implies the association between the 'async-argument' and
the CUDA stream is maintained for the lifetime of the program.  However,
this association can be changed through the use of the library function
'acc_set_cuda_stream'.  When the function 'acc_set_cuda_stream' is
called, the CUDA stream that was originally associated with the 'async'
clause is destroyed.  Caution should be taken when changing the
association as subsequent references to the 'async-argument' refer to a
different CUDA stream.

   ---------- Footnotes ----------

   (1) See "Stream Management" in "CUDA Driver API", TRM-06703-001,
Version 5.5, for additional information


File: libgomp.info,  Node: OpenACC Library Interoperability,  Next: OpenACC Profiling Interface,  Prev: CUDA Streams Usage,  Up: Top

9 OpenACC Library Interoperability
**********************************

9.1 Introduction
================

The OpenACC library uses the CUDA Driver API, and may interact with
programs that use the Runtime library directly, or another library based
on the Runtime library, e.g., CUBLAS(1). This chapter describes the use
cases and what changes are required in order to use both the OpenACC
library and the CUBLAS and Runtime libraries within a program.

9.2 First invocation: NVIDIA CUBLAS library API
===============================================

In this first use case (see below), a function in the CUBLAS library is
called prior to any of the functions in the OpenACC library.  More
specifically, the function 'cublasCreate()'.

   When invoked, the function initializes the library and allocates the
hardware resources on the host and the device on behalf of the caller.
Once the initialization and allocation has completed, a handle is
returned to the caller.  The OpenACC library also requires
initialization and allocation of hardware resources.  Since the CUBLAS
library has already allocated the hardware resources for the device, all
that is left to do is to initialize the OpenACC library and acquire the
hardware resources on the host.

   Prior to calling the OpenACC function that initializes the library
and allocate the host hardware resources, you need to acquire the device
number that was allocated during the call to 'cublasCreate()'.  The
invoking of the runtime library function 'cudaGetDevice()' accomplishes
this.  Once acquired, the device number is passed along with the device
type as parameters to the OpenACC library function
'acc_set_device_num()'.

   Once the call to 'acc_set_device_num()' has completed, the OpenACC
library uses the context that was created during the call to
'cublasCreate()'.  In other words, both libraries share the same
context.

         /* Create the handle */
         s = cublasCreate(&h);
         if (s != CUBLAS_STATUS_SUCCESS)
         {
             fprintf(stderr, "cublasCreate failed %d\n", s);
             exit(EXIT_FAILURE);
         }

         /* Get the device number */
         e = cudaGetDevice(&dev);
         if (e != cudaSuccess)
         {
             fprintf(stderr, "cudaGetDevice failed %d\n", e);
             exit(EXIT_FAILURE);
         }

         /* Initialize OpenACC library and use device 'dev' */
         acc_set_device_num(dev, acc_device_nvidia);

                              Use Case 1

9.3 First invocation: OpenACC library API
=========================================

In this second use case (see below), a function in the OpenACC library
is called prior to any of the functions in the CUBLAS library.  More
specifically, the function 'acc_set_device_num()'.

   In the use case presented here, the function 'acc_set_device_num()'
is used to both initialize the OpenACC library and allocate the hardware
resources on the host and the device.  In the call to the function, the
call parameters specify which device to use and what device type to use,
i.e., 'acc_device_nvidia'.  It should be noted that this is but one
method to initialize the OpenACC library and allocate the appropriate
hardware resources.  Other methods are available through the use of
environment variables and these is discussed in the next section.

   Once the call to 'acc_set_device_num()' has completed, other OpenACC
functions can be called as seen with multiple calls being made to
'acc_copyin()'.  In addition, calls can be made to functions in the
CUBLAS library.  In the use case a call to 'cublasCreate()' is made
subsequent to the calls to 'acc_copyin()'.  As seen in the previous use
case, a call to 'cublasCreate()' initializes the CUBLAS library and
allocates the hardware resources on the host and the device.  However,
since the device has already been allocated, 'cublasCreate()' only
initializes the CUBLAS library and allocates the appropriate hardware
resources on the host.  The context that was created as part of the
OpenACC initialization is shared with the CUBLAS library, similarly to
the first use case.

         dev = 0;

         acc_set_device_num(dev, acc_device_nvidia);

         /* Copy the first set to the device */
         d_X = acc_copyin(&h_X[0], N * sizeof (float));
         if (d_X == NULL)
         {
             fprintf(stderr, "copyin error h_X\n");
             exit(EXIT_FAILURE);
         }

         /* Copy the second set to the device */
         d_Y = acc_copyin(&h_Y1[0], N * sizeof (float));
         if (d_Y == NULL)
         {
             fprintf(stderr, "copyin error h_Y1\n");
             exit(EXIT_FAILURE);
         }

         /* Create the handle */
         s = cublasCreate(&h);
         if (s != CUBLAS_STATUS_SUCCESS)
         {
             fprintf(stderr, "cublasCreate failed %d\n", s);
             exit(EXIT_FAILURE);
         }

         /* Perform saxpy using CUBLAS library function */
         s = cublasSaxpy(h, N, &alpha, d_X, 1, d_Y, 1);
         if (s != CUBLAS_STATUS_SUCCESS)
         {
             fprintf(stderr, "cublasSaxpy failed %d\n", s);
             exit(EXIT_FAILURE);
         }

         /* Copy the results from the device */
         acc_memcpy_from_device(&h_Y1[0], d_Y, N * sizeof (float));

                              Use Case 2

9.4 OpenACC library and environment variables
=============================================

There are two environment variables associated with the OpenACC library
that may be used to control the device type and device number:
'ACC_DEVICE_TYPE' and 'ACC_DEVICE_NUM', respectively.  These two
environment variables can be used as an alternative to calling
'acc_set_device_num()'.  As seen in the second use case, the device type
and device number were specified using 'acc_set_device_num()'.  If
however, the aforementioned environment variables were set, then the
call to 'acc_set_device_num()' would not be required.

   The use of the environment variables is only relevant when an OpenACC
function is called prior to a call to 'cudaCreate()'.  If 'cudaCreate()'
is called prior to a call to an OpenACC function, then you must call
'acc_set_device_num()'(2)

   ---------- Footnotes ----------

   (1) See section 2.26, "Interactions with the CUDA Driver API" in
"CUDA Runtime API", Version 5.5, and section 2.27, "VDPAU
Interoperability", in "CUDA Driver API", TRM-06703-001, Version 5.5, for
additional information on library interoperability.

   (2) More complete information about 'ACC_DEVICE_TYPE' and
'ACC_DEVICE_NUM' can be found in sections 4.1 and 4.2 of the OpenACC
(https://www.openacc.org) Application Programming Interface”, Version
2.6.


File: libgomp.info,  Node: OpenACC Profiling Interface,  Next: OpenMP-Implementation Specifics,  Prev: OpenACC Library Interoperability,  Up: Top

10 OpenACC Profiling Interface
******************************

10.1 Implementation Status and Implementation-Defined Behavior
==============================================================

We're implementing the OpenACC Profiling Interface as defined by the
OpenACC 2.6 specification.  We're clarifying some aspects here as
_implementation-defined behavior_, while they're still under discussion
within the OpenACC Technical Committee.

   This implementation is tuned to keep the performance impact as low as
possible for the (very common) case that the Profiling Interface is not
enabled.  This is relevant, as the Profiling Interface affects all the
_hot_ code paths (in the target code, not in the offloaded code).  Users
of the OpenACC Profiling Interface can be expected to understand that
performance is impacted to some degree once the Profiling Interface is
enabled: for example, because of the _runtime_ (libgomp) calling into a
third-party _library_ for every event that has been registered.

   We're not yet accounting for the fact that 'OpenACC events may occur
during event processing'.  We just handle one case specially, as
required by CUDA 9.0 'nvprof', that 'acc_get_device_type' (*note
acc_get_device_type::)) may be called from 'acc_ev_device_init_start',
'acc_ev_device_init_end' callbacks.

   We're not yet implementing initialization via a
'acc_register_library' function that is either statically linked in, or
dynamically via 'LD_PRELOAD'.  Initialization via 'acc_register_library'
functions dynamically loaded via the 'ACC_PROFLIB' environment variable
does work, as does directly calling 'acc_prof_register',
'acc_prof_unregister', 'acc_prof_lookup'.

   As currently there are no inquiry functions defined, calls to
'acc_prof_lookup' always returns 'NULL'.

   There aren't separate _start_, _stop_ events defined for the event
types 'acc_ev_create', 'acc_ev_delete', 'acc_ev_alloc', 'acc_ev_free'.
It's not clear if these should be triggered before or after the actual
device-specific call is made.  We trigger them after.

   Remarks about data provided to callbacks:

'acc_prof_info.event_type'
     It's not clear if for _nested_ event callbacks (for example,
     'acc_ev_enqueue_launch_start' as part of a parent compute
     construct), this should be set for the nested event
     ('acc_ev_enqueue_launch_start'), or if the value of the parent
     construct should remain ('acc_ev_compute_construct_start').  In
     this implementation, the value generally corresponds to the
     innermost nested event type.

'acc_prof_info.device_type'

        * For 'acc_ev_compute_construct_start', and in presence of an
          'if' clause with _false_ argument, this still refers to the
          offloading device type.  It's not clear if that's the expected
          behavior.

        * Complementary to the item before, for
          'acc_ev_compute_construct_end', this is set to
          'acc_device_host' in presence of an 'if' clause with _false_
          argument.  It's not clear if that's the expected behavior.

'acc_prof_info.thread_id'
     Always '-1'; not yet implemented.

'acc_prof_info.async'

        * Not yet implemented correctly for
          'acc_ev_compute_construct_start'.

        * In a compute construct, for host-fallback
          execution/'acc_device_host' it always is 'acc_async_sync'.  It
          is unclear if that is the expected behavior.

        * For 'acc_ev_device_init_start' and 'acc_ev_device_init_end',
          it will always be 'acc_async_sync'.  It is unclear if that is
          the expected behavior.

'acc_prof_info.async_queue'
     There is no 'limited number of asynchronous queues' in libgomp.
     This always has the same value as 'acc_prof_info.async'.

'acc_prof_info.src_file'
     Always 'NULL'; not yet implemented.

'acc_prof_info.func_name'
     Always 'NULL'; not yet implemented.

'acc_prof_info.line_no'
     Always '-1'; not yet implemented.

'acc_prof_info.end_line_no'
     Always '-1'; not yet implemented.

'acc_prof_info.func_line_no'
     Always '-1'; not yet implemented.

'acc_prof_info.func_end_line_no'
     Always '-1'; not yet implemented.

'acc_event_info.event_type', 'acc_event_info.*.event_type'
     Relating to 'acc_prof_info.event_type' discussed above, in this
     implementation, this will always be the same value as
     'acc_prof_info.event_type'.

'acc_event_info.*.parent_construct'

        * Will be 'acc_construct_parallel' for all OpenACC compute
          constructs as well as many OpenACC Runtime API calls; should
          be the one matching the actual construct, or
          'acc_construct_runtime_api', respectively.

        * Will be 'acc_construct_enter_data' or
          'acc_construct_exit_data' when processing variable mappings
          specified in OpenACC _declare_ directives; should be
          'acc_construct_declare'.

        * For implicit 'acc_ev_device_init_start',
          'acc_ev_device_init_end', and explicit as well as implicit
          'acc_ev_alloc', 'acc_ev_free', 'acc_ev_enqueue_upload_start',
          'acc_ev_enqueue_upload_end', 'acc_ev_enqueue_download_start',
          and 'acc_ev_enqueue_download_end', will be
          'acc_construct_parallel'; should reflect the real parent
          construct.

'acc_event_info.*.implicit'
     For 'acc_ev_alloc', 'acc_ev_free', 'acc_ev_enqueue_upload_start',
     'acc_ev_enqueue_upload_end', 'acc_ev_enqueue_download_start', and
     'acc_ev_enqueue_download_end', this currently will be '1' also for
     explicit usage.

'acc_event_info.data_event.var_name'
     Always 'NULL'; not yet implemented.

'acc_event_info.data_event.host_ptr'
     For 'acc_ev_alloc', and 'acc_ev_free', this is always 'NULL'.

'typedef union acc_api_info'
     ... as printed in '5.2.3. Third Argument: API-Specific
     Information'.  This should obviously be 'typedef _struct_
     acc_api_info'.

'acc_api_info.device_api'
     Possibly not yet implemented correctly for
     'acc_ev_compute_construct_start', 'acc_ev_device_init_start',
     'acc_ev_device_init_end': will always be 'acc_device_api_none' for
     these event types.  For 'acc_ev_enter_data_start', it will be
     'acc_device_api_none' in some cases.

'acc_api_info.device_type'
     Always the same as 'acc_prof_info.device_type'.

'acc_api_info.vendor'
     Always '-1'; not yet implemented.

'acc_api_info.device_handle'
     Always 'NULL'; not yet implemented.

'acc_api_info.context_handle'
     Always 'NULL'; not yet implemented.

'acc_api_info.async_handle'
     Always 'NULL'; not yet implemented.

   Remarks about certain event types:

'acc_ev_device_init_start', 'acc_ev_device_init_end'

        * When a compute construct triggers implicit
          'acc_ev_device_init_start' and 'acc_ev_device_init_end'
          events, they currently aren't _nested within_ the
          corresponding 'acc_ev_compute_construct_start' and
          'acc_ev_compute_construct_end', but they're currently observed
          _before_ 'acc_ev_compute_construct_start'.  It's not clear
          what to do: the standard asks us provide a lot of details to
          the 'acc_ev_compute_construct_start' callback, without
          (implicitly) initializing a device before?

        * Callbacks for these event types will not be invoked for calls
          to the 'acc_set_device_type' and 'acc_set_device_num'
          functions.  It's not clear if they should be.

'acc_ev_enter_data_start', 'acc_ev_enter_data_end', 'acc_ev_exit_data_start', 'acc_ev_exit_data_end'

        * Callbacks for these event types will also be invoked for
          OpenACC _host_data_ constructs.  It's not clear if they should
          be.

        * Callbacks for these event types will also be invoked when
          processing variable mappings specified in OpenACC _declare_
          directives.  It's not clear if they should be.

   Callbacks for the following event types will be invoked, but dispatch
and information provided therein has not yet been thoroughly reviewed:

   * 'acc_ev_alloc'
   * 'acc_ev_free'
   * 'acc_ev_update_start', 'acc_ev_update_end'
   * 'acc_ev_enqueue_upload_start', 'acc_ev_enqueue_upload_end'
   * 'acc_ev_enqueue_download_start', 'acc_ev_enqueue_download_end'

   During device initialization, and finalization, respectively,
callbacks for the following event types will not yet be invoked:

   * 'acc_ev_alloc'
   * 'acc_ev_free'

   Callbacks for the following event types have not yet been
implemented, so currently won't be invoked:

   * 'acc_ev_device_shutdown_start', 'acc_ev_device_shutdown_end'
   * 'acc_ev_runtime_shutdown'
   * 'acc_ev_create', 'acc_ev_delete'
   * 'acc_ev_wait_start', 'acc_ev_wait_end'

   For the following runtime library functions, not all expected
callbacks will be invoked (mostly concerning implicit device
initialization):

   * 'acc_get_num_devices'
   * 'acc_set_device_type'
   * 'acc_get_device_type'
   * 'acc_set_device_num'
   * 'acc_get_device_num'
   * 'acc_init'
   * 'acc_shutdown'

   Aside from implicit device initialization, for the following runtime
library functions, no callbacks will be invoked for shared-memory
offloading devices (it's not clear if they should be):

   * 'acc_malloc'
   * 'acc_free'
   * 'acc_copyin', 'acc_present_or_copyin', 'acc_copyin_async'
   * 'acc_create', 'acc_present_or_create', 'acc_create_async'
   * 'acc_copyout', 'acc_copyout_async', 'acc_copyout_finalize',
     'acc_copyout_finalize_async'
   * 'acc_delete', 'acc_delete_async', 'acc_delete_finalize',
     'acc_delete_finalize_async'
   * 'acc_update_device', 'acc_update_device_async'
   * 'acc_update_self', 'acc_update_self_async'
   * 'acc_map_data', 'acc_unmap_data'
   * 'acc_memcpy_to_device', 'acc_memcpy_to_device_async'
   * 'acc_memcpy_from_device', 'acc_memcpy_from_device_async'


File: libgomp.info,  Node: OpenMP-Implementation Specifics,  Next: Offload-Target Specifics,  Prev: OpenACC Profiling Interface,  Up: Top

11 OpenMP-Implementation Specifics
**********************************

* Menu:

* Implementation-defined ICV Initialization::
* OpenMP Context Selectors::
* Memory allocation::


File: libgomp.info,  Node: Implementation-defined ICV Initialization,  Next: OpenMP Context Selectors,  Up: OpenMP-Implementation Specifics

11.1 Implementation-defined ICV Initialization
==============================================

AFFINITY-FORMAT-VAR    See *note OMP_AFFINITY_FORMAT::.
DEF-ALLOCATOR-VAR      See *note OMP_ALLOCATOR::.
MAX-ACTIVE-LEVELS-VAR  See *note OMP_MAX_ACTIVE_LEVELS::.
DYN-VAR                See *note OMP_DYNAMIC::.
NTHREADS-VAR           See *note OMP_NUM_THREADS::.
NUM-DEVICES-VAR        Number of non-host devices found by GCC's
                       run-time library
NUM-PROCS-VAR          The number of CPU cores on the initial device,
                       except that affinity settings might lead to a
                       smaller number.  On non-host devices, the value
                       of the NTHREADS-VAR ICV.
PLACE-PARTITION-VAR    See *note OMP_PLACES::.
RUN-SCHED-VAR          See *note OMP_SCHEDULE::.
STACKSIZE-VAR          See *note OMP_STACKSIZE::.
THREAD-LIMIT-VAR       See *note OMP_TEAMS_THREAD_LIMIT::
WAIT-POLICY-VAR        See *note OMP_WAIT_POLICY:: and
                       *note GOMP_SPINCOUNT::


File: libgomp.info,  Node: OpenMP Context Selectors,  Next: Memory allocation,  Prev: Implementation-defined ICV Initialization,  Up: OpenMP-Implementation Specifics

11.2 OpenMP Context Selectors
=============================

'vendor' is always 'gnu'.  References are to the GCC manual.

   For the host compiler, 'kind' always matches 'host'; for the
offloading architectures AMD GCN and Nvidia PTX, 'kind' always matches
'gpu'.  For the x86 family of computers, AMD GCN and Nvidia PTX the
following traits are supported in addition; while OpenMP is supported on
more architectures, GCC currently does not match any 'arch' or 'isa'
traits for those.

'arch'                                          'isa'
-----------------------------------------------------------------------
'x86', 'x86_64', 'i386', 'i486', 'i586',        See '-m...' flags in
'i686', 'ia32'                                  "x86 Options"
                                                (without '-m')
'amdgcn', 'gcn'                                 See '-march=' in
                                                "AMD GCN Options"(1)
'nvptx', 'nvptx64'                              See '-march=' in
                                                "Nvidia PTX Options"

   ---------- Footnotes ----------

   (1) Additionally, 'gfx803' is supported as an alias for 'fiji'.


File: libgomp.info,  Node: Memory allocation,  Prev: OpenMP Context Selectors,  Up: OpenMP-Implementation Specifics

11.3 Memory allocation
======================

The description below applies to:

   * Explicit use of the OpenMP API routines, see *note Memory
     Management Routines::.
   * The 'allocate' clause, except when the 'allocator' modifier is a
     constant expression with value 'omp_default_mem_alloc' and no
     'align' modifier has been specified.  (In that case, the normal
     'malloc' allocation is used.)
   * Using the 'allocate' directive for automatic/stack variables,
     except when the 'allocator' clause is a constant expression with
     value 'omp_default_mem_alloc' and no 'align' clause has been
     specified.  (In that case, the normal allocation is used: stack
     allocation and, sometimes for Fortran, also 'malloc' [depending on
     flags such as '-fstack-arrays'].)
   * Using the 'allocate' directive for variable in static memory is
     currently not supported (compile time error).
   * In Fortran, the 'allocators' directive and the executable
     'allocate' directive for Fortran pointers and allocatables is
     supported, but requires that files containing those directives has
     to be compiled with '-fopenmp-allocators'.  Additionally, all files
     that might explicitly or implicitly deallocate memory allocated
     that way must also be compiled with that option.

   For the available predefined allocators and, as applicable, their
associated predefined memory spaces and for the available traits and
their default values, see *note OMP_ALLOCATOR::.  Predefined allocators
without an associated memory space use the 'omp_default_mem_space'
memory space.

   For the memory spaces, the following applies:
   * 'omp_default_mem_space' is supported
   * 'omp_const_mem_space' maps to 'omp_default_mem_space'
   * 'omp_low_lat_mem_space' is only available on supported devices, and
     maps to 'omp_default_mem_space' otherwise.
   * 'omp_large_cap_mem_space' maps to 'omp_default_mem_space', unless
     the memkind library is available
   * 'omp_high_bw_mem_space' maps to 'omp_default_mem_space', unless the
     memkind library is available

   On Linux systems, where the memkind library
(https://github.com/memkind/memkind) ('libmemkind.so.0') is available at
runtime, it is used when creating memory allocators requesting

   * the memory space 'omp_high_bw_mem_space'
   * the memory space 'omp_large_cap_mem_space'
   * the 'partition' trait 'interleaved'; note that for
     'omp_large_cap_mem_space' the allocation will not be interleaved

   On Linux systems, where the numa library
(https://github.com/numactl/numactl) ('libnuma.so.1') is available at
runtime, it used when creating memory allocators requesting

   * the 'partition' trait 'nearest', except when both the libmemkind
     library is available and the memory space is either
     'omp_large_cap_mem_space' or 'omp_high_bw_mem_space'

   Note that the numa library will round up the allocation size to a
multiple of the system page size; therefore, consider using it only with
large data or by sharing allocations via the 'pool_size' trait.
Furthermore, the Linux kernel does not guarantee that an allocation will
always be on the nearest NUMA node nor that after reallocation the same
node will be used.  Note additionally that, on Linux, the default
setting of the memory placement policy is to use the current node;
therefore, unless the memory placement policy has been overridden, the
'partition' trait 'environment' (the default) will be effectively a
'nearest' allocation.

   Additional notes regarding the traits:
   * The 'pinned' trait is supported on Linux hosts, but is subject to
     the OS 'ulimit'/'rlimit' locked memory settings.
   * The default for the 'pool_size' trait is no pool and for every
     (re)allocation the associated library routine is called, which
     might internally use a memory pool.
   * For the 'partition' trait, the partition part size will be the same
     as the requested size (i.e.  'interleaved' or 'blocked' has no
     effect), except for 'interleaved' when the memkind library is
     available.  Furthermore, for 'nearest' and unless the numa library
     is available, the memory might not be on the same NUMA node as
     thread that allocated the memory; on Linux, this is in particular
     the case when the memory placement policy is set to preferred.
   * The 'access' trait has no effect such that memory is always
     accessible by all threads.
   * The 'sync_hint' trait has no effect.

   See also: *note Offload-Target Specifics::


File: libgomp.info,  Node: Offload-Target Specifics,  Next: The libgomp ABI,  Prev: OpenMP-Implementation Specifics,  Up: Top

12 Offload-Target Specifics
***************************

The following sections present notes on the offload-target specifics

* Menu:

* AMD Radeon::
* nvptx::


File: libgomp.info,  Node: AMD Radeon,  Next: nvptx,  Up: Offload-Target Specifics

12.1 AMD Radeon (GCN)
=====================

On the hardware side, there is the hierarchy (fine to coarse):
   * work item (thread)
   * wavefront
   * work group
   * compute unit (CU)

   All OpenMP and OpenACC levels are used, i.e.
   * OpenMP's simd and OpenACC's vector map to work items (thread)
   * OpenMP's threads ("parallel") and OpenACC's workers map to
     wavefronts
   * OpenMP's teams and OpenACC's gang use a threadpool with the size of
     the number of teams or gangs, respectively.

   The used sizes are
   * Number of teams is the specified 'num_teams' (OpenMP) or
     'num_gangs' (OpenACC) or otherwise the number of CU. It is limited
     by two times the number of CU.
   * Number of wavefronts is 4 for gfx900 and 16 otherwise;
     'num_threads' (OpenMP) and 'num_workers' (OpenACC) overrides this
     if smaller.
   * The wavefront has 102 scalars and 64 vectors
   * Number of workitems is always 64
   * The hardware permits maximally 40 workgroups/CU and 16
     wavefronts/workgroup up to a limit of 40 wavefronts in total per
     CU.
   * 80 scalars registers and 24 vector registers in non-kernel
     functions (the chosen procedure-calling API).
   * For the kernel itself: as many as register pressure demands (number
     of teams and number of threads, scaled down if registers are
     exhausted)

   The implementation remark:
   * I/O within OpenMP target regions and OpenACC parallel/kernels is
     supported using the C library 'printf' functions and the Fortran
     'print'/'write' statements.
   * Reverse offload regions (i.e.  'target' regions with
     'device(ancestor:1)') are processed serially per 'target' region
     such that the next reverse offload region is only executed after
     the previous one returned.
   * OpenMP code that has a 'requires' directive with
     'unified_shared_memory' will remove any GCN device from the list of
     available devices ("host fallback").
   * The available stack size can be changed using the 'GCN_STACK_SIZE'
     environment variable; the default is 32 kiB per thread.
   * Low-latency memory ('omp_low_lat_mem_space') is supported when the
     the 'access' trait is set to 'cgroup'.  The default pool size is
     automatically scaled to share the 64 kiB LDS memory between the
     number of teams configured to run on each compute-unit, but may be
     adjusted at runtime by setting environment variable
     'GOMP_GCN_LOWLAT_POOL=BYTES'.
   * 'omp_low_lat_mem_alloc' cannot be used with true low-latency memory
     because the definition implies the 'omp_atv_all' trait; main
     graphics memory is used instead.
   * 'omp_cgroup_mem_alloc', 'omp_pteam_mem_alloc', and
     'omp_thread_mem_alloc', all use low-latency memory as first
     preference, and fall back to main graphics memory when the
     low-latency pool is exhausted.


File: libgomp.info,  Node: nvptx,  Prev: AMD Radeon,  Up: Offload-Target Specifics

12.2 nvptx
==========

On the hardware side, there is the hierarchy (fine to coarse):
   * thread
   * warp
   * thread block
   * streaming multiprocessor

   All OpenMP and OpenACC levels are used, i.e.
   * OpenMP's simd and OpenACC's vector map to threads
   * OpenMP's threads ("parallel") and OpenACC's workers map to warps
   * OpenMP's teams and OpenACC's gang use a threadpool with the size of
     the number of teams or gangs, respectively.

   The used sizes are
   * The 'warp_size' is always 32
   * CUDA kernel launched: 'dim={#teams,1,1},
     blocks={#threads,warp_size,1}'.
   * The number of teams is limited by the number of blocks the device
     can host simultaneously.

   Additional information can be obtained by setting the environment
variable to 'GOMP_DEBUG=1' (very verbose; grep for 'kernel.*launch' for
launch parameters).

   GCC generates generic PTX ISA code, which is just-in-time compiled by
CUDA, which caches the JIT in the user's directory (see CUDA
documentation; can be tuned by the environment variables
'CUDA_CACHE_{DISABLE,MAXSIZE,PATH}'.

   Note: While PTX ISA is generic, the '-mptx=' and '-march='
commandline options still affect the used PTX ISA code and, thus, the
requirements on CUDA version and hardware.

   The implementation remark:
   * I/O within OpenMP target regions and OpenACC parallel/kernels is
     supported using the C library 'printf' functions.  Note that the
     Fortran 'print'/'write' statements are not supported, yet.
   * Compilation OpenMP code that contains 'requires reverse_offload'
     requires at least '-march=sm_35', compiling for '-march=sm_30' is
     not supported.
   * For code containing reverse offload (i.e.  'target' regions with
     'device(ancestor:1)'), there is a slight performance penalty for
     _all_ target regions, consisting mostly of shutdown delay Per
     device, reverse offload regions are processed serially such that
     the next reverse offload region is only executed after the previous
     one returned.
   * OpenMP code that has a 'requires' directive with
     'unified_shared_memory' will remove any nvptx device from the list
     of available devices ("host fallback").
   * The default per-warp stack size is 128 kiB; see also '-msoft-stack'
     in the GCC manual.
   * The OpenMP routines 'omp_target_memcpy_rect' and
     'omp_target_memcpy_rect_async' and the 'target update' directive
     for non-contiguous list items will use the 2D and 3D memory-copy
     functions of the CUDA library.  Higher dimensions will call those
     functions in a loop and are therefore supported.
   * Low-latency memory ('omp_low_lat_mem_space') is supported when the
     the 'access' trait is set to 'cgroup', the ISA is at least 'sm_53',
     and the PTX version is at least 4.1.  The default pool size is 8
     kiB per team, but may be adjusted at runtime by setting environment
     variable 'GOMP_NVPTX_LOWLAT_POOL=BYTES'.  The maximum value is
     limited by the available hardware, and care should be taken that
     the selected pool size does not unduly limit the number of teams
     that can run simultaneously.
   * 'omp_low_lat_mem_alloc' cannot be used with true low-latency memory
     because the definition implies the 'omp_atv_all' trait; main
     graphics memory is used instead.
   * 'omp_cgroup_mem_alloc', 'omp_pteam_mem_alloc', and
     'omp_thread_mem_alloc', all use low-latency memory as first
     preference, and fall back to main graphics memory when the
     low-latency pool is exhausted.


File: libgomp.info,  Node: The libgomp ABI,  Next: Reporting Bugs,  Prev: Offload-Target Specifics,  Up: Top

13 The libgomp ABI
******************

The following sections present notes on the external ABI as presented by
libgomp.  Only maintainers should need them.

* Menu:

* Implementing MASTER construct::
* Implementing CRITICAL construct::
* Implementing ATOMIC construct::
* Implementing FLUSH construct::
* Implementing BARRIER construct::
* Implementing THREADPRIVATE construct::
* Implementing PRIVATE clause::
* Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses::
* Implementing REDUCTION clause::
* Implementing PARALLEL construct::
* Implementing FOR construct::
* Implementing ORDERED construct::
* Implementing SECTIONS construct::
* Implementing SINGLE construct::
* Implementing OpenACC's PARALLEL construct::


File: libgomp.info,  Node: Implementing MASTER construct,  Next: Implementing CRITICAL construct,  Up: The libgomp ABI

13.1 Implementing MASTER construct
==================================

     if (omp_get_thread_num () == 0)
       block

   Alternately, we generate two copies of the parallel subfunction and
only include this in the version run by the primary thread.  Surely this
is not worthwhile though...


File: libgomp.info,  Node: Implementing CRITICAL construct,  Next: Implementing ATOMIC construct,  Prev: Implementing MASTER construct,  Up: The libgomp ABI

13.2 Implementing CRITICAL construct
====================================

Without a specified name,

       void GOMP_critical_start (void);
       void GOMP_critical_end (void);

   so that we don't get COPY relocations from libgomp to the main
application.

   With a specified name, use omp_set_lock and omp_unset_lock with name
being transformed into a variable declared like

       omp_lock_t gomp_critical_user_<name> __attribute__((common))

   Ideally the ABI would specify that all zero is a valid unlocked
state, and so we wouldn't need to initialize this at startup.


File: libgomp.info,  Node: Implementing ATOMIC construct,  Next: Implementing FLUSH construct,  Prev: Implementing CRITICAL construct,  Up: The libgomp ABI

13.3 Implementing ATOMIC construct
==================================

The target should implement the '__sync' builtins.

   Failing that we could add

       void GOMP_atomic_enter (void)
       void GOMP_atomic_exit (void)

   which reuses the regular lock code, but with yet another lock object
private to the library.


File: libgomp.info,  Node: Implementing FLUSH construct,  Next: Implementing BARRIER construct,  Prev: Implementing ATOMIC construct,  Up: The libgomp ABI

13.4 Implementing FLUSH construct
=================================

Expands to the '__sync_synchronize' builtin.


File: libgomp.info,  Node: Implementing BARRIER construct,  Next: Implementing THREADPRIVATE construct,  Prev: Implementing FLUSH construct,  Up: The libgomp ABI

13.5 Implementing BARRIER construct
===================================

       void GOMP_barrier (void)


File: libgomp.info,  Node: Implementing THREADPRIVATE construct,  Next: Implementing PRIVATE clause,  Prev: Implementing BARRIER construct,  Up: The libgomp ABI

13.6 Implementing THREADPRIVATE construct
=========================================

In _most_ cases we can map this directly to '__thread'.  Except that OMP
allows constructors for C++ objects.  We can either refuse to support
this (how often is it used?)  or we can implement something akin to
.ctors.

   Even more ideally, this ctor feature is handled by extensions to the
main pthreads library.  Failing that, we can have a set of entry points
to register ctor functions to be called.


File: libgomp.info,  Node: Implementing PRIVATE clause,  Next: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses,  Prev: Implementing THREADPRIVATE construct,  Up: The libgomp ABI

13.7 Implementing PRIVATE clause
================================

In association with a PARALLEL, or within the lexical extent of a
PARALLEL block, the variable becomes a local variable in the parallel
subfunction.

   In association with FOR or SECTIONS blocks, create a new automatic
variable within the current function.  This preserves the semantic of
new variable creation.


File: libgomp.info,  Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses,  Next: Implementing REDUCTION clause,  Prev: Implementing PRIVATE clause,  Up: The libgomp ABI

13.8 Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses
=========================================================================

This seems simple enough for PARALLEL blocks.  Create a private struct
for communicating between the parent and subfunction.  In the parent,
copy in values for scalar and "small" structs; copy in addresses for
others TREE_ADDRESSABLE types.  In the subfunction, copy the value into
the local variable.

   It is not clear what to do with bare FOR or SECTION blocks.  The only
thing I can figure is that we do something like:

     #pragma omp for firstprivate(x) lastprivate(y)
     for (int i = 0; i < n; ++i)
       body;

   which becomes

     {
       int x = x, y;

       // for stuff

       if (i == n)
         y = y;
     }

   where the "x=x" and "y=y" assignments actually have different uids
for the two variables, i.e.  not something you could write directly in
C. Presumably this only makes sense if the "outer" x and y are global
variables.

   COPYPRIVATE would work the same way, except the structure broadcast
would have to happen via SINGLE machinery instead.


File: libgomp.info,  Node: Implementing REDUCTION clause,  Next: Implementing PARALLEL construct,  Prev: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses,  Up: The libgomp ABI

13.9 Implementing REDUCTION clause
==================================

The private struct mentioned in the previous section should have a
pointer to an array of the type of the variable, indexed by the thread's
TEAM_ID.  The thread stores its final value into the array, and after
the barrier, the primary thread iterates over the array to collect the
values.


File: libgomp.info,  Node: Implementing PARALLEL construct,  Next: Implementing FOR construct,  Prev: Implementing REDUCTION clause,  Up: The libgomp ABI

13.10 Implementing PARALLEL construct
=====================================

       #pragma omp parallel
       {
         body;
       }

   becomes

       void subfunction (void *data)
       {
         use data;
         body;
       }

       setup data;
       GOMP_parallel_start (subfunction, &data, num_threads);
       subfunction (&data);
       GOMP_parallel_end ();

       void GOMP_parallel_start (void (*fn)(void *), void *data, unsigned num_threads)

   The FN argument is the subfunction to be run in parallel.

   The DATA argument is a pointer to a structure used to communicate
data in and out of the subfunction, as discussed above with respect to
FIRSTPRIVATE et al.

   The NUM_THREADS argument is 1 if an IF clause is present and false,
or the value of the NUM_THREADS clause, if present, or 0.

   The function needs to create the appropriate number of threads and/or
launch them from the dock.  It needs to create the team structure and
assign team ids.

       void GOMP_parallel_end (void)

   Tears down the team and returns us to the previous
'omp_in_parallel()' state.


File: libgomp.info,  Node: Implementing FOR construct,  Next: Implementing ORDERED construct,  Prev: Implementing PARALLEL construct,  Up: The libgomp ABI

13.11 Implementing FOR construct
================================

       #pragma omp parallel for
       for (i = lb; i <= ub; i++)
         body;

   becomes

       void subfunction (void *data)
       {
         long _s0, _e0;
         while (GOMP_loop_static_next (&_s0, &_e0))
         {
           long _e1 = _e0, i;
           for (i = _s0; i < _e1; i++)
             body;
         }
         GOMP_loop_end_nowait ();
       }

       GOMP_parallel_loop_static (subfunction, NULL, 0, lb, ub+1, 1, 0);
       subfunction (NULL);
       GOMP_parallel_end ();

       #pragma omp for schedule(runtime)
       for (i = 0; i < n; i++)
         body;

   becomes

       {
         long i, _s0, _e0;
         if (GOMP_loop_runtime_start (0, n, 1, &_s0, &_e0))
           do {
             long _e1 = _e0;
             for (i = _s0, i < _e0; i++)
               body;
           } while (GOMP_loop_runtime_next (&_s0, _&e0));
         GOMP_loop_end ();
       }

   Note that while it looks like there is trickiness to propagating a
non-constant STEP, there isn't really.  We're explicitly allowed to
evaluate it as many times as we want, and any variables involved should
automatically be handled as PRIVATE or SHARED like any other variables.
So the expression should remain evaluable in the subfunction.  We can
also pull it into a local variable if we like, but since its supposed to
remain unchanged, we can also not if we like.

   If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be able
to get away with no work-sharing context at all, since we can simply
perform the arithmetic directly in each thread to divide up the
iterations.  Which would mean that we wouldn't need to call any of these
routines.

   There are separate routines for handling loops with an ORDERED
clause.  Bookkeeping for that is non-trivial...


File: libgomp.info,  Node: Implementing ORDERED construct,  Next: Implementing SECTIONS construct,  Prev: Implementing FOR construct,  Up: The libgomp ABI

13.12 Implementing ORDERED construct
====================================

       void GOMP_ordered_start (void)
       void GOMP_ordered_end (void)


File: libgomp.info,  Node: Implementing SECTIONS construct,  Next: Implementing SINGLE construct,  Prev: Implementing ORDERED construct,  Up: The libgomp ABI

13.13 Implementing SECTIONS construct
=====================================

A block as

       #pragma omp sections
       {
         #pragma omp section
         stmt1;
         #pragma omp section
         stmt2;
         #pragma omp section
         stmt3;
       }

   becomes

       for (i = GOMP_sections_start (3); i != 0; i = GOMP_sections_next ())
         switch (i)
           {
           case 1:
             stmt1;
             break;
           case 2:
             stmt2;
             break;
           case 3:
             stmt3;
             break;
           }
       GOMP_barrier ();


File: libgomp.info,  Node: Implementing SINGLE construct,  Next: Implementing OpenACC's PARALLEL construct,  Prev: Implementing SECTIONS construct,  Up: The libgomp ABI

13.14 Implementing SINGLE construct
===================================

A block like

       #pragma omp single
       {
         body;
       }

   becomes

       if (GOMP_single_start ())
         body;
       GOMP_barrier ();

   while

       #pragma omp single copyprivate(x)
         body;

   becomes

       datap = GOMP_single_copy_start ();
       if (datap == NULL)
         {
           body;
           data.x = x;
           GOMP_single_copy_end (&data);
         }
       else
         x = datap->x;
       GOMP_barrier ();


File: libgomp.info,  Node: Implementing OpenACC's PARALLEL construct,  Prev: Implementing SINGLE construct,  Up: The libgomp ABI

13.15 Implementing OpenACC's PARALLEL construct
===============================================

       void GOACC_parallel ()


File: libgomp.info,  Node: Reporting Bugs,  Next: Copying,  Prev: The libgomp ABI,  Up: Top

14 Reporting Bugs
*****************

Bugs in the GNU Offloading and Multi Processing Runtime Library should
be reported via Bugzilla (https://gcc.gnu.org/bugzilla/).  Please add
"openacc", or "openmp", or both to the keywords field in the bug report,
as appropriate.


File: libgomp.info,  Node: Copying,  Next: GNU Free Documentation License,  Prev: Reporting Bugs,  Up: Top

GNU General Public License
**************************

                        Version 3, 29 June 2007

     Copyright (C) 2007 Free Software Foundation, Inc. <https://www.fsf.org>

     Everyone is permitted to copy and distribute verbatim copies of this
     license document, but changing it is not allowed.

Preamble
========

The GNU General Public License is a free, copyleft license for software
and other kinds of works.

   The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program-to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
your programs, too.

   When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

   To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.

   For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

   Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

   For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

   Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

   Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.

   The precise terms and conditions for copying, distribution and
modification follow.

TERMS AND CONDITIONS
====================

  0. Definitions.

     "This License" refers to version 3 of the GNU General Public
     License.

     "Copyright" also means copyright-like laws that apply to other
     kinds of works, such as semiconductor masks.

     "The Program" refers to any copyrightable work licensed under this
     License.  Each licensee is addressed as "you".  "Licensees" and
     "recipients" may be individuals or organizations.

     To "modify" a work means to copy from or adapt all or part of the
     work in a fashion requiring copyright permission, other than the
     making of an exact copy.  The resulting work is called a "modified
     version" of the earlier work or a work "based on" the earlier work.

     A "covered work" means either the unmodified Program or a work
     based on the Program.

     To "propagate" a work means to do anything with it that, without
     permission, would make you directly or secondarily liable for
     infringement under applicable copyright law, except executing it on
     a computer or modifying a private copy.  Propagation includes
     copying, distribution (with or without modification), making
     available to the public, and in some countries other activities as
     well.

     To "convey" a work means any kind of propagation that enables other
     parties to make or receive copies.  Mere interaction with a user
     through a computer network, with no transfer of a copy, is not
     conveying.

     An interactive user interface displays "Appropriate Legal Notices"
     to the extent that it includes a convenient and prominently visible
     feature that (1) displays an appropriate copyright notice, and (2)
     tells the user that there is no warranty for the work (except to
     the extent that warranties are provided), that licensees may convey
     the work under this License, and how to view a copy of this
     License.  If the interface presents a list of user commands or
     options, such as a menu, a prominent item in the list meets this
     criterion.

  1. Source Code.

     The "source code" for a work means the preferred form of the work
     for making modifications to it.  "Object code" means any non-source
     form of a work.

     A "Standard Interface" means an interface that either is an
     official standard defined by a recognized standards body, or, in
     the case of interfaces specified for a particular programming
     language, one that is widely used among developers working in that
     language.

     The "System Libraries" of an executable work include anything,
     other than the work as a whole, that (a) is included in the normal
     form of packaging a Major Component, but which is not part of that
     Major Component, and (b) serves only to enable use of the work with
     that Major Component, or to implement a Standard Interface for
     which an implementation is available to the public in source code
     form.  A "Major Component", in this context, means a major
     essential component (kernel, window system, and so on) of the
     specific operating system (if any) on which the executable work
     runs, or a compiler used to produce the work, or an object code
     interpreter used to run it.

     The "Corresponding Source" for a work in object code form means all
     the source code needed to generate, install, and (for an executable
     work) run the object code and to modify the work, including scripts
     to control those activities.  However, it does not include the
     work's System Libraries, or general-purpose tools or generally
     available free programs which are used unmodified in performing
     those activities but which are not part of the work.  For example,
     Corresponding Source includes interface definition files associated
     with source files for the work, and the source code for shared
     libraries and dynamically linked subprograms that the work is
     specifically designed to require, such as by intimate data
     communication or control flow between those subprograms and other
     parts of the work.

     The Corresponding Source need not include anything that users can
     regenerate automatically from other parts of the Corresponding
     Source.

     The Corresponding Source for a work in source code form is that
     same work.

  2. Basic Permissions.

     All rights granted under this License are granted for the term of
     copyright on the Program, and are irrevocable provided the stated
     conditions are met.  This License explicitly affirms your unlimited
     permission to run the unmodified Program.  The output from running
     a covered work is covered by this License only if the output, given
     its content, constitutes a covered work.  This License acknowledges
     your rights of fair use or other equivalent, as provided by
     copyright law.

     You may make, run and propagate covered works that you do not
     convey, without conditions so long as your license otherwise
     remains in force.  You may convey covered works to others for the
     sole purpose of having them make modifications exclusively for you,
     or provide you with facilities for running those works, provided
     that you comply with the terms of this License in conveying all
     material for which you do not control copyright.  Those thus making
     or running the covered works for you must do so exclusively on your
     behalf, under your direction and control, on terms that prohibit
     them from making any copies of your copyrighted material outside
     their relationship with you.

     Conveying under any other circumstances is permitted solely under
     the conditions stated below.  Sublicensing is not allowed; section
     10 makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

     No covered work shall be deemed part of an effective technological
     measure under any applicable law fulfilling obligations under
     article 11 of the WIPO copyright treaty adopted on 20 December
     1996, or similar laws prohibiting or restricting circumvention of
     such measures.

     When you convey a covered work, you waive any legal power to forbid
     circumvention of technological measures to the extent such
     circumvention is effected by exercising rights under this License
     with respect to the covered work, and you disclaim any intention to
     limit operation or modification of the work as a means of
     enforcing, against the work's users, your or third parties' legal
     rights to forbid circumvention of technological measures.

  4. Conveying Verbatim Copies.

     You may convey verbatim copies of the Program's source code as you
     receive it, in any medium, provided that you conspicuously and
     appropriately publish on each copy an appropriate copyright notice;
     keep intact all notices stating that this License and any
     non-permissive terms added in accord with section 7 apply to the
     code; keep intact all notices of the absence of any warranty; and
     give all recipients a copy of this License along with the Program.

     You may charge any price or no price for each copy that you convey,
     and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

     You may convey a work based on the Program, or the modifications to
     produce it from the Program, in the form of source code under the
     terms of section 4, provided that you also meet all of these
     conditions:

       a. The work must carry prominent notices stating that you
          modified it, and giving a relevant date.

       b. The work must carry prominent notices stating that it is
          released under this License and any conditions added under
          section 7.  This requirement modifies the requirement in
          section 4 to "keep intact all notices".

       c. You must license the entire work, as a whole, under this
          License to anyone who comes into possession of a copy.  This
          License will therefore apply, along with any applicable
          section 7 additional terms, to the whole of the work, and all
          its parts, regardless of how they are packaged.  This License
          gives no permission to license the work in any other way, but
          it does not invalidate such permission if you have separately
          received it.

       d. If the work has interactive user interfaces, each must display
          Appropriate Legal Notices; however, if the Program has
          interactive interfaces that do not display Appropriate Legal
          Notices, your work need not make them do so.

     A compilation of a covered work with other separate and independent
     works, which are not by their nature extensions of the covered
     work, and which are not combined with it such as to form a larger
     program, in or on a volume of a storage or distribution medium, is
     called an "aggregate" if the compilation and its resulting
     copyright are not used to limit the access or legal rights of the
     compilation's users beyond what the individual works permit.
     Inclusion of a covered work in an aggregate does not cause this
     License to apply to the other parts of the aggregate.

  6. Conveying Non-Source Forms.

     You may convey a covered work in object code form under the terms
     of sections 4 and 5, provided that you also convey the
     machine-readable Corresponding Source under the terms of this
     License, in one of these ways:

       a. Convey the object code in, or embodied in, a physical product
          (including a physical distribution medium), accompanied by the
          Corresponding Source fixed on a durable physical medium
          customarily used for software interchange.

       b. Convey the object code in, or embodied in, a physical product
          (including a physical distribution medium), accompanied by a
          written offer, valid for at least three years and valid for as
          long as you offer spare parts or customer support for that
          product model, to give anyone who possesses the object code
          either (1) a copy of the Corresponding Source for all the
          software in the product that is covered by this License, on a
          durable physical medium customarily used for software
          interchange, for a price no more than your reasonable cost of
          physically performing this conveying of source, or (2) access
          to copy the Corresponding Source from a network server at no
          charge.

       c. Convey individual copies of the object code with a copy of the
          written offer to provide the Corresponding Source.  This
          alternative is allowed only occasionally and noncommercially,
          and only if you received the object code with such an offer,
          in accord with subsection 6b.

       d. Convey the object code by offering access from a designated
          place (gratis or for a charge), and offer equivalent access to
          the Corresponding Source in the same way through the same
          place at no further charge.  You need not require recipients
          to copy the Corresponding Source along with the object code.
          If the place to copy the object code is a network server, the
          Corresponding Source may be on a different server (operated by
          you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to the
          object code saying where to find the Corresponding Source.
          Regardless of what server hosts the Corresponding Source, you
          remain obligated to ensure that it is available for as long as
          needed to satisfy these requirements.

       e. Convey the object code using peer-to-peer transmission,
          provided you inform other peers where the object code and
          Corresponding Source of the work are being offered to the
          general public at no charge under subsection 6d.

     A separable portion of the object code, whose source code is
     excluded from the Corresponding Source as a System Library, need
     not be included in conveying the object code work.

     A "User Product" is either (1) a "consumer product", which means
     any tangible personal property which is normally used for personal,
     family, or household purposes, or (2) anything designed or sold for
     incorporation into a dwelling.  In determining whether a product is
     a consumer product, doubtful cases shall be resolved in favor of
     coverage.  For a particular product received by a particular user,
     "normally used" refers to a typical or common use of that class of
     product, regardless of the status of the particular user or of the
     way in which the particular user actually uses, or expects or is
     expected to use, the product.  A product is a consumer product
     regardless of whether the product has substantial commercial,
     industrial or non-consumer uses, unless such uses represent the
     only significant mode of use of the product.

     "Installation Information" for a User Product means any methods,
     procedures, authorization keys, or other information required to
     install and execute modified versions of a covered work in that
     User Product from a modified version of its Corresponding Source.
     The information must suffice to ensure that the continued
     functioning of the modified object code is in no case prevented or
     interfered with solely because modification has been made.

     If you convey an object code work under this section in, or with,
     or specifically for use in, a User Product, and the conveying
     occurs as part of a transaction in which the right of possession
     and use of the User Product is transferred to the recipient in
     perpetuity or for a fixed term (regardless of how the transaction
     is characterized), the Corresponding Source conveyed under this
     section must be accompanied by the Installation Information.  But
     this requirement does not apply if neither you nor any third party
     retains the ability to install modified object code on the User
     Product (for example, the work has been installed in ROM).

     The requirement to provide Installation Information does not
     include a requirement to continue to provide support service,
     warranty, or updates for a work that has been modified or installed
     by the recipient, or for the User Product in which it has been
     modified or installed.  Access to a network may be denied when the
     modification itself materially and adversely affects the operation
     of the network or violates the rules and protocols for
     communication across the network.

     Corresponding Source conveyed, and Installation Information
     provided, in accord with this section must be in a format that is
     publicly documented (and with an implementation available to the
     public in source code form), and must require no special password
     or key for unpacking, reading or copying.

  7. Additional Terms.

     "Additional permissions" are terms that supplement the terms of
     this License by making exceptions from one or more of its
     conditions.  Additional permissions that are applicable to the
     entire Program shall be treated as though they were included in
     this License, to the extent that they are valid under applicable
     law.  If additional permissions apply only to part of the Program,
     that part may be used separately under those permissions, but the
     entire Program remains governed by this License without regard to
     the additional permissions.

     When you convey a copy of a covered work, you may at your option
     remove any additional permissions from that copy, or from any part
     of it.  (Additional permissions may be written to require their own
     removal in certain cases when you modify the work.)  You may place
     additional permissions on material, added by you to a covered work,
     for which you have or can give appropriate copyright permission.

     Notwithstanding any other provision of this License, for material
     you add to a covered work, you may (if authorized by the copyright
     holders of that material) supplement the terms of this License with
     terms:

       a. Disclaiming warranty or limiting liability differently from
          the terms of sections 15 and 16 of this License; or

       b. Requiring preservation of specified reasonable legal notices
          or author attributions in that material or in the Appropriate
          Legal Notices displayed by works containing it; or

       c. Prohibiting misrepresentation of the origin of that material,
          or requiring that modified versions of such material be marked
          in reasonable ways as different from the original version; or

       d. Limiting the use for publicity purposes of names of licensors
          or authors of the material; or

       e. Declining to grant rights under trademark law for use of some
          trade names, trademarks, or service marks; or

       f. Requiring indemnification of licensors and authors of that
          material by anyone who conveys the material (or modified
          versions of it) with contractual assumptions of liability to
          the recipient, for any liability that these contractual
          assumptions directly impose on those licensors and authors.

     All other non-permissive additional terms are considered "further
     restrictions" within the meaning of section 10.  If the Program as
     you received it, or any part of it, contains a notice stating that
     it is governed by this License along with a term that is a further
     restriction, you may remove that term.  If a license document
     contains a further restriction but permits relicensing or conveying
     under this License, you may add to a covered work material governed
     by the terms of that license document, provided that the further
     restriction does not survive such relicensing or conveying.

     If you add terms to a covered work in accord with this section, you
     must place, in the relevant source files, a statement of the
     additional terms that apply to those files, or a notice indicating
     where to find the applicable terms.

     Additional terms, permissive or non-permissive, may be stated in
     the form of a separately written license, or stated as exceptions;
     the above requirements apply either way.

  8. Termination.

     You may not propagate or modify a covered work except as expressly
     provided under this License.  Any attempt otherwise to propagate or
     modify it is void, and will automatically terminate your rights
     under this License (including any patent licenses granted under the
     third paragraph of section 11).

     However, if you cease all violation of this License, then your
     license from a particular copyright holder is reinstated (a)
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
     copyright holder fails to notify you of the violation by some
     reasonable means prior to 60 days after the cessation.

     Moreover, your license from a particular copyright holder is
     reinstated permanently if the copyright holder notifies you of the
     violation by some reasonable means, this is the first time you have
     received notice of violation of this License (for any work) from
     that copyright holder, and you cure the violation prior to 30 days
     after your receipt of the notice.

     Termination of your rights under this section does not terminate
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, you do not qualify to receive new licenses
     for the same material under section 10.

  9. Acceptance Not Required for Having Copies.

     You are not required to accept this License in order to receive or
     run a copy of the Program.  Ancillary propagation of a covered work
     occurring solely as a consequence of using peer-to-peer
     transmission to receive a copy likewise does not require
     acceptance.  However, nothing other than this License grants you
     permission to propagate or modify any covered work.  These actions
     infringe copyright if you do not accept this License.  Therefore,
     by modifying or propagating a covered work, you indicate your
     acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

     Each time you convey a covered work, the recipient automatically
     receives a license from the original licensors, to run, modify and
     propagate that work, subject to this License.  You are not
     responsible for enforcing compliance by third parties with this
     License.

     An "entity transaction" is a transaction transferring control of an
     organization, or substantially all assets of one, or subdividing an
     organization, or merging organizations.  If propagation of a
     covered work results from an entity transaction, each party to that
     transaction who receives a copy of the work also receives whatever
     licenses to the work the party's predecessor in interest had or
     could give under the previous paragraph, plus a right to possession
     of the Corresponding Source of the work from the predecessor in
     interest, if the predecessor has it or can get it with reasonable
     efforts.

     You may not impose any further restrictions on the exercise of the
     rights granted or affirmed under this License.  For example, you
     may not impose a license fee, royalty, or other charge for exercise
     of rights granted under this License, and you may not initiate
     litigation (including a cross-claim or counterclaim in a lawsuit)
     alleging that any patent claim is infringed by making, using,
     selling, offering for sale, or importing the Program or any portion
     of it.

  11. Patents.

     A "contributor" is a copyright holder who authorizes use under this
     License of the Program or a work on which the Program is based.
     The work thus licensed is called the contributor's "contributor
     version".

     A contributor's "essential patent claims" are all patent claims
     owned or controlled by the contributor, whether already acquired or
     hereafter acquired, that would be infringed by some manner,
     permitted by this License, of making, using, or selling its
     contributor version, but do not include claims that would be
     infringed only as a consequence of further modification of the
     contributor version.  For purposes of this definition, "control"
     includes the right to grant patent sublicenses in a manner
     consistent with the requirements of this License.

     Each contributor grants you a non-exclusive, worldwide,
     royalty-free patent license under the contributor's essential
     patent claims, to make, use, sell, offer for sale, import and
     otherwise run, modify and propagate the contents of its contributor
     version.

     In the following three paragraphs, a "patent license" is any
     express agreement or commitment, however denominated, not to
     enforce a patent (such as an express permission to practice a
     patent or covenant not to sue for patent infringement).  To "grant"
     such a patent license to a party means to make such an agreement or
     commitment not to enforce a patent against the party.

     If you convey a covered work, knowingly relying on a patent
     license, and the Corresponding Source of the work is not available
     for anyone to copy, free of charge and under the terms of this
     License, through a publicly available network server or other
     readily accessible means, then you must either (1) cause the
     Corresponding Source to be so available, or (2) arrange to deprive
     yourself of the benefit of the patent license for this particular
     work, or (3) arrange, in a manner consistent with the requirements
     of this License, to extend the patent license to downstream
     recipients.  "Knowingly relying" means you have actual knowledge
     that, but for the patent license, your conveying the covered work
     in a country, or your recipient's use of the covered work in a
     country, would infringe one or more identifiable patents in that
     country that you have reason to believe are valid.

     If, pursuant to or in connection with a single transaction or
     arrangement, you convey, or propagate by procuring conveyance of, a
     covered work, and grant a patent license to some of the parties
     receiving the covered work authorizing them to use, propagate,
     modify or convey a specific copy of the covered work, then the
     patent license you grant is automatically extended to all
     recipients of the covered work and works based on it.

     A patent license is "discriminatory" if it does not include within
     the scope of its coverage, prohibits the exercise of, or is
     conditioned on the non-exercise of one or more of the rights that
     are specifically granted under this License.  You may not convey a
     covered work if you are a party to an arrangement with a third
     party that is in the business of distributing software, under which
     you make payment to the third party based on the extent of your
     activity of conveying the work, and under which the third party
     grants, to any of the parties who would receive the covered work
     from you, a discriminatory patent license (a) in connection with
     copies of the covered work conveyed by you (or copies made from
     those copies), or (b) primarily for and in connection with specific
     products or compilations that contain the covered work, unless you
     entered into that arrangement, or that patent license was granted,
     prior to 28 March 2007.

     Nothing in this License shall be construed as excluding or limiting
     any implied license or other defenses to infringement that may
     otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

     If conditions are imposed on you (whether by court order, agreement
     or otherwise) that contradict the conditions of this License, they
     do not excuse you from the conditions of this License.  If you
     cannot convey a covered work so as to satisfy simultaneously your
     obligations under this License and any other pertinent obligations,
     then as a consequence you may not convey it at all.  For example,
     if you agree to terms that obligate you to collect a royalty for
     further conveying from those to whom you convey the Program, the
     only way you could satisfy both those terms and this License would
     be to refrain entirely from conveying the Program.

  13. Use with the GNU Affero General Public License.

     Notwithstanding any other provision of this License, you have
     permission to link or combine any covered work with a work licensed
     under version 3 of the GNU Affero General Public License into a
     single combined work, and to convey the resulting work.  The terms
     of this License will continue to apply to the part which is the
     covered work, but the special requirements of the GNU Affero
     General Public License, section 13, concerning interaction through
     a network will apply to the combination as such.

  14. Revised Versions of this License.

     The Free Software Foundation may publish revised and/or new
     versions of the GNU General Public License from time to time.  Such
     new versions will be similar in spirit to the present version, but
     may differ in detail to address new problems or concerns.

     Each version is given a distinguishing version number.  If the
     Program specifies that a certain numbered version of the GNU
     General Public License "or any later version" applies to it, you
     have the option of following the terms and conditions either of
     that numbered version or of any later version published by the Free
     Software Foundation.  If the Program does not specify a version
     number of the GNU General Public License, you may choose any
     version ever published by the Free Software Foundation.

     If the Program specifies that a proxy can decide which future
     versions of the GNU General Public License can be used, that
     proxy's public statement of acceptance of a version permanently
     authorizes you to choose that version for the Program.

     Later license versions may give you additional or different
     permissions.  However, no additional obligations are imposed on any
     author or copyright holder as a result of your choosing to follow a
     later version.

  15. Disclaimer of Warranty.

     THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
     APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
     COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS"
     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
     INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
     RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.
     SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
     NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

     IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
     WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
     DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
     CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
     THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
     BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
     PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
     PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF
     THE POSSIBILITY OF SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

     If the disclaimer of warranty and limitation of liability provided
     above cannot be given local legal effect according to their terms,
     reviewing courts shall apply local law that most closely
     approximates an absolute waiver of all civil liability in
     connection with the Program, unless a warranty or assumption of
     liability accompanies a copy of the Program in return for a fee.

END OF TERMS AND CONDITIONS
===========================

How to Apply These Terms to Your New Programs
=============================================

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.

   To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.

     ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
     Copyright (C) YEAR NAME OF AUTHOR

     This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation, either version 3 of the License, or (at
     your option) any later version.

     This program is distributed in the hope that it will be useful, but
     WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with this program.  If not, see <https://www.gnu.org/licenses/>.

   Also add information on how to contact you by electronic and paper
mail.

   If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

     PROGRAM Copyright (C) YEAR NAME OF AUTHOR
     This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
     This is free software, and you are welcome to redistribute it
     under certain conditions; type 'show c' for details.

   The hypothetical commands 'show w' and 'show c' should show the
appropriate parts of the General Public License.  Of course, your
program's commands might be different; for a GUI interface, you would
use an "about box".

   You should also get your employer (if you work as a programmer) or
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  For more information on this, and how to apply and follow
the GNU GPL, see <https://www.gnu.org/licenses/>.

   The GNU General Public License does not permit incorporating your
program into proprietary programs.  If your program is a subroutine
library, you may consider it more useful to permit linking proprietary
applications with the library.  If this is what you want to do, use the
GNU Lesser General Public License instead of this License.  But first,
please read <https://www.gnu.org/licenses/why-not-lgpl.html>.


File: libgomp.info,  Node: GNU Free Documentation License,  Next: Funding,  Prev: Copying,  Up: Top

GNU Free Documentation License
******************************

                     Version 1.3, 3 November 2008

     Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
     <https://www.fsf.org>

     Everyone is permitted to copy and distribute verbatim copies
     of this license document, but changing it is not allowed.

  0. PREAMBLE

     The purpose of this License is to make a manual, textbook, or other
     functional and useful document "free" in the sense of freedom: to
     assure everyone the effective freedom to copy and redistribute it,
     with or without modifying it, either commercially or
     noncommercially.  Secondarily, this License preserves for the
     author and publisher a way to get credit for their work, while not
     being considered responsible for modifications made by others.

     This License is a kind of "copyleft", which means that derivative
     works of the document must themselves be free in the same sense.
     It complements the GNU General Public License, which is a copyleft
     license designed for free software.

     We have designed this License in order to use it for manuals for
     free software, because free software needs free documentation: a
     free program should come with manuals providing the same freedoms
     that the software does.  But this License is not limited to
     software manuals; it can be used for any textual work, regardless
     of subject matter or whether it is published as a printed book.  We
     recommend this License principally for works whose purpose is
     instruction or reference.

  1. APPLICABILITY AND DEFINITIONS

     This License applies to any manual or other work, in any medium,
     that contains a notice placed by the copyright holder saying it can
     be distributed under the terms of this License.  Such a notice
     grants a world-wide, royalty-free license, unlimited in duration,
     to use that work under the conditions stated herein.  The
     "Document", below, refers to any such manual or work.  Any member
     of the public is a licensee, and is addressed as "you".  You accept
     the license if you copy, modify or distribute the work in a way
     requiring permission under copyright law.

     A "Modified Version" of the Document means any work containing the
     Document or a portion of it, either copied verbatim, or with
     modifications and/or translated into another language.

     A "Secondary Section" is a named appendix or a front-matter section
     of the Document that deals exclusively with the relationship of the
     publishers or authors of the Document to the Document's overall
     subject (or to related matters) and contains nothing that could
     fall directly within that overall subject.  (Thus, if the Document
     is in part a textbook of mathematics, a Secondary Section may not
     explain any mathematics.)  The relationship could be a matter of
     historical connection with the subject or with related matters, or
     of legal, commercial, philosophical, ethical or political position
     regarding them.

     The "Invariant Sections" are certain Secondary Sections whose
     titles are designated, as being those of Invariant Sections, in the
     notice that says that the Document is released under this License.
     If a section does not fit the above definition of Secondary then it
     is not allowed to be designated as Invariant.  The Document may
     contain zero Invariant Sections.  If the Document does not identify
     any Invariant Sections then there are none.

     The "Cover Texts" are certain short passages of text that are
     listed, as Front-Cover Texts or Back-Cover Texts, in the notice
     that says that the Document is released under this License.  A
     Front-Cover Text may be at most 5 words, and a Back-Cover Text may
     be at most 25 words.

     A "Transparent" copy of the Document means a machine-readable copy,
     represented in a format whose specification is available to the
     general public, that is suitable for revising the document
     straightforwardly with generic text editors or (for images composed
     of pixels) generic paint programs or (for drawings) some widely
     available drawing editor, and that is suitable for input to text
     formatters or for automatic translation to a variety of formats
     suitable for input to text formatters.  A copy made in an otherwise
     Transparent file format whose markup, or absence of markup, has
     been arranged to thwart or discourage subsequent modification by
     readers is not Transparent.  An image format is not Transparent if
     used for any substantial amount of text.  A copy that is not
     "Transparent" is called "Opaque".

     Examples of suitable formats for Transparent copies include plain
     ASCII without markup, Texinfo input format, LaTeX input format,
     SGML or XML using a publicly available DTD, and standard-conforming
     simple HTML, PostScript or PDF designed for human modification.
     Examples of transparent image formats include PNG, XCF and JPG.
     Opaque formats include proprietary formats that can be read and
     edited only by proprietary word processors, SGML or XML for which
     the DTD and/or processing tools are not generally available, and
     the machine-generated HTML, PostScript or PDF produced by some word
     processors for output purposes only.

     The "Title Page" means, for a printed book, the title page itself,
     plus such following pages as are needed to hold, legibly, the
     material this License requires to appear in the title page.  For
     works in formats which do not have any title page as such, "Title
     Page" means the text near the most prominent appearance of the
     work's title, preceding the beginning of the body of the text.

     The "publisher" means any person or entity that distributes copies
     of the Document to the public.

     A section "Entitled XYZ" means a named subunit of the Document
     whose title either is precisely XYZ or contains XYZ in parentheses
     following text that translates XYZ in another language.  (Here XYZ
     stands for a specific section name mentioned below, such as
     "Acknowledgements", "Dedications", "Endorsements", or "History".)
     To "Preserve the Title" of such a section when you modify the
     Document means that it remains a section "Entitled XYZ" according
     to this definition.

     The Document may include Warranty Disclaimers next to the notice
     which states that this License applies to the Document.  These
     Warranty Disclaimers are considered to be included by reference in
     this License, but only as regards disclaiming warranties: any other
     implication that these Warranty Disclaimers may have is void and
     has no effect on the meaning of this License.

  2. VERBATIM COPYING

     You may copy and distribute the Document in any medium, either
     commercially or noncommercially, provided that this License, the
     copyright notices, and the license notice saying this License
     applies to the Document are reproduced in all copies, and that you
     add no other conditions whatsoever to those of this License.  You
     may not use technical measures to obstruct or control the reading
     or further copying of the copies you make or distribute.  However,
     you may accept compensation in exchange for copies.  If you
     distribute a large enough number of copies you must also follow the
     conditions in section 3.

     You may also lend copies, under the same conditions stated above,
     and you may publicly display copies.

  3. COPYING IN QUANTITY

     If you publish printed copies (or copies in media that commonly
     have printed covers) of the Document, numbering more than 100, and
     the Document's license notice requires Cover Texts, you must
     enclose the copies in covers that carry, clearly and legibly, all
     these Cover Texts: Front-Cover Texts on the front cover, and
     Back-Cover Texts on the back cover.  Both covers must also clearly
     and legibly identify you as the publisher of these copies.  The
     front cover must present the full title with all words of the title
     equally prominent and visible.  You may add other material on the
     covers in addition.  Copying with changes limited to the covers, as
     long as they preserve the title of the Document and satisfy these
     conditions, can be treated as verbatim copying in other respects.

     If the required texts for either cover are too voluminous to fit
     legibly, you should put the first ones listed (as many as fit
     reasonably) on the actual cover, and continue the rest onto
     adjacent pages.

     If you publish or distribute Opaque copies of the Document
     numbering more than 100, you must either include a machine-readable
     Transparent copy along with each Opaque copy, or state in or with
     each Opaque copy a computer-network location from which the general
     network-using public has access to download using public-standard
     network protocols a complete Transparent copy of the Document, free
     of added material.  If you use the latter option, you must take
     reasonably prudent steps, when you begin distribution of Opaque
     copies in quantity, to ensure that this Transparent copy will
     remain thus accessible at the stated location until at least one
     year after the last time you distribute an Opaque copy (directly or
     through your agents or retailers) of that edition to the public.

     It is requested, but not required, that you contact the authors of
     the Document well before redistributing any large number of copies,
     to give them a chance to provide you with an updated version of the
     Document.

  4. MODIFICATIONS

     You may copy and distribute a Modified Version of the Document
     under the conditions of sections 2 and 3 above, provided that you
     release the Modified Version under precisely this License, with the
     Modified Version filling the role of the Document, thus licensing
     distribution and modification of the Modified Version to whoever
     possesses a copy of it.  In addition, you must do these things in
     the Modified Version:

       A. Use in the Title Page (and on the covers, if any) a title
          distinct from that of the Document, and from those of previous
          versions (which should, if there were any, be listed in the
          History section of the Document).  You may use the same title
          as a previous version if the original publisher of that
          version gives permission.

       B. List on the Title Page, as authors, one or more persons or
          entities responsible for authorship of the modifications in
          the Modified Version, together with at least five of the
          principal authors of the Document (all of its principal
          authors, if it has fewer than five), unless they release you
          from this requirement.

       C. State on the Title page the name of the publisher of the
          Modified Version, as the publisher.

       D. Preserve all the copyright notices of the Document.

       E. Add an appropriate copyright notice for your modifications
          adjacent to the other copyright notices.

       F. Include, immediately after the copyright notices, a license
          notice giving the public permission to use the Modified
          Version under the terms of this License, in the form shown in
          the Addendum below.

       G. Preserve in that license notice the full lists of Invariant
          Sections and required Cover Texts given in the Document's
          license notice.

       H. Include an unaltered copy of this License.

       I. Preserve the section Entitled "History", Preserve its Title,
          and add to it an item stating at least the title, year, new
          authors, and publisher of the Modified Version as given on the
          Title Page.  If there is no section Entitled "History" in the
          Document, create one stating the title, year, authors, and
          publisher of the Document as given on its Title Page, then add
          an item describing the Modified Version as stated in the
          previous sentence.

       J. Preserve the network location, if any, given in the Document
          for public access to a Transparent copy of the Document, and
          likewise the network locations given in the Document for
          previous versions it was based on.  These may be placed in the
          "History" section.  You may omit a network location for a work
          that was published at least four years before the Document
          itself, or if the original publisher of the version it refers
          to gives permission.

       K. For any section Entitled "Acknowledgements" or "Dedications",
          Preserve the Title of the section, and preserve in the section
          all the substance and tone of each of the contributor
          acknowledgements and/or dedications given therein.

       L. Preserve all the Invariant Sections of the Document, unaltered
          in their text and in their titles.  Section numbers or the
          equivalent are not considered part of the section titles.

       M. Delete any section Entitled "Endorsements".  Such a section
          may not be included in the Modified Version.

       N. Do not retitle any existing section to be Entitled
          "Endorsements" or to conflict in title with any Invariant
          Section.

       O. Preserve any Warranty Disclaimers.

     If the Modified Version includes new front-matter sections or
     appendices that qualify as Secondary Sections and contain no
     material copied from the Document, you may at your option designate
     some or all of these sections as invariant.  To do this, add their
     titles to the list of Invariant Sections in the Modified Version's
     license notice.  These titles must be distinct from any other
     section titles.

     You may add a section Entitled "Endorsements", provided it contains
     nothing but endorsements of your Modified Version by various
     parties--for example, statements of peer review or that the text
     has been approved by an organization as the authoritative
     definition of a standard.

     You may add a passage of up to five words as a Front-Cover Text,
     and a passage of up to 25 words as a Back-Cover Text, to the end of
     the list of Cover Texts in the Modified Version.  Only one passage
     of Front-Cover Text and one of Back-Cover Text may be added by (or
     through arrangements made by) any one entity.  If the Document
     already includes a cover text for the same cover, previously added
     by you or by arrangement made by the same entity you are acting on
     behalf of, you may not add another; but you may replace the old
     one, on explicit permission from the previous publisher that added
     the old one.

     The author(s) and publisher(s) of the Document do not by this
     License give permission to use their names for publicity for or to
     assert or imply endorsement of any Modified Version.

  5. COMBINING DOCUMENTS

     You may combine the Document with other documents released under
     this License, under the terms defined in section 4 above for
     modified versions, provided that you include in the combination all
     of the Invariant Sections of all of the original documents,
     unmodified, and list them all as Invariant Sections of your
     combined work in its license notice, and that you preserve all
     their Warranty Disclaimers.

     The combined work need only contain one copy of this License, and
     multiple identical Invariant Sections may be replaced with a single
     copy.  If there are multiple Invariant Sections with the same name
     but different contents, make the title of each such section unique
     by adding at the end of it, in parentheses, the name of the
     original author or publisher of that section if known, or else a
     unique number.  Make the same adjustment to the section titles in
     the list of Invariant Sections in the license notice of the
     combined work.

     In the combination, you must combine any sections Entitled
     "History" in the various original documents, forming one section
     Entitled "History"; likewise combine any sections Entitled
     "Acknowledgements", and any sections Entitled "Dedications".  You
     must delete all sections Entitled "Endorsements."

  6. COLLECTIONS OF DOCUMENTS

     You may make a collection consisting of the Document and other
     documents released under this License, and replace the individual
     copies of this License in the various documents with a single copy
     that is included in the collection, provided that you follow the
     rules of this License for verbatim copying of each of the documents
     in all other respects.

     You may extract a single document from such a collection, and
     distribute it individually under this License, provided you insert
     a copy of this License into the extracted document, and follow this
     License in all other respects regarding verbatim copying of that
     document.

  7. AGGREGATION WITH INDEPENDENT WORKS

     A compilation of the Document or its derivatives with other
     separate and independent documents or works, in or on a volume of a
     storage or distribution medium, is called an "aggregate" if the
     copyright resulting from the compilation is not used to limit the
     legal rights of the compilation's users beyond what the individual
     works permit.  When the Document is included in an aggregate, this
     License does not apply to the other works in the aggregate which
     are not themselves derivative works of the Document.

     If the Cover Text requirement of section 3 is applicable to these
     copies of the Document, then if the Document is less than one half
     of the entire aggregate, the Document's Cover Texts may be placed
     on covers that bracket the Document within the aggregate, or the
     electronic equivalent of covers if the Document is in electronic
     form.  Otherwise they must appear on printed covers that bracket
     the whole aggregate.

  8. TRANSLATION

     Translation is considered a kind of modification, so you may
     distribute translations of the Document under the terms of section
     4.  Replacing Invariant Sections with translations requires special
     permission from their copyright holders, but you may include
     translations of some or all Invariant Sections in addition to the
     original versions of these Invariant Sections.  You may include a
     translation of this License, and all the license notices in the
     Document, and any Warranty Disclaimers, provided that you also
     include the original English version of this License and the
     original versions of those notices and disclaimers.  In case of a
     disagreement between the translation and the original version of
     this License or a notice or disclaimer, the original version will
     prevail.

     If a section in the Document is Entitled "Acknowledgements",
     "Dedications", or "History", the requirement (section 4) to
     Preserve its Title (section 1) will typically require changing the
     actual title.

  9. TERMINATION

     You may not copy, modify, sublicense, or distribute the Document
     except as expressly provided under this License.  Any attempt
     otherwise to copy, modify, sublicense, or distribute it is void,
     and will automatically terminate your rights under this License.

     However, if you cease all violation of this License, then your
     license from a particular copyright holder is reinstated (a)
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
     copyright holder fails to notify you of the violation by some
     reasonable means prior to 60 days after the cessation.

     Moreover, your license from a particular copyright holder is
     reinstated permanently if the copyright holder notifies you of the
     violation by some reasonable means, this is the first time you have
     received notice of violation of this License (for any work) from
     that copyright holder, and you cure the violation prior to 30 days
     after your receipt of the notice.

     Termination of your rights under this section does not terminate
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, receipt of a copy of some or all of the
     same material does not give you any rights to use it.

  10. FUTURE REVISIONS OF THIS LICENSE

     The Free Software Foundation may publish new, revised versions of
     the GNU Free Documentation License from time to time.  Such new
     versions will be similar in spirit to the present version, but may
     differ in detail to address new problems or concerns.  See
     <https://www.gnu.org/copyleft/>.

     Each version of the License is given a distinguishing version
     number.  If the Document specifies that a particular numbered
     version of this License "or any later version" applies to it, you
     have the option of following the terms and conditions either of
     that specified version or of any later version that has been
     published (not as a draft) by the Free Software Foundation.  If the
     Document does not specify a version number of this License, you may
     choose any version ever published (not as a draft) by the Free
     Software Foundation.  If the Document specifies that a proxy can
     decide which future versions of this License can be used, that
     proxy's public statement of acceptance of a version permanently
     authorizes you to choose that version for the Document.

  11. RELICENSING

     "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
     World Wide Web server that publishes copyrightable works and also
     provides prominent facilities for anybody to edit those works.  A
     public wiki that anybody can edit is an example of such a server.
     A "Massive Multiauthor Collaboration" (or "MMC") contained in the
     site means any set of copyrightable works thus published on the MMC
     site.

     "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
     license published by Creative Commons Corporation, a not-for-profit
     corporation with a principal place of business in San Francisco,
     California, as well as future copyleft versions of that license
     published by that same organization.

     "Incorporate" means to publish or republish a Document, in whole or
     in part, as part of another Document.

     An MMC is "eligible for relicensing" if it is licensed under this
     License, and if all works that were first published under this
     License somewhere other than this MMC, and subsequently
     incorporated in whole or in part into the MMC, (1) had no cover
     texts or invariant sections, and (2) were thus incorporated prior
     to November 1, 2008.

     The operator of an MMC Site may republish an MMC contained in the
     site under CC-BY-SA on the same site at any time before August 1,
     2009, provided the MMC is eligible for relicensing.

ADDENDUM: How to use this License for your documents
====================================================

To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and license
notices just after the title page:

       Copyright (C)  YEAR  YOUR NAME.
       Permission is granted to copy, distribute and/or modify this document
       under the terms of the GNU Free Documentation License, Version 1.3
       or any later version published by the Free Software Foundation;
       with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
       Texts.  A copy of the license is included in the section entitled ``GNU
       Free Documentation License''.

   If you have Invariant Sections, Front-Cover Texts and Back-Cover
Texts, replace the "with...Texts."  line with this:

         with the Invariant Sections being LIST THEIR TITLES, with
         the Front-Cover Texts being LIST, and with the Back-Cover Texts
         being LIST.

   If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit the
situation.

   If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of free
software license, such as the GNU General Public License, to permit
their use in free software.


File: libgomp.info,  Node: Funding,  Next: Library Index,  Prev: GNU Free Documentation License,  Up: Top

Funding Free Software
*********************

If you want to have more free software a few years from now, it makes
sense for you to help encourage people to contribute funds for its
development.  The most effective approach known is to encourage
commercial redistributors to donate.

   Users of free software systems can boost the pace of development by
encouraging for-a-fee distributors to donate part of their selling price
to free software developers--the Free Software Foundation, and others.

   The way to convince distributors to do this is to demand it and
expect it from them.  So when you compare distributors, judge them
partly by how much they give to free software development.  Show
distributors they must compete to be the one who gives the most.

   To make this approach work, you must insist on numbers that you can
compare, such as, "We will donate ten dollars to the Frobnitz project
for each disk sold."  Don't be satisfied with a vague promise, such as
"A portion of the profits are donated," since it doesn't give a basis
for comparison.

   Even a precise fraction "of the profits from this disk" is not very
meaningful, since creative accounting and unrelated business decisions
can greatly alter what fraction of the sales price counts as profit.  If
the price you pay is $50, ten percent of the profit is probably less
than a dollar; it might be a few cents, or nothing at all.

   Some redistributors do development work themselves.  This is useful
too; but to keep everyone honest, you need to inquire how much they do,
and what kind.  Some kinds of development make much more long-term
difference than others.  For example, maintaining a separate version of
a program contributes very little; maintaining the standard version of a
program for the whole community contributes much.  Easy new ports
contribute little, since someone else would surely do them; difficult
ports such as adding a new CPU to the GNU Compiler Collection contribute
more; major new features or packages contribute the most.

   By establishing the idea that supporting further development is "the
proper thing to do" when distributing free software for a fee, we can
assure a steady flow of resources into making more free software.

     Copyright (C) 1994 Free Software Foundation, Inc.
     Verbatim copying and redistribution of this section is permitted
     without royalty; alteration is not permitted.


File: libgomp.info,  Node: Library Index,  Prev: Funding,  Up: Top

Library Index
*************

 [index ]
* Menu:

* acc_get_property:                      acc_get_property.      (line 6)
* acc_get_property_string:               acc_get_property.      (line 6)
* Environment Variable:                  OMP_ALLOCATOR.         (line 6)
* Environment Variable <1>:              OMP_AFFINITY_FORMAT.   (line 6)
* Environment Variable <2>:              OMP_CANCELLATION.      (line 6)
* Environment Variable <3>:              OMP_DISPLAY_AFFINITY.  (line 6)
* Environment Variable <4>:              OMP_DISPLAY_ENV.       (line 6)
* Environment Variable <5>:              OMP_DEFAULT_DEVICE.    (line 6)
* Environment Variable <6>:              OMP_DYNAMIC.           (line 6)
* Environment Variable <7>:              OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable <8>:              OMP_MAX_TASK_PRIORITY. (line 6)
* Environment Variable <9>:              OMP_NESTED.            (line 6)
* Environment Variable <10>:             OMP_NUM_TEAMS.         (line 6)
* Environment Variable <11>:             OMP_NUM_THREADS.       (line 6)
* Environment Variable <12>:             OMP_PROC_BIND.         (line 6)
* Environment Variable <13>:             OMP_PLACES.            (line 6)
* Environment Variable <14>:             OMP_STACKSIZE.         (line 6)
* Environment Variable <15>:             OMP_SCHEDULE.          (line 6)
* Environment Variable <16>:             OMP_TARGET_OFFLOAD.    (line 6)
* Environment Variable <17>:             OMP_TEAMS_THREAD_LIMIT.
                                                                (line 6)
* Environment Variable <18>:             OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <19>:             OMP_WAIT_POLICY.       (line 6)
* Environment Variable <20>:             GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <21>:             GOMP_DEBUG.            (line 6)
* Environment Variable <22>:             GOMP_STACKSIZE.        (line 6)
* Environment Variable <23>:             GOMP_SPINCOUNT.        (line 6)
* Environment Variable <24>:             GOMP_RTEMS_THREAD_POOLS.
                                                                (line 6)
* FDL, GNU Free Documentation License:   GNU Free Documentation License.
                                                                (line 6)
* Implementation specific setting:       OMP_NESTED.            (line 6)
* Implementation specific setting <1>:   OMP_NUM_THREADS.       (line 6)
* Implementation specific setting <2>:   OMP_SCHEDULE.          (line 6)
* Implementation specific setting <3>:   OMP_TARGET_OFFLOAD.    (line 6)
* Implementation specific setting <4>:   GOMP_STACKSIZE.        (line 6)
* Implementation specific setting <5>:   GOMP_SPINCOUNT.        (line 6)
* Implementation specific setting <6>:   GOMP_RTEMS_THREAD_POOLS.
                                                                (line 6)
* Implementation specific setting <7>:   Implementation-defined ICV Initialization.
                                                                (line 6)
* Introduction:                          Top.                   (line 6)



Tag Table:
Node: Top2083
Node: Enabling OpenMP4900
Node: OpenMP Implementation Status6081
Node: OpenMP 4.56777
Node: OpenMP 5.06953
Node: OpenMP 5.112374
Node: OpenMP 5.216686
Ref: OpenMP 5.2-Footnote-119831
Node: OpenMP Technical Report 1220232
Node: Runtime Library Routines24759
Node: Thread Team Routines25392
Node: omp_set_num_threads26979
Node: omp_get_num_threads27825
Node: omp_get_max_threads28916
Node: omp_get_thread_num29671
Node: omp_in_parallel30540
Node: omp_set_dynamic31190
Node: omp_get_dynamic32057
Node: omp_get_cancellation32932
Node: omp_set_nested33726
Node: omp_get_nested35045
Node: omp_set_schedule36787
Node: omp_get_schedule37866
Node: omp_get_teams_thread_limit38814
Node: omp_get_supported_active_levels39582
Node: omp_set_max_active_levels40387
Node: omp_get_max_active_levels41336
Node: omp_get_level42059
Node: omp_get_ancestor_thread_num42693
Node: omp_get_team_size43615
Node: omp_get_active_level44586
Node: Thread Affinity Routines45278
Node: omp_get_proc_bind45678
Node: Teams Region Routines46650
Node: omp_get_num_teams47358
Node: omp_get_team_num47844
Node: omp_set_num_teams48343
Node: omp_get_max_teams49215
Node: omp_set_teams_thread_limit49907
Node: omp_get_thread_limit50912
Node: Tasking Routines51512
Node: omp_get_max_task_priority52023
Node: omp_in_explicit_task52606
Node: omp_in_final53496
Node: Resource Relinquishing Routines54139
Node: omp_pause_resource54611
Node: omp_pause_resource_all55704
Node: Device Information Routines56691
Node: omp_get_num_procs57509
Node: omp_set_default_device58030
Node: omp_get_default_device58829
Node: omp_get_num_devices59518
Node: omp_get_device_num60053
Node: omp_is_initial_device60868
Node: omp_get_initial_device61572
Node: Device Memory Routines62307
Node: omp_target_alloc63347
Node: omp_target_free64922
Node: omp_target_is_present66110
Node: omp_target_is_accessible67782
Node: omp_target_memcpy69596
Node: omp_target_memcpy_async71410
Node: omp_target_memcpy_rect73789
Node: omp_target_memcpy_rect_async76993
Node: omp_target_associate_ptr80765
Node: omp_target_disassociate_ptr83730
Node: omp_get_mapped_ptr85483
Node: Lock Routines87026
Node: omp_init_lock87874
Node: omp_init_nest_lock88499
Node: omp_destroy_lock89221
Node: omp_destroy_nest_lock89896
Node: omp_set_lock90634
Node: omp_set_nest_lock91492
Node: omp_unset_lock92388
Node: omp_unset_nest_lock93317
Node: omp_test_lock94311
Node: omp_test_nest_lock95289
Node: Timing Routines96277
Node: omp_get_wtick96654
Node: omp_get_wtime97209
Node: Event Routine97978
Node: omp_fulfill_event98311
Node: Memory Management Routines99303
Node: omp_init_allocator100219
Node: omp_destroy_allocator101848
Node: omp_set_default_allocator102832
Node: omp_get_default_allocator103866
Node: omp_alloc104807
Node: omp_aligned_alloc106910
Node: omp_free109440
Node: omp_calloc111095
Node: omp_aligned_calloc113314
Node: omp_realloc115866
Node: Environment Display Routine119252
Node: omp_display_env119628
Node: Environment Variables122462
Node: OMP_ALLOCATOR125243
Node: OMP_AFFINITY_FORMAT129053
Node: OMP_CANCELLATION131661
Node: OMP_DISPLAY_AFFINITY132261
Node: OMP_DISPLAY_ENV132956
Node: OMP_DEFAULT_DEVICE133806
Node: OMP_DYNAMIC134814
Node: OMP_MAX_ACTIVE_LEVELS135441
Node: OMP_MAX_TASK_PRIORITY136466
Node: OMP_NESTED137169
Node: OMP_NUM_TEAMS138418
Node: OMP_NUM_THREADS139127
Node: OMP_PROC_BIND140143
Node: OMP_PLACES141664
Node: OMP_STACKSIZE144400
Node: OMP_SCHEDULE145302
Node: OMP_TARGET_OFFLOAD146049
Node: OMP_TEAMS_THREAD_LIMIT147536
Node: OMP_THREAD_LIMIT148389
Node: OMP_WAIT_POLICY149049
Node: GOMP_CPU_AFFINITY149741
Node: GOMP_DEBUG151459
Node: GOMP_STACKSIZE151961
Node: GOMP_SPINCOUNT152792
Node: GOMP_RTEMS_THREAD_POOLS153996
Node: Enabling OpenACC156171
Node: OpenACC Runtime Library Routines156993
Node: acc_get_num_devices161274
Node: acc_set_device_type162000
Node: acc_get_device_type162764
Node: acc_set_device_num163777
Node: acc_get_device_num164594
Node: acc_get_property165393
Node: acc_async_test167605
Node: acc_async_test_all168576
Node: acc_wait169459
Node: acc_wait_all170322
Node: acc_wait_all_async171083
Node: acc_wait_async171835
Node: acc_init172543
Node: acc_shutdown173188
Node: acc_on_device173855
Node: acc_malloc174844
Node: acc_free175552
Node: acc_copyin176196
Node: acc_present_or_copyin177783
Node: acc_create179551
Node: acc_present_or_create181183
Node: acc_copyout182959
Node: acc_delete185263
Node: acc_update_device187510
Node: acc_update_self189084
Node: acc_map_data190674
Node: acc_unmap_data191746
Node: acc_deviceptr192488
Node: acc_hostptr193283
Node: acc_is_present194067
Node: acc_memcpy_to_device195594
Node: acc_memcpy_from_device197029
Node: acc_attach198514
Node: acc_detach199181
Node: acc_get_current_cuda_device200020
Node: acc_get_current_cuda_context200605
Node: acc_get_cuda_stream201205
Node: acc_set_cuda_stream201796
Node: acc_prof_register202467
Node: acc_prof_unregister203026
Node: acc_prof_lookup203593
Node: acc_register_library204114
Node: OpenACC Environment Variables204680
Node: ACC_DEVICE_TYPE205169
Node: ACC_DEVICE_NUM205696
Node: ACC_PROFLIB206167
Node: CUDA Streams Usage206773
Ref: CUDA Streams Usage-Footnote-1208665
Node: OpenACC Library Interoperability208774
Ref: OpenACC Library Interoperability-Footnote-1215123
Ref: OpenACC Library Interoperability-Footnote-2215375
Node: OpenACC Profiling Interface215583
Node: OpenMP-Implementation Specifics225581
Node: Implementation-defined ICV Initialization225900
Node: OpenMP Context Selectors227071
Ref: OpenMP Context Selectors-Footnote-1228352
Node: Memory allocation228420
Node: Offload-Target Specifics233065
Node: AMD Radeon233356
Node: nvptx236294
Node: The libgomp ABI239921
Node: Implementing MASTER construct240771
Node: Implementing CRITICAL construct241188
Node: Implementing ATOMIC construct241929
Node: Implementing FLUSH construct242412
Node: Implementing BARRIER construct242685
Node: Implementing THREADPRIVATE construct242956
Node: Implementing PRIVATE clause243611
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses244194
Node: Implementing REDUCTION clause245520
Node: Implementing PARALLEL construct246080
Node: Implementing FOR construct247339
Node: Implementing ORDERED construct249339
Node: Implementing SECTIONS construct249647
Node: Implementing SINGLE construct250415
Node: Implementing OpenACC's PARALLEL construct251129
Node: Reporting Bugs251389
Node: Copying251752
Node: GNU Free Documentation License289304
Node: Funding314432
Node: Library Index316958

End Tag Table
@


1.18
log
@merge GCC 12.5.0.

XXX istream.cc may need more work.
@
text
@d4 1
a4 1
Copyright (C) 2006-2022 Free Software Foundation, Inc.
d36 1
a36 1
   Copyright (C) 2006-2022 Free Software Foundation, Inc.
d96 3
d117 13
a129 6
compile-time flag '-fopenmp' must be specified.  This enables the OpenMP
directive '#pragma omp' in C/C++ and '!$omp' directives in free form,
'c$omp', '*$omp' and '!$omp' directives in fixed form, '!$' conditional
compilation sentinels in free form and 'c$', '*$' and '!$' sentinels in
fixed form, for Fortran.  The flag also arranges for automatic linking
of the OpenMP runtime library (*note Runtime Library Routines::).
d146 2
d177 2
a178 2
'declare variant' directive                 P       simd traits not
                                                    handled
d180 1
a180 1
_target-offload-var_ ICV and                Y
d183 5
a187 6
_max-active-levels-var_ ICV
'requires' directive                        P       Only fulfillable
                                                    requirement are
                                                    'atomic_default_mem_order'
                                                    and
                                                    'dynamic_allocators'
d190 5
a194 1
Non-rectangular loop nests                  P       Only C/C++
d199 1
a199 1
Collapse of associated loops that are       N
d223 2
a224 2
Predefined memory spaces, memory            Y       Some are only
allocators, allocator traits                        stubs
d226 8
a233 2
'allocate' directive                        N
'allocate' clause                           P       initial support
d235 1
a235 2
'ancestor' modifier on 'device' clause      P       Reverse offload
                                                    unsupported
d239 1
a239 1
C/C++'s lvalue expressions in 'to',         N
d283 1
a283 1
File: libgomp.info,  Node: OpenMP 5.1,  Prev: OpenMP 5.0,  Up: OpenMP Implementation Status
d295 1
a295 1
'omp_all_memory' reserved locator           N
d304 1
a304 1
device-specific ICV settings the            N
d306 1
a306 1
assume directive                            N
d313 1
a313 1
'num_tasks' clauses of the taskloop
d315 5
a319 3
'align' clause/modifier in 'allocate'       P       C/C++ on clause
directive/clause and 'allocator'                    only
directive
d324 1
a324 1
iterators in 'target update' motion         N
d326 1
a326 1
indirect calls to the device version of a   N
d331 1
a331 1
'nowait' clause in 'taskwait' directive     N
d334 1
a334 1
'inoutset' argument to the 'depend'         N
d338 1
a338 1
'present' argument to 'defaultmap' clause   N
d344 1
a344 1
'omp_target_is_accessible' runtime          N
d346 1
a346 1
'omp_target_memcpy_async' and               N
d349 1
a349 1
'omp_get_mapped_ptr' runtime routine        N
d384 238
d629 2
a630 3
The runtime routines described here are defined by Section 3 of the
OpenMP specification in version 4.5.  The routines are structured in
following three parts:
d634 23
a656 2
Control threads, processors and the parallel environment.  They have C
linkage, and do not throw exceptions.
d658 2
a659 11
* omp_get_active_level::        Number of active parallel regions
* omp_get_ancestor_thread_num:: Ancestor thread ID
* omp_get_cancellation::        Whether cancellation support is enabled
* omp_get_default_device::      Get the default device for target regions
* omp_get_device_num::          Get device that current thread is running on
* omp_get_dynamic::             Dynamic teams setting
* omp_get_initial_device::      Device number of host device
* omp_get_level::               Number of parallel regions
* omp_get_max_active_levels::   Current maximum number of active regions
* omp_get_max_task_priority::   Maximum task priority value that can be set
* omp_get_max_teams::           Maximum number of teams for teams region
a660 12
* omp_get_nested::              Nested parallel regions
* omp_get_num_devices::         Number of target devices
* omp_get_num_procs::           Number of processors online
* omp_get_num_teams::           Number of teams
* omp_get_num_threads::         Size of the active team
* omp_get_proc_bind::           Whether threads may be moved between CPUs
* omp_get_schedule::            Obtain the runtime scheduling method
* omp_get_supported_active_levels:: Maximum number of active regions supported
* omp_get_team_num::            Get team number
* omp_get_team_size::           Number of threads in a team
* omp_get_teams_thread_limit::  Maximum number of threads imposed by teams
* omp_get_thread_limit::        Maximum number of threads
a662 3
* omp_in_final::                Whether in final or included task region
* omp_is_initial_device::       Whether executing on the host device
* omp_set_default_device::      Set the default device for target regions
d664 2
a665 1
* omp_set_max_active_levels::   Limits the number of active parallel regions
d667 1
a667 2
* omp_set_num_teams::           Set upper teams limit for teams region
* omp_set_num_threads::         Set upper team size limit
d669 12
a680 1
* omp_set_teams_thread_limit::  Set upper thread limit for teams construct
d682 2
a683 1
Initialize, set, test, unset and destroy simple and nested locks.
d685 4
a688 10
* omp_init_lock::            Initialize simple lock
* omp_set_lock::             Wait for and set simple lock
* omp_test_lock::            Test and set simple lock if available
* omp_unset_lock::           Unset simple lock
* omp_destroy_lock::         Destroy simple lock
* omp_init_nest_lock::       Initialize nested lock
* omp_set_nest_lock::        Wait for and set simple lock
* omp_test_nest_lock::       Test and set nested lock if available
* omp_unset_nest_lock::      Unset nested lock
* omp_destroy_nest_lock::    Destroy nested lock
d690 2
a691 1
Portable, thread-based, wall clock timer.
d693 3
a695 2
* omp_get_wtick::            Get timer precision.
* omp_get_wtime::            Elapsed wall clock time.
d697 3
a699 1
Support for event objects.
d701 2
a702 1
* omp_fulfill_event::        Fulfill and destroy an OpenMP event.
d705 1
a705 1
File: libgomp.info,  Node: omp_get_active_level,  Next: omp_get_ancestor_thread_num,  Up: Runtime Library Routines
d707 2
a708 2
3.1 'omp_get_active_level' - Number of parallel regions
=======================================================
d711 9
a719 2
     This function returns the nesting level for the active parallel
     blocks, which enclose the calling call.
d721 2
a722 2
_C/C++_
     _Prototype_:   'int omp_get_active_level(void);'
d725 1
a725 1
     _Interface_:   'integer function omp_get_active_level()'
d728 2
a729 2
     *note omp_get_level::, *note omp_get_max_active_levels::, *note
     omp_set_max_active_levels::
d732 1
a732 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.20.
d735 1
a735 1
File: libgomp.info,  Node: omp_get_ancestor_thread_num,  Next: omp_get_cancellation,  Prev: omp_get_active_level,  Up: Runtime Library Routines
d737 2
a738 2
3.2 'omp_get_ancestor_thread_num' - Ancestor thread ID
======================================================
d741 2
a742 4
     This function returns the thread identification number for the
     given nesting level of the current thread.  For values of LEVEL
     outside zero to 'omp_get_level' -1 is returned; if LEVEL is
     'omp_get_level' the result is identical to 'omp_get_thread_num'.
d744 2
a745 2
_C/C++_
     _Prototype_:   'int omp_get_ancestor_thread_num(int level);'
d748 1
a748 2
     _Interface_:   'integer function omp_get_ancestor_thread_num(level)'
                    'integer level'
d751 2
a752 2
     *note omp_get_level::, *note omp_get_thread_num::, *note
     omp_get_team_size::
d755 1
a755 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.18.
d758 1
a758 1
File: libgomp.info,  Node: omp_get_cancellation,  Next: omp_get_default_device,  Prev: omp_get_ancestor_thread_num,  Up: Runtime Library Routines
d760 2
a761 2
3.3 'omp_get_cancellation' - Whether cancellation support is enabled
====================================================================
d764 5
a768 4
     This function returns 'true' if cancellation is activated, 'false'
     otherwise.  Here, 'true' and 'false' represent their
     language-specific counterparts.  Unless 'OMP_CANCELLATION' is set
     true, cancellations are deactivated.
d771 1
a771 1
     _Prototype_:   'int omp_get_cancellation(void);'
d774 1
a774 1
     _Interface_:   'logical function omp_get_cancellation()'
d777 1
a777 1
     *note OMP_CANCELLATION::
d780 1
a780 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.9.
d783 1
a783 1
File: libgomp.info,  Node: omp_get_default_device,  Next: omp_get_device_num,  Prev: omp_get_cancellation,  Up: Runtime Library Routines
d785 2
a786 2
3.4 'omp_get_default_device' - Get the default device for target regions
========================================================================
d789 3
a791 1
     Get the default device for target regions without device clause.
d794 1
a794 1
     _Prototype_:   'int omp_get_default_device(void);'
d797 1
a797 4
     _Interface_:   'integer function omp_get_default_device()'

_See also_:
     *note OMP_DEFAULT_DEVICE::, *note omp_set_default_device::
d800 1
a800 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.30.
d803 1
a803 1
File: libgomp.info,  Node: omp_get_device_num,  Next: omp_get_dynamic,  Prev: omp_get_default_device,  Up: Runtime Library Routines
d805 2
a806 2
3.5 'omp_get_device_num' - Return device number of current device
=================================================================
d809 4
a812 4
     This function returns a device number that represents the device
     that the current thread is executing on.  For OpenMP 5.0, this must
     be equal to the value returned by the 'omp_get_initial_device'
     function when called from the host.
d814 2
a815 2
_C/C++_
     _Prototype_:   'int omp_get_device_num(void);'
d818 2
a819 1
     _Interface_:   'integer function omp_get_device_num()'
d822 1
a822 1
     *note omp_get_initial_device::
d825 1
a825 1
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.2.37.
d828 1
a828 1
File: libgomp.info,  Node: omp_get_dynamic,  Next: omp_get_initial_device,  Prev: omp_get_device_num,  Up: Runtime Library Routines
d830 2
a831 2
3.6 'omp_get_dynamic' - Dynamic teams setting
=============================================
d855 1
a855 1
File: libgomp.info,  Node: omp_get_initial_device,  Next: omp_get_level,  Prev: omp_get_dynamic,  Up: Runtime Library Routines
d857 2
a858 2
3.7 'omp_get_initial_device' - Return device number of initial device
=====================================================================
d861 4
a864 3
     This function returns a device number that represents the host
     device.  For OpenMP 5.1, this must be equal to the value returned
     by the 'omp_get_num_devices' function.
d866 2
a867 2
_C/C++_
     _Prototype_:   'int omp_get_initial_device(void);'
d870 1
a870 1
     _Interface_:   'integer function omp_get_initial_device()'
d873 1
a873 1
     *note omp_get_num_devices::
d876 1
a876 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.35.
d879 1
a879 1
File: libgomp.info,  Node: omp_get_level,  Next: omp_get_max_active_levels,  Prev: omp_get_initial_device,  Up: Runtime Library Routines
d881 2
a882 2
3.8 'omp_get_level' - Obtain the current nesting level
======================================================
d885 12
a896 2
     This function returns the nesting level for the parallel blocks,
     which enclose the calling call.
d898 2
a899 2
_C/C++_
     _Prototype_:   'int omp_get_level(void);'
d902 2
a903 1
     _Interface_:   'integer function omp_level()'
d906 2
a907 1
     *note omp_get_active_level::
d910 1
a910 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.17.
d913 1
a913 1
File: libgomp.info,  Node: omp_get_max_active_levels,  Next: omp_get_max_task_priority,  Prev: omp_get_level,  Up: Runtime Library Routines
d915 2
a916 2
3.9 'omp_get_max_active_levels' - Current maximum number of active regions
==========================================================================
d919 2
a920 89
     This function obtains the maximum allowed number of nested, active
     parallel regions.

_C/C++_
     _Prototype_:   'int omp_get_max_active_levels(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_max_active_levels()'

_See also_:
     *note omp_set_max_active_levels::, *note omp_get_active_level::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.16.


File: libgomp.info,  Node: omp_get_max_task_priority,  Next: omp_get_max_teams,  Prev: omp_get_max_active_levels,  Up: Runtime Library Routines

3.10 'omp_get_max_task_priority' - Maximum priority value
=========================================================

that can be set for tasks.
_Description_:
     This function obtains the maximum allowed priority number for
     tasks.

_C/C++_
     _Prototype_:   'int omp_get_max_task_priority(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_max_task_priority()'

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.29.


File: libgomp.info,  Node: omp_get_max_teams,  Next: omp_get_max_threads,  Prev: omp_get_max_task_priority,  Up: Runtime Library Routines

3.11 'omp_get_max_teams' - Maximum number of teams of teams region
==================================================================

_Description_:
     Return the maximum number of teams used for the teams region that
     does not use the clause 'num_teams'.

_C/C++_:
     _Prototype_:   'int omp_get_max_teams(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_max_teams()'

_See also_:
     *note omp_set_num_teams::, *note omp_get_num_teams::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.4.4.


File: libgomp.info,  Node: omp_get_max_threads,  Next: omp_get_nested,  Prev: omp_get_max_teams,  Up: Runtime Library Routines

3.12 'omp_get_max_threads' - Maximum number of threads of parallel region
=========================================================================

_Description_:
     Return the maximum number of threads used for the current parallel
     region that does not use the clause 'num_threads'.

_C/C++_:
     _Prototype_:   'int omp_get_max_threads(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_max_threads()'

_See also_:
     *note omp_set_num_threads::, *note omp_set_dynamic::, *note
     omp_get_thread_limit::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.3.


File: libgomp.info,  Node: omp_get_nested,  Next: omp_get_num_devices,  Prev: omp_get_max_threads,  Up: Runtime Library Routines

3.13 'omp_get_nested' - Nested parallel regions
===============================================

_Description_:
     This function returns 'true' if nested parallel regions are
     enabled, 'false' otherwise.  Here, 'true' and 'false' represent
d938 3
d948 1
a948 1
     *note omp_set_max_active_levels::, *note omp_set_nested::, *note
d955 1
a955 1
File: libgomp.info,  Node: omp_get_num_devices,  Next: omp_get_num_procs,  Prev: omp_get_nested,  Up: Runtime Library Routines
d957 2
a958 2
3.14 'omp_get_num_devices' - Number of target devices
=====================================================
d961 6
a966 1
     Returns the number of target devices.
d968 3
a970 2
_C/C++_:
     _Prototype_:   'int omp_get_num_devices(void);'
d973 6
a978 1
     _Interface_:   'integer function omp_get_num_devices()'
d981 1
a981 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.31.
d984 1
a984 1
File: libgomp.info,  Node: omp_get_num_procs,  Next: omp_get_num_teams,  Prev: omp_get_num_devices,  Up: Runtime Library Routines
d986 2
a987 2
3.15 'omp_get_num_procs' - Number of processors online
======================================================
d990 4
a993 1
     Returns the number of processors online on that device.
d995 3
a997 2
_C/C++_:
     _Prototype_:   'int omp_get_num_procs(void);'
d1000 6
a1005 1
     _Interface_:   'integer function omp_get_num_procs()'
d1008 1
a1008 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.5.
d1011 1
a1011 1
File: libgomp.info,  Node: omp_get_num_teams,  Next: omp_get_num_threads,  Prev: omp_get_num_procs,  Up: Runtime Library Routines
d1013 2
a1014 2
3.16 'omp_get_num_teams' - Number of teams
==========================================
d1017 2
a1018 1
     Returns the number of teams in the current team region.
d1021 1
a1021 1
     _Prototype_:   'int omp_get_num_teams(void);'
d1024 4
a1027 1
     _Interface_:   'integer function omp_get_num_teams()'
d1030 1
a1030 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.32.
d1033 1
a1033 1
File: libgomp.info,  Node: omp_get_num_threads,  Next: omp_get_proc_bind,  Prev: omp_get_num_teams,  Up: Runtime Library Routines
d1035 2
a1036 2
3.17 'omp_get_num_threads' - Size of the active team
====================================================
d1039 2
a1040 2
     Returns the number of threads in the current team.  In a sequential
     section of the program 'omp_get_num_threads' returns 1.
d1042 2
a1043 9
     The default team size may be initialized at startup by the
     'OMP_NUM_THREADS' environment variable.  At runtime, the size of
     the current team may be set either by the 'NUM_THREADS' clause or
     by 'omp_set_num_threads'.  If none of the above were used to define
     a specific value and 'OMP_DYNAMIC' is disabled, one thread per CPU
     online is used.

_C/C++_:
     _Prototype_:   'int omp_get_num_threads(void);'
d1046 1
a1046 1
     _Interface_:   'integer function omp_get_num_threads()'
d1049 2
a1050 2
     *note omp_get_max_threads::, *note omp_set_num_threads::, *note
     OMP_NUM_THREADS::
d1053 1
a1053 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.2.
d1056 1
a1056 1
File: libgomp.info,  Node: omp_get_proc_bind,  Next: omp_get_schedule,  Prev: omp_get_num_threads,  Up: Runtime Library Routines
d1058 2
a1059 2
3.18 'omp_get_proc_bind' - Whether threads may be moved between CPUs
====================================================================
d1062 3
a1064 6
     This functions returns the currently active thread affinity policy,
     which is set via 'OMP_PROC_BIND'.  Possible values are
     'omp_proc_bind_false', 'omp_proc_bind_true',
     'omp_proc_bind_primary', 'omp_proc_bind_master',
     'omp_proc_bind_close' and 'omp_proc_bind_spread', where
     'omp_proc_bind_master' is an alias for 'omp_proc_bind_primary'.
d1066 2
a1067 2
_C/C++_:
     _Prototype_:   'omp_proc_bind_t omp_get_proc_bind(void);'
d1070 2
a1071 2
     _Interface_:   'integer(kind=omp_proc_bind_kind) function
                    omp_get_proc_bind()'
d1074 2
a1075 2
     *note OMP_PROC_BIND::, *note OMP_PLACES::, *note
     GOMP_CPU_AFFINITY::,
d1078 1
a1078 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.22.
d1081 1
a1081 1
File: libgomp.info,  Node: omp_get_schedule,  Next: omp_get_supported_active_levels,  Prev: omp_get_proc_bind,  Up: Runtime Library Routines
d1083 2
a1084 2
3.19 'omp_get_schedule' - Obtain the runtime scheduling method
==============================================================
d1087 2
a1088 4
     Obtain the runtime scheduling method.  The KIND argument will be
     set to the value 'omp_sched_static', 'omp_sched_dynamic',
     'omp_sched_guided' or 'omp_sched_auto'.  The second argument,
     CHUNK_SIZE, is set to the chunk size.
d1091 1
a1091 2
     _Prototype_:   'void omp_get_schedule(omp_sched_t *kind, int
                    *chunk_size);'
d1094 1
a1094 3
     _Interface_:   'subroutine omp_get_schedule(kind, chunk_size)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer chunk_size'
d1097 1
a1097 1
     *note omp_set_schedule::, *note OMP_SCHEDULE::
d1100 1
a1100 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.13.
d1103 1
a1103 1
File: libgomp.info,  Node: omp_get_supported_active_levels,  Next: omp_get_team_num,  Prev: omp_get_schedule,  Up: Runtime Library Routines
d1105 2
a1106 2
3.20 'omp_get_supported_active_levels' - Maximum number of active regions supported
===================================================================================
d1109 2
a1110 2
     This function returns the maximum number of nested, active parallel
     regions supported by this implementation.
d1113 1
a1113 1
     _Prototype_:   'int omp_get_supported_active_levels(void);'
d1116 1
a1116 1
     _Interface_:   'integer function omp_get_supported_active_levels()'
d1119 1
a1119 2
     *note omp_get_max_active_levels::, *note
     omp_set_max_active_levels::
d1122 1
a1122 1
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.2.15.
d1125 1
a1125 1
File: libgomp.info,  Node: omp_get_team_num,  Next: omp_get_team_size,  Prev: omp_get_supported_active_levels,  Up: Runtime Library Routines
d1127 2
a1128 2
3.21 'omp_get_team_num' - Get team number
=========================================
d1131 4
a1134 1
     Returns the team number of the calling thread.
d1136 2
a1137 2
_C/C++_:
     _Prototype_:   'int omp_get_team_num(void);'
d1140 6
a1145 1
     _Interface_:   'integer function omp_get_team_num()'
d1148 1
a1148 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.33.
d1151 1
a1151 1
File: libgomp.info,  Node: omp_get_team_size,  Next: omp_get_teams_thread_limit,  Prev: omp_get_team_num,  Up: Runtime Library Routines
d1153 2
a1154 2
3.22 'omp_get_team_size' - Number of threads in a team
======================================================
d1178 1
a1178 1
File: libgomp.info,  Node: omp_get_teams_thread_limit,  Next: omp_get_thread_limit,  Prev: omp_get_team_size,  Up: Runtime Library Routines
d1180 2
a1181 2
3.23 'omp_get_teams_thread_limit' - Maximum number of threads imposed by teams
==============================================================================
d1184 2
a1185 2
     Return the maximum number of threads that will be able to
     participate in each team created by a teams construct.
d1187 2
a1188 2
_C/C++_:
     _Prototype_:   'int omp_get_teams_thread_limit(void);'
d1191 1
a1191 1
     _Interface_:   'integer function omp_get_teams_thread_limit()'
d1194 2
a1195 1
     *note omp_set_teams_thread_limit::, *note OMP_TEAMS_THREAD_LIMIT::
d1198 1
a1198 1
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.4.6.
d1201 1
a1201 1
File: libgomp.info,  Node: omp_get_thread_limit,  Next: omp_get_thread_num,  Prev: omp_get_teams_thread_limit,  Up: Runtime Library Routines
d1203 2
a1204 2
3.24 'omp_get_thread_limit' - Maximum number of threads
=======================================================
d1206 2
a1207 2
_Description_:
     Return the maximum number of threads of the program.
d1209 1
a1209 2
_C/C++_:
     _Prototype_:   'int omp_get_thread_limit(void);'
d1211 1
a1211 8
_Fortran_:
     _Interface_:   'integer function omp_get_thread_limit()'

_See also_:
     *note omp_get_max_threads::, *note OMP_THREAD_LIMIT::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.14.
d1214 1
a1214 1
File: libgomp.info,  Node: omp_get_thread_num,  Next: omp_in_parallel,  Prev: omp_get_thread_limit,  Up: Runtime Library Routines
d1216 2
a1217 2
3.25 'omp_get_thread_num' - Current thread ID
=============================================
d1220 6
a1225 5
     Returns a unique thread identification number within the current
     team.  In a sequential parts of the program, 'omp_get_thread_num'
     always returns 0.  In parallel regions the return value varies from
     0 to 'omp_get_num_threads'-1 inclusive.  The return value of the
     primary thread of a team is always 0.
d1228 1
a1228 1
     _Prototype_:   'int omp_get_thread_num(void);'
d1231 2
a1232 1
     _Interface_:   'integer function omp_get_thread_num()'
d1235 2
a1236 1
     *note omp_get_num_threads::, *note omp_get_ancestor_thread_num::
d1239 1
a1239 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.4.
d1242 1
a1242 1
File: libgomp.info,  Node: omp_in_parallel,  Next: omp_in_final,  Prev: omp_get_thread_num,  Up: Runtime Library Routines
d1244 2
a1245 2
3.26 'omp_in_parallel' - Whether a parallel region is active
============================================================
d1247 2
a1248 4
_Description_:
     This function returns 'true' if currently running in parallel,
     'false' otherwise.  Here, 'true' and 'false' represent their
     language-specific counterparts.
d1250 1
a1250 2
_C/C++_:
     _Prototype_:   'int omp_in_parallel(void);'
d1252 6
a1257 5
_Fortran_:
     _Interface_:   'logical function omp_in_parallel()'

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.6.
d1260 1
a1260 1
File: libgomp.info,  Node: omp_in_final,  Next: omp_is_initial_device,  Prev: omp_in_parallel,  Up: Runtime Library Routines
d1262 2
a1263 2
3.27 'omp_in_final' - Whether in final or included task region
==============================================================
d1266 1
a1266 3
     This function returns 'true' if currently running in a final or
     included task region, 'false' otherwise.  Here, 'true' and 'false'
     represent their language-specific counterparts.
d1269 1
a1269 1
     _Prototype_:   'int omp_in_final(void);'
d1272 1
a1272 1
     _Interface_:   'logical function omp_in_final()'
d1275 1
a1275 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.21.
d1278 1
a1278 1
File: libgomp.info,  Node: omp_is_initial_device,  Next: omp_set_default_device,  Prev: omp_in_final,  Up: Runtime Library Routines
d1280 2
a1281 2
3.28 'omp_is_initial_device' - Whether executing on the host device
===================================================================
d1284 1
a1284 3
     This function returns 'true' if currently running on the host
     device, 'false' otherwise.  Here, 'true' and 'false' represent
     their language-specific counterparts.
d1287 1
a1287 1
     _Prototype_:   'int omp_is_initial_device(void);'
d1290 1
a1290 1
     _Interface_:   'logical function omp_is_initial_device()'
d1293 1
a1293 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.34.
d1296 1
a1296 1
File: libgomp.info,  Node: omp_set_default_device,  Next: omp_set_dynamic,  Prev: omp_is_initial_device,  Up: Runtime Library Routines
d1298 2
a1299 2
3.29 'omp_set_default_device' - Set the default device for target regions
=========================================================================
d1302 3
a1304 2
     Set the default device for target regions without device clause.
     The argument shall be a nonnegative device number.
d1307 1
a1307 1
     _Prototype_:   'void omp_set_default_device(int device_num);'
d1310 2
a1311 2
     _Interface_:   'subroutine omp_set_default_device(device_num)'
                    'integer device_num'
d1314 2
a1315 1
     *note OMP_DEFAULT_DEVICE::, *note omp_get_default_device::
d1318 1
a1318 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.29.
d1321 1
a1321 1
File: libgomp.info,  Node: omp_set_dynamic,  Next: omp_set_max_active_levels,  Prev: omp_set_default_device,  Up: Runtime Library Routines
d1323 2
a1324 2
3.30 'omp_set_dynamic' - Enable/disable dynamic teams
=====================================================
d1327 2
a1328 4
     Enable or disable the dynamic adjustment of the number of threads
     within a team.  The function takes the language-specific equivalent
     of 'true' and 'false', where 'true' enables dynamic adjustment of
     team sizes and 'false' disables it.
d1331 1
a1331 1
     _Prototype_:   'void omp_set_dynamic(int dynamic_threads);'
d1334 1
a1334 2
     _Interface_:   'subroutine omp_set_dynamic(dynamic_threads)'
                    'logical, intent(in) :: dynamic_threads'
d1337 1
a1337 1
     *note OMP_DYNAMIC::, *note omp_get_dynamic::
d1340 1
a1340 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.7.
d1343 1
a1343 1
File: libgomp.info,  Node: omp_set_max_active_levels,  Next: omp_set_nested,  Prev: omp_set_dynamic,  Up: Runtime Library Routines
d1345 2
a1346 2
3.31 'omp_set_max_active_levels' - Limits the number of active parallel regions
===============================================================================
d1349 4
a1352 3
     This function limits the maximum allowed number of nested, active
     parallel regions.  MAX_LEVELS must be less or equal to the value
     returned by 'omp_get_supported_active_levels'.
d1354 2
a1355 2
_C/C++_
     _Prototype_:   'void omp_set_max_active_levels(int max_levels);'
d1358 2
a1359 2
     _Interface_:   'subroutine omp_set_max_active_levels(max_levels)'
                    'integer max_levels'
d1362 2
a1363 2
     *note omp_get_max_active_levels::, *note omp_get_active_level::,
     *note omp_get_supported_active_levels::
d1366 1
a1366 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.15.
d1369 1
a1369 1
File: libgomp.info,  Node: omp_set_nested,  Next: omp_set_num_teams,  Prev: omp_set_max_active_levels,  Up: Runtime Library Routines
d1371 2
a1372 2
3.32 'omp_set_nested' - Enable/disable nested parallel regions
==============================================================
d1375 1
a1375 9
     Enable or disable nested parallel regions, i.e., whether team
     members are allowed to create new teams.  The function takes the
     language-specific equivalent of 'true' and 'false', where 'true'
     enables dynamic adjustment of team sizes and 'false' disables it.

     Enabling nested parallel regions will also set the maximum number
     of active nested regions to the maximum supported.  Disabling
     nested parallel regions will set the maximum number of active
     nested regions to one.
d1378 1
a1378 1
     _Prototype_:   'void omp_set_nested(int nested);'
d1381 1
a1381 2
     _Interface_:   'subroutine omp_set_nested(nested)'
                    'logical, intent(in) :: nested'
d1384 1
a1384 2
     *note omp_get_nested::, *note omp_set_max_active_levels::, *note
     OMP_MAX_ACTIVE_LEVELS::, *note OMP_NESTED::
d1387 16
a1402 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.10.
d1405 1
a1405 1
File: libgomp.info,  Node: omp_set_num_teams,  Next: omp_set_num_threads,  Prev: omp_set_nested,  Up: Runtime Library Routines
d1407 2
a1408 2
3.33 'omp_set_num_teams' - Set upper teams limit for teams construct
====================================================================
d1410 1
d1412 2
a1413 3
     Specifies the upper bound for number of teams created by the teams
     construct which does not specify a 'num_teams' clause.  The
     argument of 'omp_set_num_teams' shall be a positive integer.
d1415 2
a1416 2
_C/C++_:
     _Prototype_:   'void omp_set_num_teams(int num_teams);'
d1419 1
a1419 6
     _Interface_:   'subroutine omp_set_num_teams(num_teams)'
                    'integer, intent(in) :: num_teams'

_See also_:
     *note OMP_NUM_TEAMS::, *note omp_get_num_teams::, *note
     omp_get_max_teams::
d1422 1
a1422 1
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.4.3.
d1425 1
a1425 1
File: libgomp.info,  Node: omp_set_num_threads,  Next: omp_set_schedule,  Prev: omp_set_num_teams,  Up: Runtime Library Routines
d1427 2
a1428 2
3.34 'omp_set_num_threads' - Set upper team size limit
======================================================
d1431 6
a1436 3
     Specifies the number of threads used by default in subsequent
     parallel sections, if those do not specify a 'num_threads' clause.
     The argument of 'omp_set_num_threads' shall be a positive integer.
d1438 2
a1439 2
_C/C++_:
     _Prototype_:   'void omp_set_num_threads(int num_threads);'
d1442 1
a1442 6
     _Interface_:   'subroutine omp_set_num_threads(num_threads)'
                    'integer, intent(in) :: num_threads'

_See also_:
     *note OMP_NUM_THREADS::, *note omp_get_num_threads::, *note
     omp_get_max_threads::
d1445 1
a1445 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.1.
d1448 1
a1448 1
File: libgomp.info,  Node: omp_set_schedule,  Next: omp_set_teams_thread_limit,  Prev: omp_set_num_threads,  Up: Runtime Library Routines
d1450 2
a1451 2
3.35 'omp_set_schedule' - Set the runtime scheduling method
===========================================================
d1454 3
a1456 6
     Sets the runtime scheduling method.  The KIND argument can have the
     value 'omp_sched_static', 'omp_sched_dynamic', 'omp_sched_guided'
     or 'omp_sched_auto'.  Except for 'omp_sched_auto', the chunk size
     is set to the value of CHUNK_SIZE if positive, or to the default
     value if zero or negative.  For 'omp_sched_auto' the CHUNK_SIZE
     argument is ignored.
d1458 2
a1459 3
_C/C++_
     _Prototype_:   'void omp_set_schedule(omp_sched_t kind, int
                    chunk_size);'
d1462 13
a1474 3
     _Interface_:   'subroutine omp_set_schedule(kind, chunk_size)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer chunk_size'
d1476 1
a1476 2
_See also_:
     *note omp_get_schedule:: *note OMP_SCHEDULE::
d1478 2
a1479 2
_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.12.
d1482 1
a1482 1
File: libgomp.info,  Node: omp_set_teams_thread_limit,  Next: omp_init_lock,  Prev: omp_set_schedule,  Up: Runtime Library Routines
d1484 2
a1485 2
3.36 'omp_set_teams_thread_limit' - Set upper thread limit for teams construct
==============================================================================
d1488 8
a1495 4
     Specifies the upper bound for number of threads that will be
     available for each team created by the teams construct which does
     not specify a 'thread_limit' clause.  The argument of
     'omp_set_teams_thread_limit' shall be a positive integer.
d1498 2
a1499 1
     _Prototype_:   'void omp_set_teams_thread_limit(int thread_limit);'
d1502 3
a1504 6
     _Interface_:   'subroutine omp_set_teams_thread_limit(thread_limit)'
                    'integer, intent(in) :: thread_limit'

_See also_:
     *note OMP_TEAMS_THREAD_LIMIT::, *note omp_get_teams_thread_limit::,
     *note omp_get_thread_limit::
d1507 1
a1507 1
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.4.5.
d1510 1
a1510 1
File: libgomp.info,  Node: omp_init_lock,  Next: omp_set_lock,  Prev: omp_set_teams_thread_limit,  Up: Runtime Library Routines
d1512 2
a1513 2
3.37 'omp_init_lock' - Initialize simple lock
=============================================
d1516 7
a1522 2
     Initialize a simple lock.  After initialization, the lock is in an
     unlocked state.
d1525 1
a1525 1
     _Prototype_:   'void omp_init_lock(omp_lock_t *lock);'
d1528 2
a1529 2
     _Interface_:   'subroutine omp_init_lock(svar)'
                    'integer(omp_lock_kind), intent(out) :: svar'
d1532 1
a1532 1
     *note omp_destroy_lock::
d1535 20
a1554 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.1.
d1557 1
a1557 1
File: libgomp.info,  Node: omp_set_lock,  Next: omp_test_lock,  Prev: omp_init_lock,  Up: Runtime Library Routines
d1559 2
a1560 2
3.38 'omp_set_lock' - Wait for and set simple lock
==================================================
d1563 1
a1563 4
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  The calling thread is blocked until the lock
     is available.  If the lock is already held by the current thread, a
     deadlock occurs.
d1566 1
a1566 1
     _Prototype_:   'void omp_set_lock(omp_lock_t *lock);'
d1569 834
a2402 2
     _Interface_:   'subroutine omp_set_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d2408 257
a2664 2
_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.4.
d2667 1
a2667 1
File: libgomp.info,  Node: omp_test_lock,  Next: omp_unset_lock,  Prev: omp_set_lock,  Up: Runtime Library Routines
d2669 2
a2670 2
3.39 'omp_test_lock' - Test and set simple lock if available
============================================================
d2673 10
a2682 5
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  Contrary to 'omp_set_lock', 'omp_test_lock'
     does not block if the lock is not available.  This function returns
     'true' upon success, 'false' otherwise.  Here, 'true' and 'false'
     represent their language-specific counterparts.
d2685 4
a2688 1
     _Prototype_:   'int omp_test_lock(omp_lock_t *lock);'
d2691 7
a2697 2
     _Interface_:   'logical function omp_test_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d2700 2
a2701 1
     *note omp_init_lock::, *note omp_set_lock::, *note omp_set_lock::
d2704 1
a2704 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.6.
d2707 1
a2707 1
File: libgomp.info,  Node: omp_unset_lock,  Next: omp_destroy_lock,  Prev: omp_test_lock,  Up: Runtime Library Routines
d2709 2
a2710 2
3.40 'omp_unset_lock' - Unset simple lock
=========================================
d2713 4
a2716 6
     A simple lock about to be unset must have been locked by
     'omp_set_lock' or 'omp_test_lock' before.  In addition, the lock
     must be held by the thread calling 'omp_unset_lock'.  Then, the
     lock becomes unlocked.  If one or more threads attempted to set the
     lock before, one of them is chosen to, again, set the lock to
     itself.
d2719 2
a2720 1
     _Prototype_:   'void omp_unset_lock(omp_lock_t *lock);'
d2723 3
a2725 2
     _Interface_:   'subroutine omp_unset_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d2728 1
a2728 1
     *note omp_set_lock::, *note omp_test_lock::
d2731 1
a2731 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.5.
d2734 1
a2734 1
File: libgomp.info,  Node: omp_destroy_lock,  Next: omp_init_nest_lock,  Prev: omp_unset_lock,  Up: Runtime Library Routines
d2736 2
a2737 2
3.41 'omp_destroy_lock' - Destroy simple lock
=============================================
d2740 3
a2742 2
     Destroy a simple lock.  In order to be destroyed, a simple lock
     must be in the unlocked state.
d2745 2
a2746 1
     _Prototype_:   'void omp_destroy_lock(omp_lock_t *lock);'
d2749 3
a2751 2
     _Interface_:   'subroutine omp_destroy_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d2754 2
a2755 1
     *note omp_init_lock::
d2758 1
a2758 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.3.
d2761 1
a2761 1
File: libgomp.info,  Node: omp_init_nest_lock,  Next: omp_set_nest_lock,  Prev: omp_destroy_lock,  Up: Runtime Library Routines
d2763 2
a2764 2
3.42 'omp_init_nest_lock' - Initialize nested lock
==================================================
d2767 4
a2770 2
     Initialize a nested lock.  After initialization, the lock is in an
     unlocked state and the nesting count is set to zero.
d2773 1
a2773 1
     _Prototype_:   'void omp_init_nest_lock(omp_nest_lock_t *lock);'
d2776 3
a2778 2
     _Interface_:   'subroutine omp_init_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(out) :: nvar'
d2781 1
a2781 1
     *note omp_destroy_nest_lock::
d2784 1
a2784 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.1.
d2787 1
a2787 1
File: libgomp.info,  Node: omp_set_nest_lock,  Next: omp_test_nest_lock,  Prev: omp_init_nest_lock,  Up: Runtime Library Routines
d2789 2
a2790 2
3.43 'omp_set_nest_lock' - Wait for and set nested lock
=======================================================
d2793 21
a2813 4
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  The calling thread is blocked until the
     lock is available.  If the lock is already held by the current
     thread, the nesting count for the lock is incremented.
d2815 3
a2817 2
_C/C++_:
     _Prototype_:   'void omp_set_nest_lock(omp_nest_lock_t *lock);'
d2820 7
a2826 2
     _Interface_:   'subroutine omp_set_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d2829 3
a2831 1
     *note omp_init_nest_lock::, *note omp_unset_nest_lock::
d2834 1
a2834 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.4.
d2837 1
a2837 1
File: libgomp.info,  Node: omp_test_nest_lock,  Next: omp_unset_nest_lock,  Prev: omp_set_nest_lock,  Up: Runtime Library Routines
d2839 2
a2840 2
3.44 'omp_test_nest_lock' - Test and set nested lock if available
=================================================================
d2843 27
a2869 5
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  Contrary to 'omp_set_nest_lock',
     'omp_test_nest_lock' does not block if the lock is not available.
     If the lock is already held by the current thread, the new nesting
     count is returned.  Otherwise, the return value equals zero.
d2871 4
a2874 2
_C/C++_:
     _Prototype_:   'int omp_test_nest_lock(omp_nest_lock_t *lock);'
d2877 7
a2883 2
     _Interface_:   'logical function omp_test_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d2886 3
a2888 1
     *note omp_init_lock::, *note omp_set_lock::, *note omp_set_lock::
d2891 1
a2891 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.6.
d2894 1
a2894 1
File: libgomp.info,  Node: omp_unset_nest_lock,  Next: omp_destroy_nest_lock,  Prev: omp_test_nest_lock,  Up: Runtime Library Routines
d2896 2
a2897 2
3.45 'omp_unset_nest_lock' - Unset nested lock
==============================================
d2900 15
a2914 7
     A nested lock about to be unset must have been locked by
     'omp_set_nested_lock' or 'omp_test_nested_lock' before.  In
     addition, the lock must be held by the thread calling
     'omp_unset_nested_lock'.  If the nesting count drops to zero, the
     lock becomes unlocked.  If one ore more threads attempted to set
     the lock before, one of them is chosen to, again, set the lock to
     itself.
d2916 3
a2918 2
_C/C++_:
     _Prototype_:   'void omp_unset_nest_lock(omp_nest_lock_t *lock);'
d2921 5
a2925 2
     _Interface_:   'subroutine omp_unset_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d2928 2
a2929 1
     *note omp_set_nest_lock::
d2932 1
a2932 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.5.
d2935 1
a2935 1
File: libgomp.info,  Node: omp_destroy_nest_lock,  Next: omp_get_wtick,  Prev: omp_unset_nest_lock,  Up: Runtime Library Routines
d2937 2
a2938 2
3.46 'omp_destroy_nest_lock' - Destroy nested lock
==================================================
d2941 22
a2962 3
     Destroy a nested lock.  In order to be destroyed, a nested lock
     must be in the unlocked state and its nesting count must equal
     zero.
d2964 3
a2966 2
_C/C++_:
     _Prototype_:   'void omp_destroy_nest_lock(omp_nest_lock_t *);'
d2969 7
a2975 2
     _Interface_:   'subroutine omp_destroy_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d2978 3
a2980 1
     *note omp_init_lock::
d2983 1
a2983 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.3.
d2986 1
a2986 1
File: libgomp.info,  Node: omp_get_wtick,  Next: omp_get_wtime,  Prev: omp_destroy_nest_lock,  Up: Runtime Library Routines
d2988 2
a2989 2
3.47 'omp_get_wtick' - Get timer precision
==========================================
d2992 27
a3018 2
     Gets the timer precision, i.e., the number of seconds between two
     successive clock ticks.
d3020 3
a3022 2
_C/C++_:
     _Prototype_:   'double omp_get_wtick(void);'
d3025 7
a3031 1
     _Interface_:   'double precision function omp_get_wtick()'
d3034 3
a3036 1
     *note omp_get_wtime::
d3039 1
a3039 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.4.2.
d3042 1
a3042 1
File: libgomp.info,  Node: omp_get_wtime,  Next: omp_fulfill_event,  Prev: omp_get_wtick,  Up: Runtime Library Routines
d3044 2
a3045 2
3.48 'omp_get_wtime' - Elapsed wall clock time
==============================================
d3048 41
a3088 5
     Elapsed wall clock time in seconds.  The time is measured per
     thread, no guarantee can be made that two distinct threads measure
     the same time.  Time is measured from some "time in the past",
     which is an arbitrary time guaranteed not to change during the
     execution of the program.
d3090 5
a3094 2
_C/C++_:
     _Prototype_:   'double omp_get_wtime(void);'
d3097 8
a3104 1
     _Interface_:   'double precision function omp_get_wtime()'
d3107 3
a3109 1
     *note omp_get_wtick::
d3112 14
a3125 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.4.1.
d3128 1
a3128 1
File: libgomp.info,  Node: omp_fulfill_event,  Prev: omp_get_wtime,  Up: Runtime Library Routines
d3130 2
a3131 2
3.49 'omp_fulfill_event' - Fulfill and destroy an OpenMP event
==============================================================
d3134 30
a3163 4
     Fulfill the event associated with the event handle argument.
     Currently, it is only used to fulfill events generated by detach
     clauses on task constructs - the effect of fulfilling the event is
     to allow the task to complete.
d3165 2
a3166 4
     The result of calling 'omp_fulfill_event' with an event handle
     other than that generated by a detach clause is undefined.  Calling
     it with an event handle that has already been fulfilled is also
     undefined.
d3169 1
a3169 1
     _Prototype_:   'void omp_fulfill_event(omp_event_handle_t event);'
d3172 19
a3190 2
     _Interface_:   'subroutine omp_fulfill_event(event)'
                    'integer (kind=omp_event_handle_kind) :: event'
d3193 1
a3193 1
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.5.1.
d3202 15
a3216 2
section 4 of the OpenMP specification in version 4.5, while those
beginning with 'GOMP_' are GNU extensions.
d3220 2
d3223 1
d3236 1
a3236 1
* OMP_TARGET_OFFLOAD::      Controls offloading behaviour
d3247 139
a3385 1
File: libgomp.info,  Node: OMP_CANCELLATION,  Next: OMP_DISPLAY_ENV,  Up: Environment Variables
d3387 1
a3387 1
4.1 'OMP_CANCELLATION' - Set whether cancellation is activated
d3390 2
d3404 21
a3424 1
File: libgomp.info,  Node: OMP_DISPLAY_ENV,  Next: OMP_DEFAULT_DEVICE,  Prev: OMP_CANCELLATION,  Up: Environment Variables
d3426 1
a3426 1
4.2 'OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
d3429 2
d3432 9
a3440 5
     If set to 'TRUE', the OpenMP version number and the values
     associated with the OpenMP environment variables are printed to
     'stderr'.  If set to 'VERBOSE', it additionally shows the value of
     the environment variables which are GNU extensions.  If undefined
     or set to 'FALSE', this information will not be shown.
d3448 1
a3448 1
4.3 'OMP_DEFAULT_DEVICE' - Set the device used in target regions
d3451 2
d3458 4
a3461 1
     executed on the host.  If unset, device number 0 will be used.
d3465 1
d3468 1
a3468 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.13
d3473 1
a3473 1
4.4 'OMP_DYNAMIC' - Dynamic adjustment of threads
d3476 2
d3493 1
a3493 1
4.5 'OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d3496 2
d3504 2
a3505 2
     parallel regions will be initialized to the largest number
     supported, otherwise it will be set to one.
d3508 2
a3509 1
     *note omp_set_max_active_levels::, *note OMP_NESTED::
d3517 1
a3517 1
4.6 'OMP_MAX_TASK_PRIORITY' - Set the maximum priority
d3521 2
d3538 2
a3539 2
4.7 'OMP_NESTED' - Nested parallel regions
==========================================
d3541 2
d3547 10
a3556 7
     the number of maximum active nested regions supported will by
     default be set to the maximum supported, otherwise it will be set
     to one.  If 'OMP_MAX_ACTIVE_LEVELS' is defined, its setting will
     override this setting.  If both are undefined, nested parallel
     regions are enabled if 'OMP_NUM_THREADS' or 'OMP_PROC_BINDS' are
     defined to a list with more than one item, otherwise they are
     disabled by default.
d3559 2
a3560 1
     *note omp_set_max_active_levels::, *note omp_set_nested::
d3568 2
a3569 2
4.8 'OMP_NUM_TEAMS' - Specifies the number of teams to use by teams region
==========================================================================
d3571 2
d3588 2
a3589 2
4.9 'OMP_NUM_THREADS' - Specifies the number of threads to use
==============================================================
d3591 2
d3598 6
a3603 2
     in the list will automatically enable nesting by default.  If
     undefined one thread per CPU is used.
d3606 1
a3606 1
     *note omp_set_num_threads::, *note OMP_NESTED::
d3614 1
a3614 1
4.10 'OMP_PROC_BIND' - Whether threads may be moved between CPUs
d3617 2
d3629 5
a3633 2
     is used.  Specifying more than one item in the list will
     automatically enable nesting by default.
d3640 1
a3640 1
     OMP_NESTED::, *note OMP_PLACES::
d3648 1
a3648 1
4.11 'OMP_PLACES' - Specifies on which CPUs the threads should be placed
d3651 2
d3681 1
a3681 1
     intervals) will exclude those hardware threads.
d3701 1
a3701 1
4.12 'OMP_STACKSIZE' - Set default thread stack size
d3704 2
d3716 3
d3725 1
a3725 1
4.13 'OMP_SCHEDULE' - How threads are scheduled
d3728 2
d3747 2
a3748 2
4.14 'OMP_TARGET_OFFLOAD' - Controls offloading behaviour
=========================================================
d3750 2
d3753 1
a3753 1
     Specifies the behaviour with regard to offloading code to a device.
d3757 9
a3765 6
     If set to 'MANDATORY', the program will terminate with an error if
     the offload device is not present or is not supported.  If set to
     'DISABLED', then offloading is disabled and all code will run on
     the host.  If set to 'DEFAULT', the program will try offloading to
     the device first, then fall back to running code on the host if it
     cannot.
d3767 8
a3774 1
     If undefined, then the program will behave as if 'DEFAULT' was set.
d3777 1
a3777 1
     OpenMP specification v5.0 (https://www.openmp.org), Section 6.17
d3782 1
a3782 1
4.15 'OMP_TEAMS_THREAD_LIMIT' - Set the maximum number of threads imposed by teams
d3785 2
d3803 1
a3803 1
4.16 'OMP_THREAD_LIMIT' - Set the maximum number of threads
d3806 2
d3822 1
a3822 1
4.17 'OMP_WAIT_POLICY' - How waiting threads are handled
d3841 1
a3841 1
4.18 'GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d3850 4
a3853 4
     'GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
     to CPU 0, the second to CPU 3, the third to CPU 1, the fourth to
     CPU 2, the fifth to CPU 4, the sixth through tenth to CPUs 6, 8,
     10, 12, and 14 respectively and then start assigning back from the
d3868 1
a3868 2
     'FALSE', the host system will handle the assignment of threads to
     CPUs.
d3876 1
a3876 1
4.19 'GOMP_DEBUG' - Enable debugging output
d3883 1
a3883 1
     If enabled, some debugging output will be printed during execution.
d3890 1
a3890 1
4.20 'GOMP_STACKSIZE' - Set default thread stack size
d3912 1
a3912 1
4.21 'GOMP_SPINCOUNT' - Set the busy-wait spin count
d3936 1
a3936 1
4.22 'GOMP_RTEMS_THREAD_POOLS' - Set the RTEMS specific thread pools
d3949 5
a3953 5
          case a priority value is omitted, then a worker thread will
          inherit the priority of the OpenMP primary thread that created
          it.  The priority of the worker thread is not changed after
          creation, even if a new OpenMP primary thread using the worker
          has a different priority.
d3958 3
a3960 3
     instance will use its own dynamically allocated thread pool.  To
     limit the worker thread count of the thread pools, each OpenMP
     primary thread must call 'omp_set_num_threads'.
d3980 5
a3984 6
OpenACC directive '#pragma acc' in C/C++ and '!$acc' directives in free
form, 'c$acc', '*$acc' and '!$acc' directives in fixed form, '!$'
conditional compilation sentinels in free form and 'c$', '*$' and '!$'
sentinels in fixed form, for Fortran.  The flag also arranges for
automatic linking of the OpenACC runtime library (*note OpenACC Runtime
Library Routines::).
d4210 2
a4211 2
     'acc_device_property' will continue to be provided, but might be
     removed in a future version of GCC.
d4244 4
a4247 4
     specified in ARG.  In C/C++, a non-zero value will be returned to
     indicate the specified asynchronous operation has completed.  While
     Fortran will return a 'true'.  If the asynchronous operation has
     not completed, C/C++ returns a zero and Fortran returns a 'false'.
d4269 4
a4272 4
     In C/C++, a non-zero value will be returned to indicate all
     asynchronous operations have completed.  While Fortran will return
     a 'true'.  If any asynchronous operation has not completed, C/C++
     returns a zero and Fortran returns a 'false'.
d4434 3
a4436 3
     specified device type.  In Fortran, 'true' will be returned.  If
     the program is not executing on the specified device type C/C++
     will return a zero, while Fortran will return 'false'.
d4457 2
a4458 2
     This function allocates LEN bytes of device memory.  It returns the
     device address of the allocated memory.
d4461 5
a4465 1
     _Prototype_:   'd_void* acc_malloc(size_t len);'
d4469 2
a4470 1
     3.2.18.
d4479 2
a4480 1
     Free previously allocated device memory at the device address 'a'.
d4483 5
a4487 1
     _Prototype_:   'acc_free(d_void *a);'
d4491 2
a4492 1
     3.2.19.
d4540 3
a4542 3
     LEN is present or not.  If it is not present, then device memory
     will be allocated and the host memory copied.  The device address
     of the newly allocated device memory is returned.
d4619 3
a4621 3
     LEN is present or not.  If it is not present, then device memory
     will be allocated and mapped to host memory.  In C/C++, the device
     address of the newly allocated device memory is returned.
d4836 3
a4838 2
     The device memory is specified with the device address D.  The host
     memory is specified with the host address H and a length of LEN.
d4841 8
a4848 1
     _Prototype_:   'acc_map_data(h_void *h, d_void *d, size_t len);'
d4852 2
a4853 1
     3.2.26.
d4863 1
a4863 1
     latter specified by H.
d4866 5
a4870 1
     _Prototype_:   'acc_unmap_data(h_void *h);'
d4874 2
a4875 1
     3.2.27.
d4885 1
a4885 1
     the host address specified by H.
d4888 5
a4892 1
     _Prototype_:   'void *acc_deviceptr(h_void *h);'
d4896 2
a4897 1
     3.2.28.
d4907 1
a4907 1
     device address specified by D.
d4910 5
a4914 1
     _Prototype_:   'void *acc_hostptr(d_void *d);'
d4918 2
a4919 1
     3.2.29.
d4964 19
a4982 7
     This function copies host memory specified by host address of SRC
     to device memory specified by the device address DEST for a length
     of BYTES bytes.

_C/C++_:
     _Prototype_:   'acc_memcpy_to_device(d_void *dest, h_void *src, size_t
                    bytes);'
d4986 2
a4987 1
     3.2.31.
d4996 21
a5016 7
     This function copies host memory specified by host address of SRC
     from device memory specified by the device address DEST for a
     length of BYTES bytes.

_C/C++_:
     _Prototype_:   'acc_memcpy_from_device(d_void *dest, h_void *src,
                    size_t bytes);'
d5020 2
a5021 1
     3.2.32.
d5034 2
a5035 2
     _Prototype_:   'acc_attach(h_void **ptr);'
     _Prototype_:   'acc_attach_async(h_void **ptr, int async);'
d5052 5
a5056 4
     _Prototype_:   'acc_detach(h_void **ptr);'
     _Prototype_:   'acc_detach_async(h_void **ptr, int async);'
     _Prototype_:   'acc_detach_finalize(h_void **ptr);'
     _Prototype_:   'acc_detach_finalize_async(h_void **ptr, int async);'
d5220 1
a5220 2
version 2.6.  The variable 'GCC_ACC_NOTIFY' is used for diagnostic
purposes.
a5226 1
* GCC_ACC_NOTIFY::
d5234 9
d5252 4
d5260 1
a5260 1
File: libgomp.info,  Node: ACC_PROFLIB,  Next: GCC_ACC_NOTIFY,  Prev: ACC_DEVICE_NUM,  Up: OpenACC Environment Variables
d5265 6
a5277 9
File: libgomp.info,  Node: GCC_ACC_NOTIFY,  Prev: ACC_PROFLIB,  Up: OpenACC Environment Variables

7.4 'GCC_ACC_NOTIFY'
====================

_Description_:
     Print debug information pertaining to the accelerator.


d5307 7
a5313 7
the CUDA stream will be maintained for the lifetime of the program.
However, this association can be changed through the use of the library
function 'acc_set_cuda_stream'.  When the function 'acc_set_cuda_stream'
is called, the CUDA stream that was originally associated with the
'async' clause will be destroyed.  Caution should be taken when changing
the association as subsequent references to the 'async-argument' refer
to a different CUDA stream.
d5361 2
a5362 2
'cublasCreate()'.  In other words, both libraries will be sharing the
same context.
d5390 1
a5390 1
specificially, the function 'acc_set_device_num()'.
d5399 1
a5399 1
environment variables and these will be discussed in the next section.
d5408 2
a5409 2
since the device has already been allocated, 'cublasCreate()' will only
initialize the CUBLAS library and allocate the appropriate hardware
d5485 1
a5485 1
File: libgomp.info,  Node: OpenACC Profiling Interface,  Next: The libgomp ABI,  Prev: OpenACC Library Interoperability,  Up: Top
d5503 3
a5505 4
performance will be impacted to some degree once the Profiling Interface
has gotten enabled: for example, because of the _runtime_ (libgomp)
calling into a third-party _library_ for every event that has been
registered.
d5521 1
a5521 1
'acc_prof_lookup' will always return 'NULL'.
d5536 1
a5536 1
     this implementation, the value will generally correspond to the
d5542 3
a5544 3
          'if' clause with _false_ argument, this will still refer to
          the offloading device type.  It's not clear if that's the
          expected behavior.
d5560 2
a5561 3
          execution/'acc_device_host' it will always be
          'acc_async_sync'.  It's not clear if that's the expected
          behavior.
d5564 1
a5564 1
          it will always be 'acc_async_sync'.  It's not clear if that's
d5569 1
a5569 1
     This will always have the same value as 'acc_prof_info.async'.
d5735 312
a6046 1
File: libgomp.info,  Node: The libgomp ABI,  Next: Reporting Bugs,  Prev: OpenACC Profiling Interface,  Up: Top
d6048 1
a6048 1
11 The libgomp ABI
d6075 1
a6075 1
11.1 Implementing MASTER construct
d6088 1
a6088 1
11.2 Implementing CRITICAL construct
d6110 1
a6110 1
11.3 Implementing ATOMIC construct
d6126 1
a6126 1
11.4 Implementing FLUSH construct
d6134 1
a6134 1
11.5 Implementing BARRIER construct
d6142 1
a6142 1
11.6 Implementing THREADPRIVATE construct
d6157 1
a6157 1
11.7 Implementing PRIVATE clause
d6171 1
a6171 1
11.8 Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses
d6209 1
a6209 1
11.9 Implementing REDUCTION clause
d6221 1
a6221 1
11.10 Implementing PARALLEL construct
d6265 1
a6265 1
11.11 Implementing FOR construct
d6327 1
a6327 1
11.12 Implementing ORDERED construct
d6336 1
a6336 1
11.13 Implementing SECTIONS construct
d6371 1
a6371 1
11.14 Implementing SINGLE construct
d6408 1
a6408 1
11.15 Implementing OpenACC's PARALLEL construct
d6416 1
a6416 1
12 Reporting Bugs
d6432 1
a6432 1
     Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
d7149 1
a7149 1
     <https://fsf.org/>
d7683 18
a7700 15
* Environment Variable:                  OMP_CANCELLATION.      (line 6)
* Environment Variable <1>:              OMP_DISPLAY_ENV.       (line 6)
* Environment Variable <2>:              OMP_DEFAULT_DEVICE.    (line 6)
* Environment Variable <3>:              OMP_DYNAMIC.           (line 6)
* Environment Variable <4>:              OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable <5>:              OMP_MAX_TASK_PRIORITY. (line 6)
* Environment Variable <6>:              OMP_NESTED.            (line 6)
* Environment Variable <7>:              OMP_NUM_TEAMS.         (line 6)
* Environment Variable <8>:              OMP_NUM_THREADS.       (line 6)
* Environment Variable <9>:              OMP_PROC_BIND.         (line 6)
* Environment Variable <10>:             OMP_PLACES.            (line 6)
* Environment Variable <11>:             OMP_STACKSIZE.         (line 6)
* Environment Variable <12>:             OMP_SCHEDULE.          (line 6)
* Environment Variable <13>:             OMP_TARGET_OFFLOAD.    (line 6)
* Environment Variable <14>:             OMP_TEAMS_THREAD_LIMIT.
d7702 7
a7708 7
* Environment Variable <15>:             OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <16>:             OMP_WAIT_POLICY.       (line 6)
* Environment Variable <17>:             GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <18>:             GOMP_DEBUG.            (line 6)
* Environment Variable <19>:             GOMP_STACKSIZE.        (line 6)
* Environment Variable <20>:             GOMP_SPINCOUNT.        (line 6)
* Environment Variable <21>:             GOMP_RTEMS_THREAD_POOLS.
d7720 2
d7728 204
a7931 154
Node: Enabling OpenMP4713
Node: OpenMP Implementation Status5519
Node: OpenMP 4.56074
Node: OpenMP 5.06250
Node: OpenMP 5.111120
Node: Runtime Library Routines14711
Node: omp_get_active_level18416
Node: omp_get_ancestor_thread_num19116
Node: omp_get_cancellation20046
Node: omp_get_default_device20860
Node: omp_get_device_num21539
Node: omp_get_dynamic22344
Node: omp_get_initial_device23224
Node: omp_get_level23968
Node: omp_get_max_active_levels24595
Node: omp_get_max_task_priority25316
Node: omp_get_max_teams25936
Node: omp_get_max_threads26630
Node: omp_get_nested27381
Node: omp_get_num_devices28989
Node: omp_get_num_procs29510
Node: omp_get_num_teams30049
Node: omp_get_num_threads30565
Node: omp_get_proc_bind31654
Node: omp_get_schedule32677
Node: omp_get_supported_active_levels33646
Node: omp_get_team_num34432
Node: omp_get_team_size34946
Node: omp_get_teams_thread_limit35912
Node: omp_get_thread_limit36674
Node: omp_get_thread_num37302
Node: omp_in_parallel38174
Node: omp_in_final38823
Node: omp_is_initial_device39497
Node: omp_set_default_device40190
Node: omp_set_dynamic40981
Node: omp_set_max_active_levels41867
Node: omp_set_nested42789
Node: omp_set_num_teams43984
Node: omp_set_num_threads44857
Node: omp_set_schedule45728
Node: omp_set_teams_thread_limit46822
Node: omp_init_lock47824
Node: omp_set_lock48487
Node: omp_test_lock49342
Node: omp_unset_lock50318
Node: omp_destroy_lock51249
Node: omp_init_nest_lock51926
Node: omp_set_nest_lock52661
Node: omp_test_nest_lock53576
Node: omp_unset_nest_lock54603
Node: omp_destroy_nest_lock55618
Node: omp_get_wtick56369
Node: omp_get_wtime56961
Node: omp_fulfill_event57763
Node: Environment Variables58784
Node: OMP_CANCELLATION60573
Node: OMP_DISPLAY_ENV61106
Node: OMP_DEFAULT_DEVICE61809
Node: OMP_DYNAMIC62589
Node: OMP_MAX_ACTIVE_LEVELS63185
Node: OMP_MAX_TASK_PRIORITY64112
Node: OMP_NESTED64770
Node: OMP_NUM_TEAMS65797
Node: OMP_NUM_THREADS66470
Node: OMP_PROC_BIND67275
Node: OMP_PLACES68617
Node: OMP_STACKSIZE71306
Node: OMP_SCHEDULE72130
Node: OMP_TARGET_OFFLOAD72830
Node: OMP_TEAMS_THREAD_LIMIT73792
Node: OMP_THREAD_LIMIT74599
Node: OMP_WAIT_POLICY75209
Node: GOMP_CPU_AFFINITY75901
Node: GOMP_DEBUG77631
Node: GOMP_STACKSIZE78138
Node: GOMP_SPINCOUNT78969
Node: GOMP_RTEMS_THREAD_POOLS80173
Node: Enabling OpenACC82356
Node: OpenACC Runtime Library Routines83257
Node: acc_get_num_devices87538
Node: acc_set_device_type88264
Node: acc_get_device_type89028
Node: acc_set_device_num90041
Node: acc_get_device_num90858
Node: acc_get_property91657
Node: acc_async_test93880
Node: acc_async_test_all94868
Node: acc_wait95768
Node: acc_wait_all96631
Node: acc_wait_all_async97392
Node: acc_wait_async98144
Node: acc_init98852
Node: acc_shutdown99497
Node: acc_on_device100164
Node: acc_malloc101168
Node: acc_free101667
Node: acc_copyin102094
Node: acc_present_or_copyin103681
Node: acc_create105459
Node: acc_present_or_create107091
Node: acc_copyout108877
Node: acc_delete111181
Node: acc_update_device113428
Node: acc_update_self115002
Node: acc_map_data116592
Node: acc_unmap_data117277
Node: acc_deviceptr117798
Node: acc_hostptr118368
Node: acc_is_present118932
Node: acc_memcpy_to_device120459
Node: acc_memcpy_from_device121122
Node: acc_attach121789
Node: acc_detach122436
Node: acc_get_current_cuda_device123215
Node: acc_get_current_cuda_context123800
Node: acc_get_cuda_stream124400
Node: acc_set_cuda_stream124991
Node: acc_prof_register125662
Node: acc_prof_unregister126221
Node: acc_prof_lookup126788
Node: acc_register_library127309
Node: OpenACC Environment Variables127875
Node: ACC_DEVICE_TYPE128447
Node: ACC_DEVICE_NUM128683
Node: ACC_PROFLIB128937
Node: GCC_ACC_NOTIFY129268
Node: CUDA Streams Usage129488
Ref: CUDA Streams Usage-Footnote-1131389
Node: OpenACC Library Interoperability131498
Ref: OpenACC Library Interoperability-Footnote-1137866
Ref: OpenACC Library Interoperability-Footnote-2138118
Node: OpenACC Profiling Interface138326
Node: The libgomp ABI148354
Node: Implementing MASTER construct149207
Node: Implementing CRITICAL construct149624
Node: Implementing ATOMIC construct150365
Node: Implementing FLUSH construct150848
Node: Implementing BARRIER construct151121
Node: Implementing THREADPRIVATE construct151392
Node: Implementing PRIVATE clause152047
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses152630
Node: Implementing REDUCTION clause153956
Node: Implementing PARALLEL construct154516
Node: Implementing FOR construct155775
Node: Implementing ORDERED construct157775
Node: Implementing SECTIONS construct158083
Node: Implementing SINGLE construct158851
Node: Implementing OpenACC's PARALLEL construct159565
Node: Reporting Bugs159825
Node: Copying160188
Node: GNU Free Documentation License197737
Node: Funding222862
Node: Library Index225388
@


1.17
log
@merge GCC 12.4.0.
@
text
@d1 1
a1 1
This is libgomp.info, produced by makeinfo version 6.8 from
d57 1
a57 1
File: libgomp.info,  Node: Top,  Next: Enabling OpenMP,  Up: (dir)
d5532 154
a5685 154
Node: Enabling OpenMP4725
Node: OpenMP Implementation Status5531
Node: OpenMP 4.56086
Node: OpenMP 5.06262
Node: OpenMP 5.111132
Node: Runtime Library Routines14723
Node: omp_get_active_level18428
Node: omp_get_ancestor_thread_num19128
Node: omp_get_cancellation20058
Node: omp_get_default_device20872
Node: omp_get_device_num21551
Node: omp_get_dynamic22356
Node: omp_get_initial_device23236
Node: omp_get_level23980
Node: omp_get_max_active_levels24607
Node: omp_get_max_task_priority25328
Node: omp_get_max_teams25948
Node: omp_get_max_threads26642
Node: omp_get_nested27393
Node: omp_get_num_devices29001
Node: omp_get_num_procs29522
Node: omp_get_num_teams30061
Node: omp_get_num_threads30577
Node: omp_get_proc_bind31666
Node: omp_get_schedule32689
Node: omp_get_supported_active_levels33658
Node: omp_get_team_num34444
Node: omp_get_team_size34958
Node: omp_get_teams_thread_limit35924
Node: omp_get_thread_limit36686
Node: omp_get_thread_num37314
Node: omp_in_parallel38186
Node: omp_in_final38835
Node: omp_is_initial_device39509
Node: omp_set_default_device40202
Node: omp_set_dynamic40993
Node: omp_set_max_active_levels41879
Node: omp_set_nested42801
Node: omp_set_num_teams43996
Node: omp_set_num_threads44869
Node: omp_set_schedule45740
Node: omp_set_teams_thread_limit46834
Node: omp_init_lock47836
Node: omp_set_lock48499
Node: omp_test_lock49354
Node: omp_unset_lock50330
Node: omp_destroy_lock51261
Node: omp_init_nest_lock51938
Node: omp_set_nest_lock52673
Node: omp_test_nest_lock53588
Node: omp_unset_nest_lock54615
Node: omp_destroy_nest_lock55630
Node: omp_get_wtick56381
Node: omp_get_wtime56973
Node: omp_fulfill_event57775
Node: Environment Variables58796
Node: OMP_CANCELLATION60585
Node: OMP_DISPLAY_ENV61118
Node: OMP_DEFAULT_DEVICE61821
Node: OMP_DYNAMIC62601
Node: OMP_MAX_ACTIVE_LEVELS63197
Node: OMP_MAX_TASK_PRIORITY64124
Node: OMP_NESTED64782
Node: OMP_NUM_TEAMS65809
Node: OMP_NUM_THREADS66482
Node: OMP_PROC_BIND67287
Node: OMP_PLACES68629
Node: OMP_STACKSIZE71318
Node: OMP_SCHEDULE72142
Node: OMP_TARGET_OFFLOAD72842
Node: OMP_TEAMS_THREAD_LIMIT73804
Node: OMP_THREAD_LIMIT74611
Node: OMP_WAIT_POLICY75221
Node: GOMP_CPU_AFFINITY75913
Node: GOMP_DEBUG77643
Node: GOMP_STACKSIZE78150
Node: GOMP_SPINCOUNT78981
Node: GOMP_RTEMS_THREAD_POOLS80185
Node: Enabling OpenACC82368
Node: OpenACC Runtime Library Routines83269
Node: acc_get_num_devices87550
Node: acc_set_device_type88276
Node: acc_get_device_type89040
Node: acc_set_device_num90053
Node: acc_get_device_num90870
Node: acc_get_property91669
Node: acc_async_test93892
Node: acc_async_test_all94880
Node: acc_wait95780
Node: acc_wait_all96643
Node: acc_wait_all_async97404
Node: acc_wait_async98156
Node: acc_init98864
Node: acc_shutdown99509
Node: acc_on_device100176
Node: acc_malloc101180
Node: acc_free101679
Node: acc_copyin102106
Node: acc_present_or_copyin103693
Node: acc_create105471
Node: acc_present_or_create107103
Node: acc_copyout108889
Node: acc_delete111193
Node: acc_update_device113440
Node: acc_update_self115014
Node: acc_map_data116604
Node: acc_unmap_data117289
Node: acc_deviceptr117810
Node: acc_hostptr118380
Node: acc_is_present118944
Node: acc_memcpy_to_device120471
Node: acc_memcpy_from_device121134
Node: acc_attach121801
Node: acc_detach122448
Node: acc_get_current_cuda_device123227
Node: acc_get_current_cuda_context123812
Node: acc_get_cuda_stream124412
Node: acc_set_cuda_stream125003
Node: acc_prof_register125674
Node: acc_prof_unregister126233
Node: acc_prof_lookup126800
Node: acc_register_library127321
Node: OpenACC Environment Variables127887
Node: ACC_DEVICE_TYPE128459
Node: ACC_DEVICE_NUM128695
Node: ACC_PROFLIB128949
Node: GCC_ACC_NOTIFY129280
Node: CUDA Streams Usage129500
Ref: CUDA Streams Usage-Footnote-1131401
Node: OpenACC Library Interoperability131510
Ref: OpenACC Library Interoperability-Footnote-1137878
Ref: OpenACC Library Interoperability-Footnote-2138130
Node: OpenACC Profiling Interface138338
Node: The libgomp ABI148366
Node: Implementing MASTER construct149219
Node: Implementing CRITICAL construct149636
Node: Implementing ATOMIC construct150377
Node: Implementing FLUSH construct150860
Node: Implementing BARRIER construct151133
Node: Implementing THREADPRIVATE construct151404
Node: Implementing PRIVATE clause152059
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses152642
Node: Implementing REDUCTION clause153968
Node: Implementing PARALLEL construct154528
Node: Implementing FOR construct155787
Node: Implementing ORDERED construct157787
Node: Implementing SECTIONS construct158095
Node: Implementing SINGLE construct158863
Node: Implementing OpenACC's PARALLEL construct159577
Node: Reporting Bugs159837
Node: Copying160200
Node: GNU Free Documentation License197749
Node: Funding222874
Node: Library Index225400
a5687 5


Local Variables:
coding: utf-8
End:
@


1.16
log
@initial merge of GCC 12.3.0.

this doesn't include any of the changes to the .c -> .cc files renamed,
and reverts our local changes to the vax port and libsanitizer subdir.
vax GCC was rewritten and our local fixes no longer are relevant, and
the new libsanitizer is more updated than our old one, and merging via
gcc10->gcc12 is not really possible.

unfortunately, our local changes to libsanitizer that aren't related
to the general update of those sources (ie, the netbsd code) will need
to be re-checked and perhaps re-ported.
@
text
@d1 1
a1 1
This is libgomp.info, produced by makeinfo version 6.5 from
d57 1
a57 1
File: libgomp.info,  Node: Top,  Next: Enabling OpenMP
d5532 154
a5685 154
Node: Enabling OpenMP4713
Node: OpenMP Implementation Status5519
Node: OpenMP 4.56074
Node: OpenMP 5.06250
Node: OpenMP 5.111120
Node: Runtime Library Routines14711
Node: omp_get_active_level18416
Node: omp_get_ancestor_thread_num19116
Node: omp_get_cancellation20046
Node: omp_get_default_device20860
Node: omp_get_device_num21539
Node: omp_get_dynamic22344
Node: omp_get_initial_device23224
Node: omp_get_level23968
Node: omp_get_max_active_levels24595
Node: omp_get_max_task_priority25316
Node: omp_get_max_teams25936
Node: omp_get_max_threads26630
Node: omp_get_nested27381
Node: omp_get_num_devices28989
Node: omp_get_num_procs29510
Node: omp_get_num_teams30049
Node: omp_get_num_threads30565
Node: omp_get_proc_bind31654
Node: omp_get_schedule32677
Node: omp_get_supported_active_levels33646
Node: omp_get_team_num34432
Node: omp_get_team_size34946
Node: omp_get_teams_thread_limit35912
Node: omp_get_thread_limit36674
Node: omp_get_thread_num37302
Node: omp_in_parallel38174
Node: omp_in_final38823
Node: omp_is_initial_device39497
Node: omp_set_default_device40190
Node: omp_set_dynamic40981
Node: omp_set_max_active_levels41867
Node: omp_set_nested42789
Node: omp_set_num_teams43984
Node: omp_set_num_threads44857
Node: omp_set_schedule45728
Node: omp_set_teams_thread_limit46822
Node: omp_init_lock47824
Node: omp_set_lock48487
Node: omp_test_lock49342
Node: omp_unset_lock50318
Node: omp_destroy_lock51249
Node: omp_init_nest_lock51926
Node: omp_set_nest_lock52661
Node: omp_test_nest_lock53576
Node: omp_unset_nest_lock54603
Node: omp_destroy_nest_lock55618
Node: omp_get_wtick56369
Node: omp_get_wtime56961
Node: omp_fulfill_event57763
Node: Environment Variables58784
Node: OMP_CANCELLATION60573
Node: OMP_DISPLAY_ENV61106
Node: OMP_DEFAULT_DEVICE61809
Node: OMP_DYNAMIC62589
Node: OMP_MAX_ACTIVE_LEVELS63185
Node: OMP_MAX_TASK_PRIORITY64112
Node: OMP_NESTED64770
Node: OMP_NUM_TEAMS65797
Node: OMP_NUM_THREADS66470
Node: OMP_PROC_BIND67275
Node: OMP_PLACES68617
Node: OMP_STACKSIZE71306
Node: OMP_SCHEDULE72130
Node: OMP_TARGET_OFFLOAD72830
Node: OMP_TEAMS_THREAD_LIMIT73792
Node: OMP_THREAD_LIMIT74599
Node: OMP_WAIT_POLICY75209
Node: GOMP_CPU_AFFINITY75901
Node: GOMP_DEBUG77631
Node: GOMP_STACKSIZE78138
Node: GOMP_SPINCOUNT78969
Node: GOMP_RTEMS_THREAD_POOLS80173
Node: Enabling OpenACC82356
Node: OpenACC Runtime Library Routines83257
Node: acc_get_num_devices87538
Node: acc_set_device_type88264
Node: acc_get_device_type89028
Node: acc_set_device_num90041
Node: acc_get_device_num90858
Node: acc_get_property91657
Node: acc_async_test93880
Node: acc_async_test_all94868
Node: acc_wait95768
Node: acc_wait_all96631
Node: acc_wait_all_async97392
Node: acc_wait_async98144
Node: acc_init98852
Node: acc_shutdown99497
Node: acc_on_device100164
Node: acc_malloc101168
Node: acc_free101667
Node: acc_copyin102094
Node: acc_present_or_copyin103681
Node: acc_create105459
Node: acc_present_or_create107091
Node: acc_copyout108877
Node: acc_delete111181
Node: acc_update_device113428
Node: acc_update_self115002
Node: acc_map_data116592
Node: acc_unmap_data117277
Node: acc_deviceptr117798
Node: acc_hostptr118368
Node: acc_is_present118932
Node: acc_memcpy_to_device120459
Node: acc_memcpy_from_device121122
Node: acc_attach121789
Node: acc_detach122436
Node: acc_get_current_cuda_device123215
Node: acc_get_current_cuda_context123800
Node: acc_get_cuda_stream124400
Node: acc_set_cuda_stream124991
Node: acc_prof_register125662
Node: acc_prof_unregister126221
Node: acc_prof_lookup126788
Node: acc_register_library127309
Node: OpenACC Environment Variables127875
Node: ACC_DEVICE_TYPE128447
Node: ACC_DEVICE_NUM128683
Node: ACC_PROFLIB128937
Node: GCC_ACC_NOTIFY129268
Node: CUDA Streams Usage129488
Ref: CUDA Streams Usage-Footnote-1131389
Node: OpenACC Library Interoperability131498
Ref: OpenACC Library Interoperability-Footnote-1137866
Ref: OpenACC Library Interoperability-Footnote-2138118
Node: OpenACC Profiling Interface138326
Node: The libgomp ABI148354
Node: Implementing MASTER construct149207
Node: Implementing CRITICAL construct149624
Node: Implementing ATOMIC construct150365
Node: Implementing FLUSH construct150848
Node: Implementing BARRIER construct151121
Node: Implementing THREADPRIVATE construct151392
Node: Implementing PRIVATE clause152047
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses152630
Node: Implementing REDUCTION clause153956
Node: Implementing PARALLEL construct154516
Node: Implementing FOR construct155775
Node: Implementing ORDERED construct157775
Node: Implementing SECTIONS construct158083
Node: Implementing SINGLE construct158851
Node: Implementing OpenACC's PARALLEL construct159565
Node: Reporting Bugs159825
Node: Copying160188
Node: GNU Free Documentation License197737
Node: Funding222862
Node: Library Index225388
d5688 5
@


1.16.2.1
log
@Sync with HEAD.
@
text
@d1 1
a1 1
This is libgomp.info, produced by makeinfo version 6.8 from
d57 1
a57 1
File: libgomp.info,  Node: Top,  Next: Enabling OpenMP,  Up: (dir)
d5532 154
a5685 154
Node: Enabling OpenMP4725
Node: OpenMP Implementation Status5531
Node: OpenMP 4.56086
Node: OpenMP 5.06262
Node: OpenMP 5.111132
Node: Runtime Library Routines14723
Node: omp_get_active_level18428
Node: omp_get_ancestor_thread_num19128
Node: omp_get_cancellation20058
Node: omp_get_default_device20872
Node: omp_get_device_num21551
Node: omp_get_dynamic22356
Node: omp_get_initial_device23236
Node: omp_get_level23980
Node: omp_get_max_active_levels24607
Node: omp_get_max_task_priority25328
Node: omp_get_max_teams25948
Node: omp_get_max_threads26642
Node: omp_get_nested27393
Node: omp_get_num_devices29001
Node: omp_get_num_procs29522
Node: omp_get_num_teams30061
Node: omp_get_num_threads30577
Node: omp_get_proc_bind31666
Node: omp_get_schedule32689
Node: omp_get_supported_active_levels33658
Node: omp_get_team_num34444
Node: omp_get_team_size34958
Node: omp_get_teams_thread_limit35924
Node: omp_get_thread_limit36686
Node: omp_get_thread_num37314
Node: omp_in_parallel38186
Node: omp_in_final38835
Node: omp_is_initial_device39509
Node: omp_set_default_device40202
Node: omp_set_dynamic40993
Node: omp_set_max_active_levels41879
Node: omp_set_nested42801
Node: omp_set_num_teams43996
Node: omp_set_num_threads44869
Node: omp_set_schedule45740
Node: omp_set_teams_thread_limit46834
Node: omp_init_lock47836
Node: omp_set_lock48499
Node: omp_test_lock49354
Node: omp_unset_lock50330
Node: omp_destroy_lock51261
Node: omp_init_nest_lock51938
Node: omp_set_nest_lock52673
Node: omp_test_nest_lock53588
Node: omp_unset_nest_lock54615
Node: omp_destroy_nest_lock55630
Node: omp_get_wtick56381
Node: omp_get_wtime56973
Node: omp_fulfill_event57775
Node: Environment Variables58796
Node: OMP_CANCELLATION60585
Node: OMP_DISPLAY_ENV61118
Node: OMP_DEFAULT_DEVICE61821
Node: OMP_DYNAMIC62601
Node: OMP_MAX_ACTIVE_LEVELS63197
Node: OMP_MAX_TASK_PRIORITY64124
Node: OMP_NESTED64782
Node: OMP_NUM_TEAMS65809
Node: OMP_NUM_THREADS66482
Node: OMP_PROC_BIND67287
Node: OMP_PLACES68629
Node: OMP_STACKSIZE71318
Node: OMP_SCHEDULE72142
Node: OMP_TARGET_OFFLOAD72842
Node: OMP_TEAMS_THREAD_LIMIT73804
Node: OMP_THREAD_LIMIT74611
Node: OMP_WAIT_POLICY75221
Node: GOMP_CPU_AFFINITY75913
Node: GOMP_DEBUG77643
Node: GOMP_STACKSIZE78150
Node: GOMP_SPINCOUNT78981
Node: GOMP_RTEMS_THREAD_POOLS80185
Node: Enabling OpenACC82368
Node: OpenACC Runtime Library Routines83269
Node: acc_get_num_devices87550
Node: acc_set_device_type88276
Node: acc_get_device_type89040
Node: acc_set_device_num90053
Node: acc_get_device_num90870
Node: acc_get_property91669
Node: acc_async_test93892
Node: acc_async_test_all94880
Node: acc_wait95780
Node: acc_wait_all96643
Node: acc_wait_all_async97404
Node: acc_wait_async98156
Node: acc_init98864
Node: acc_shutdown99509
Node: acc_on_device100176
Node: acc_malloc101180
Node: acc_free101679
Node: acc_copyin102106
Node: acc_present_or_copyin103693
Node: acc_create105471
Node: acc_present_or_create107103
Node: acc_copyout108889
Node: acc_delete111193
Node: acc_update_device113440
Node: acc_update_self115014
Node: acc_map_data116604
Node: acc_unmap_data117289
Node: acc_deviceptr117810
Node: acc_hostptr118380
Node: acc_is_present118944
Node: acc_memcpy_to_device120471
Node: acc_memcpy_from_device121134
Node: acc_attach121801
Node: acc_detach122448
Node: acc_get_current_cuda_device123227
Node: acc_get_current_cuda_context123812
Node: acc_get_cuda_stream124412
Node: acc_set_cuda_stream125003
Node: acc_prof_register125674
Node: acc_prof_unregister126233
Node: acc_prof_lookup126800
Node: acc_register_library127321
Node: OpenACC Environment Variables127887
Node: ACC_DEVICE_TYPE128459
Node: ACC_DEVICE_NUM128695
Node: ACC_PROFLIB128949
Node: GCC_ACC_NOTIFY129280
Node: CUDA Streams Usage129500
Ref: CUDA Streams Usage-Footnote-1131401
Node: OpenACC Library Interoperability131510
Ref: OpenACC Library Interoperability-Footnote-1137878
Ref: OpenACC Library Interoperability-Footnote-2138130
Node: OpenACC Profiling Interface138338
Node: The libgomp ABI148366
Node: Implementing MASTER construct149219
Node: Implementing CRITICAL construct149636
Node: Implementing ATOMIC construct150377
Node: Implementing FLUSH construct150860
Node: Implementing BARRIER construct151133
Node: Implementing THREADPRIVATE construct151404
Node: Implementing PRIVATE clause152059
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses152642
Node: Implementing REDUCTION clause153968
Node: Implementing PARALLEL construct154528
Node: Implementing FOR construct155787
Node: Implementing ORDERED construct157787
Node: Implementing SECTIONS construct158095
Node: Implementing SINGLE construct158863
Node: Implementing OpenACC's PARALLEL construct159577
Node: Reporting Bugs159837
Node: Copying160200
Node: GNU Free Documentation License197749
Node: Funding222874
Node: Library Index225400
a5687 5


Local Variables:
coding: utf-8
End:
@


1.16.2.2
log
@Sync with HEAD
@
text
@d1 1
a1 1
This is libgomp.info, produced by makeinfo version 6.5 from
d57 1
a57 1
File: libgomp.info,  Node: Top,  Next: Enabling OpenMP
d5532 154
a5685 154
Node: Enabling OpenMP4713
Node: OpenMP Implementation Status5519
Node: OpenMP 4.56074
Node: OpenMP 5.06250
Node: OpenMP 5.111120
Node: Runtime Library Routines14711
Node: omp_get_active_level18416
Node: omp_get_ancestor_thread_num19116
Node: omp_get_cancellation20046
Node: omp_get_default_device20860
Node: omp_get_device_num21539
Node: omp_get_dynamic22344
Node: omp_get_initial_device23224
Node: omp_get_level23968
Node: omp_get_max_active_levels24595
Node: omp_get_max_task_priority25316
Node: omp_get_max_teams25936
Node: omp_get_max_threads26630
Node: omp_get_nested27381
Node: omp_get_num_devices28989
Node: omp_get_num_procs29510
Node: omp_get_num_teams30049
Node: omp_get_num_threads30565
Node: omp_get_proc_bind31654
Node: omp_get_schedule32677
Node: omp_get_supported_active_levels33646
Node: omp_get_team_num34432
Node: omp_get_team_size34946
Node: omp_get_teams_thread_limit35912
Node: omp_get_thread_limit36674
Node: omp_get_thread_num37302
Node: omp_in_parallel38174
Node: omp_in_final38823
Node: omp_is_initial_device39497
Node: omp_set_default_device40190
Node: omp_set_dynamic40981
Node: omp_set_max_active_levels41867
Node: omp_set_nested42789
Node: omp_set_num_teams43984
Node: omp_set_num_threads44857
Node: omp_set_schedule45728
Node: omp_set_teams_thread_limit46822
Node: omp_init_lock47824
Node: omp_set_lock48487
Node: omp_test_lock49342
Node: omp_unset_lock50318
Node: omp_destroy_lock51249
Node: omp_init_nest_lock51926
Node: omp_set_nest_lock52661
Node: omp_test_nest_lock53576
Node: omp_unset_nest_lock54603
Node: omp_destroy_nest_lock55618
Node: omp_get_wtick56369
Node: omp_get_wtime56961
Node: omp_fulfill_event57763
Node: Environment Variables58784
Node: OMP_CANCELLATION60573
Node: OMP_DISPLAY_ENV61106
Node: OMP_DEFAULT_DEVICE61809
Node: OMP_DYNAMIC62589
Node: OMP_MAX_ACTIVE_LEVELS63185
Node: OMP_MAX_TASK_PRIORITY64112
Node: OMP_NESTED64770
Node: OMP_NUM_TEAMS65797
Node: OMP_NUM_THREADS66470
Node: OMP_PROC_BIND67275
Node: OMP_PLACES68617
Node: OMP_STACKSIZE71306
Node: OMP_SCHEDULE72130
Node: OMP_TARGET_OFFLOAD72830
Node: OMP_TEAMS_THREAD_LIMIT73792
Node: OMP_THREAD_LIMIT74599
Node: OMP_WAIT_POLICY75209
Node: GOMP_CPU_AFFINITY75901
Node: GOMP_DEBUG77631
Node: GOMP_STACKSIZE78138
Node: GOMP_SPINCOUNT78969
Node: GOMP_RTEMS_THREAD_POOLS80173
Node: Enabling OpenACC82356
Node: OpenACC Runtime Library Routines83257
Node: acc_get_num_devices87538
Node: acc_set_device_type88264
Node: acc_get_device_type89028
Node: acc_set_device_num90041
Node: acc_get_device_num90858
Node: acc_get_property91657
Node: acc_async_test93880
Node: acc_async_test_all94868
Node: acc_wait95768
Node: acc_wait_all96631
Node: acc_wait_all_async97392
Node: acc_wait_async98144
Node: acc_init98852
Node: acc_shutdown99497
Node: acc_on_device100164
Node: acc_malloc101168
Node: acc_free101667
Node: acc_copyin102094
Node: acc_present_or_copyin103681
Node: acc_create105459
Node: acc_present_or_create107091
Node: acc_copyout108877
Node: acc_delete111181
Node: acc_update_device113428
Node: acc_update_self115002
Node: acc_map_data116592
Node: acc_unmap_data117277
Node: acc_deviceptr117798
Node: acc_hostptr118368
Node: acc_is_present118932
Node: acc_memcpy_to_device120459
Node: acc_memcpy_from_device121122
Node: acc_attach121789
Node: acc_detach122436
Node: acc_get_current_cuda_device123215
Node: acc_get_current_cuda_context123800
Node: acc_get_cuda_stream124400
Node: acc_set_cuda_stream124991
Node: acc_prof_register125662
Node: acc_prof_unregister126221
Node: acc_prof_lookup126788
Node: acc_register_library127309
Node: OpenACC Environment Variables127875
Node: ACC_DEVICE_TYPE128447
Node: ACC_DEVICE_NUM128683
Node: ACC_PROFLIB128937
Node: GCC_ACC_NOTIFY129268
Node: CUDA Streams Usage129488
Ref: CUDA Streams Usage-Footnote-1131389
Node: OpenACC Library Interoperability131498
Ref: OpenACC Library Interoperability-Footnote-1137866
Ref: OpenACC Library Interoperability-Footnote-2138118
Node: OpenACC Profiling Interface138326
Node: The libgomp ABI148354
Node: Implementing MASTER construct149207
Node: Implementing CRITICAL construct149624
Node: Implementing ATOMIC construct150365
Node: Implementing FLUSH construct150848
Node: Implementing BARRIER construct151121
Node: Implementing THREADPRIVATE construct151392
Node: Implementing PRIVATE clause152047
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses152630
Node: Implementing REDUCTION clause153956
Node: Implementing PARALLEL construct154516
Node: Implementing FOR construct155775
Node: Implementing ORDERED construct157775
Node: Implementing SECTIONS construct158083
Node: Implementing SINGLE construct158851
Node: Implementing OpenACC's PARALLEL construct159565
Node: Reporting Bugs159825
Node: Copying160188
Node: GNU Free Documentation License197737
Node: Funding222862
Node: Library Index225388
d5688 5
@


1.15
log
@merge GCC 10.5.0.
@
text
@d4 1
a4 1
Copyright (C) 2006-2020 Free Software Foundation, Inc.
d36 1
a36 1
   Copyright (C) 2006-2020 Free Software Foundation, Inc.
d57 1
a57 1
File: libgomp.info,  Node: Top,  Next: Enabling OpenMP,  Up: (dir)
d78 1
d108 1
a108 1
File: libgomp.info,  Node: Enabling OpenMP,  Next: Runtime Library Routines,  Prev: Top,  Up: Top
d121 3
a123 3
   A complete description of all OpenMP directives accepted may be found
in the OpenMP Application Program Interface (https://www.openmp.org)
manual, version 4.5.
d126 1
a126 1
File: libgomp.info,  Node: Runtime Library Routines,  Next: Environment Variables,  Prev: Enabling OpenMP,  Up: Top
d128 239
a366 1
2 OpenMP Runtime Library Routines
d382 1
d384 1
d386 1
a386 1
* omp_get_max_active_levels::   Maximum number of active regions
d388 1
d397 1
d400 1
d410 1
d413 1
d433 4
d440 1
a440 1
2.1 'omp_get_active_level' - Number of parallel regions
d463 1
a463 1
2.2 'omp_get_ancestor_thread_num' - Ancestor thread ID
d489 1
a489 1
2.3 'omp_get_cancellation' - Whether cancellation support is enabled
d511 1
a511 1
File: libgomp.info,  Node: omp_get_default_device,  Next: omp_get_dynamic,  Prev: omp_get_cancellation,  Up: Runtime Library Routines
d513 1
a513 1
2.4 'omp_get_default_device' - Get the default device for target regions
d532 22
a553 1
File: libgomp.info,  Node: omp_get_dynamic,  Next: omp_get_level,  Prev: omp_get_default_device,  Up: Runtime Library Routines
d555 4
a558 1
2.5 'omp_get_dynamic' - Dynamic teams setting
d583 24
a606 1
File: libgomp.info,  Node: omp_get_level,  Next: omp_get_max_active_levels,  Prev: omp_get_dynamic,  Up: Runtime Library Routines
d608 1
a608 1
2.6 'omp_get_level' - Obtain the current nesting level
d630 2
a631 2
2.7 'omp_get_max_active_levels' - Maximum number of active regions
==================================================================
d650 1
a650 1
File: libgomp.info,  Node: omp_get_max_task_priority,  Next: omp_get_max_threads,  Prev: omp_get_max_active_levels,  Up: Runtime Library Routines
d652 2
a653 2
2.8 'omp_get_max_task_priority' - Maximum priority value
========================================================
d670 23
a692 1
File: libgomp.info,  Node: omp_get_max_threads,  Next: omp_get_nested,  Prev: omp_get_max_task_priority,  Up: Runtime Library Routines
d694 2
a695 2
2.9 'omp_get_max_threads' - Maximum number of threads of parallel region
========================================================================
d717 1
a717 1
2.10 'omp_get_nested' - Nested parallel regions
d725 14
a738 4
     Nested parallel regions may be initialized at startup by the
     'OMP_NESTED' environment variable or at runtime using
     'omp_set_nested'.  If undefined, nested parallel regions are
     disabled by default.
d747 2
a748 1
     *note omp_set_nested::, *note OMP_NESTED::
d756 1
a756 1
2.11 'omp_get_num_devices' - Number of target devices
d774 1
a774 1
2.12 'omp_get_num_procs' - Number of processors online
d792 1
a792 1
2.13 'omp_get_num_teams' - Number of teams
d810 1
a810 1
2.14 'omp_get_num_threads' - Size of the active team
d840 1
a840 1
2.15 'omp_get_proc_bind' - Whether threads may be moved between CPUs
d847 3
a849 2
     'omp_proc_bind_master', 'omp_proc_bind_close' and
     'omp_proc_bind_spread'.
d866 1
a866 1
File: libgomp.info,  Node: omp_get_schedule,  Next: omp_get_team_num,  Prev: omp_get_proc_bind,  Up: Runtime Library Routines
d868 1
a868 1
2.16 'omp_get_schedule' - Obtain the runtime scheduling method
d893 11
a903 1
File: libgomp.info,  Node: omp_get_team_num,  Next: omp_get_team_size,  Prev: omp_get_schedule,  Up: Runtime Library Routines
d905 14
a918 1
2.17 'omp_get_team_num' - Get team number
d934 1
a934 1
File: libgomp.info,  Node: omp_get_team_size,  Next: omp_get_thread_limit,  Prev: omp_get_team_num,  Up: Runtime Library Routines
d936 1
a936 1
2.18 'omp_get_team_size' - Number of threads in a team
d961 11
a971 1
File: libgomp.info,  Node: omp_get_thread_limit,  Next: omp_get_thread_num,  Prev: omp_get_team_size,  Up: Runtime Library Routines
d973 13
a985 1
2.19 'omp_get_thread_limit' - Maximum number of threads
d1006 1
a1006 1
2.20 'omp_get_thread_num' - Current thread ID
d1014 1
a1014 1
     master thread of a team is always 0.
d1031 1
a1031 1
2.21 'omp_in_parallel' - Whether a parallel region is active
d1051 1
a1051 1
2.22 'omp_in_final' - Whether in final or included task region
d1071 1
a1071 1
2.23 'omp_is_initial_device' - Whether executing on the host device
d1091 1
a1091 1
2.24 'omp_set_default_device' - Set the default device for target regions
d1114 1
a1114 1
2.25 'omp_set_dynamic' - Enable/disable dynamic teams
d1139 1
a1139 1
2.26 'omp_set_max_active_levels' - Limits the number of active parallel regions
d1144 2
a1145 1
     parallel regions.
d1155 2
a1156 1
     *note omp_get_max_active_levels::, *note omp_get_active_level::
d1162 1
a1162 1
File: libgomp.info,  Node: omp_set_nested,  Next: omp_set_num_threads,  Prev: omp_set_max_active_levels,  Up: Runtime Library Routines
d1164 1
a1164 1
2.27 'omp_set_nested' - Enable/disable nested parallel regions
d1173 5
d1186 2
a1187 1
     *note OMP_NESTED::, *note omp_get_nested::
d1193 12
a1204 1
File: libgomp.info,  Node: omp_set_num_threads,  Next: omp_set_schedule,  Prev: omp_set_nested,  Up: Runtime Library Routines
d1206 15
a1220 1
2.28 'omp_set_num_threads' - Set upper team size limit
d1243 1
a1243 1
File: libgomp.info,  Node: omp_set_schedule,  Next: omp_init_lock,  Prev: omp_set_num_threads,  Up: Runtime Library Routines
d1245 1
a1245 1
2.29 'omp_set_schedule' - Set the runtime scheduling method
d1272 4
a1275 1
File: libgomp.info,  Node: omp_init_lock,  Next: omp_set_lock,  Prev: omp_set_schedule,  Up: Runtime Library Routines
d1277 24
a1300 1
2.30 'omp_init_lock' - Initialize simple lock
d1323 1
a1323 1
2.31 'omp_set_lock' - Wait for and set simple lock
d1349 1
a1349 1
2.32 'omp_test_lock' - Test and set simple lock if available
d1375 1
a1375 1
2.33 'omp_unset_lock' - Unset simple lock
d1402 1
a1402 1
2.34 'omp_destroy_lock' - Destroy simple lock
d1425 1
a1425 1
2.35 'omp_init_nest_lock' - Initialize nested lock
d1448 1
a1448 1
2.36 'omp_set_nest_lock' - Wait for and set nested lock
d1473 1
a1473 1
2.37 'omp_test_nest_lock' - Test and set nested lock if available
d1499 1
a1499 1
2.38 'omp_unset_nest_lock' - Unset nested lock
d1527 1
a1527 1
2.39 'omp_destroy_nest_lock' - Destroy nested lock
d1551 1
a1551 1
2.40 'omp_get_wtick' - Get timer precision
d1571 1
a1571 1
File: libgomp.info,  Node: omp_get_wtime,  Prev: omp_get_wtick,  Up: Runtime Library Routines
d1573 1
a1573 1
2.41 'omp_get_wtime' - Elapsed wall clock time
d1596 27
d1625 1
a1625 1
3 OpenMP Environment Variables
d1641 1
d1647 2
d1660 1
a1660 1
3.1 'OMP_CANCELLATION' - Set whether cancellation is activated
d1677 1
a1677 1
3.2 'OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
d1693 1
a1693 1
3.3 'OMP_DEFAULT_DEVICE' - Set the device used in target regions
d1712 1
a1712 1
3.4 'OMP_DYNAMIC' - Dynamic adjustment of threads
d1730 1
a1730 1
3.5 'OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1736 5
a1740 1
     integer.  If undefined, the number of active levels is unlimited.
d1743 1
a1743 1
     *note omp_set_max_active_levels::
d1751 1
a1751 1
3.6 'OMP_MAX_TASK_PRIORITY' - Set the maximum priority
d1768 1
a1768 1
File: libgomp.info,  Node: OMP_NESTED,  Next: OMP_NUM_THREADS,  Prev: OMP_MAX_TASK_PRIORITY,  Up: Environment Variables
d1770 1
a1770 1
3.7 'OMP_NESTED' - Nested parallel regions
d1776 8
a1783 2
     environment variable shall be 'TRUE' or 'FALSE'.  If undefined,
     nested parallel regions are disabled by default.
d1786 1
a1786 1
     *note omp_set_nested::
d1792 19
a1810 1
File: libgomp.info,  Node: OMP_NUM_THREADS,  Next: OMP_PROC_BIND,  Prev: OMP_NESTED,  Up: Environment Variables
d1812 1
a1812 1
3.8 'OMP_NUM_THREADS' - Specifies the number of threads to use
d1818 4
a1821 3
     positive integers; the value specified the number of threads to use
     for the corresponding nested level.  If undefined one thread per
     CPU is used.
d1824 1
a1824 1
     *note omp_set_num_threads::
d1832 2
a1833 2
3.9 'OMP_PROC_BIND' - Whether threads may be moved between CPUs
===============================================================
d1839 8
a1846 6
     values 'MASTER', 'CLOSE' and 'SPREAD' can be used to specify the
     thread affinity policy for the corresponding nesting level.  With
     'MASTER' the worker threads are in the same place partition as the
     master thread.  With 'CLOSE' those are kept close to the master
     thread in contiguous place partitions.  And with 'SPREAD' a sparse
     distribution across the place partitions is used.
d1852 2
a1853 2
     *note OMP_PLACES::, *note GOMP_CPU_AFFINITY::, *note
     omp_get_proc_bind::
d1861 1
a1861 1
3.10 'OMP_PLACES' - Specifies on which CPUs the threads should be placed
d1867 11
a1877 7
     'threads', 'cores' and 'sockets' can be optionally followed by a
     positive number in parentheses, which denotes the how many places
     shall be created.  With 'threads' each place corresponds to a
     single hardware thread; 'cores' to a single core with the
     corresponding number of hardware threads; and with 'sockets' the
     place corresponds to a single socket.  The resulting placement can
     be shown by setting the 'OMP_DISPLAY_ENV' environment variable.
d1881 16
a1896 11
     nonnegative numbers in curly braces, denoting the denoting the
     hardware threads.  The hardware threads belonging to a place can
     either be specified as comma-separated list of nonnegative thread
     numbers or using an interval.  Multiple places can also be either
     specified by a comma-separated list of places or by an interval.
     To specify an interval, a colon followed by the count is placed
     after after the hardware thread number or the place.  Optionally,
     the length can be followed by a colon and the stride number -
     otherwise a unit stride is assumed.  For instance, the following
     specifies the same places list: '"{0,1,2}, {3,4,6}, {7,8,9},
     {10,11,12}"'; '"{0:3}, {3:3}, {7:3}, {10:3}"'; and '"{0:2}:4:3"'.
d1912 1
a1912 1
3.11 'OMP_STACKSIZE' - Set default thread stack size
d1929 1
a1929 1
File: libgomp.info,  Node: OMP_SCHEDULE,  Next: OMP_THREAD_LIMIT,  Prev: OMP_STACKSIZE,  Up: Environment Variables
d1931 1
a1931 1
3.12 'OMP_SCHEDULE' - How threads are scheduled
d1949 43
a1991 1
File: libgomp.info,  Node: OMP_THREAD_LIMIT,  Next: OMP_WAIT_POLICY,  Prev: OMP_SCHEDULE,  Up: Environment Variables
d1993 1
a1993 1
3.13 'OMP_THREAD_LIMIT' - Set the maximum number of threads
d2010 1
a2010 1
3.14 'OMP_WAIT_POLICY' - How waiting threads are handled
d2029 1
a2029 1
3.15 'GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d2065 1
a2065 1
3.16 'GOMP_DEBUG' - Enable debugging output
d2079 1
a2079 1
3.17 'GOMP_STACKSIZE' - Set default thread stack size
d2101 1
a2101 1
3.18 'GOMP_SPINCOUNT' - Set the busy-wait spin count
d2125 1
a2125 1
3.19 'GOMP_RTEMS_THREAD_POOLS' - Set the RTEMS specific thread pools
d2139 1
a2139 1
          inherit the priority of the OpenMP master thread that created
d2141 1
a2141 1
          creation, even if a new OpenMP master thread using the worker
d2146 4
a2149 4
     instance, then each OpenMP master thread of this scheduler instance
     will use its own dynamically allocated thread pool.  To limit the
     worker thread count of the thread pools, each OpenMP master thread
     must call 'omp_set_num_threads'.
d2157 1
a2157 1
     master thread that created it.  In the scheduler instance 'WRK1'
d2164 1
a2164 1
4 Enabling OpenACC
d2185 1
a2185 1
5 OpenACC Runtime Library Routines
d2265 1
a2265 1
5.1 'acc_get_num_devices' - Get number of devices for given device type
d2286 1
a2286 1
5.2 'acc_set_device_type' - Set type of device accelerator to use.
d2308 1
a2308 1
5.3 'acc_get_device_type' - Get type of device accelerator to be used.
d2335 1
a2335 1
5.4 'acc_set_device_num' - Set device number to use.
d2359 1
a2359 1
5.5 'acc_get_device_num' - Get device number to be used.
d2382 1
a2382 1
5.6 'acc_get_property' - Get device property.
d2429 1
a2429 1
5.7 'acc_async_test' - Test for completion of a specific asynchronous operation.
d2454 1
a2454 1
5.8 'acc_async_test_all' - Tests for completion of all asynchronous operations.
d2478 1
a2478 1
5.9 'acc_wait' - Wait for completion of a specific asynchronous operation.
d2506 1
a2506 1
5.10 'acc_wait_all' - Waits for completion of all asynchronous operations.
d2532 1
a2532 1
5.11 'acc_wait_all_async' - Wait for completion of all asynchronous operations.
d2554 1
a2554 1
5.12 'acc_wait_async' - Wait for completion of asynchronous operations.
d2575 1
a2575 1
5.13 'acc_init' - Initialize runtime for a specific device type.
d2596 1
a2596 1
5.14 'acc_shutdown' - Shuts down the runtime for a specific device type.
d2617 1
a2617 1
5.15 'acc_on_device' - Whether executing on a particular device
d2643 1
a2643 1
5.16 'acc_malloc' - Allocate device memory.
d2660 1
a2660 1
5.17 'acc_free' - Free device memory.
d2676 1
a2676 1
5.18 'acc_copyin' - Allocate device memory and copy host memory to it.
d2714 1
a2714 1
5.19 'acc_present_or_copyin' - If the data is not present on the device, allocate device memory and copy from host memory.
d2754 1
a2754 1
5.20 'acc_create' - Allocate device memory and map it to host memory.
d2793 1
a2793 1
5.21 'acc_present_or_create' - If the data is not present on the device, allocate device memory and map it to host memory.
d2833 1
a2833 1
5.22 'acc_copyout' - Copy device memory to host memory.
d2884 1
a2884 1
5.23 'acc_delete' - Free device memory.
d2935 1
a2935 1
5.24 'acc_update_device' - Update device memory from mapped host memory.
d2972 1
a2972 1
5.25 'acc_update_self' - Update host memory from mapped device memory.
d3010 1
a3010 1
5.26 'acc_map_data' - Map previously allocated device memory to host memory.
d3028 1
a3028 1
5.27 'acc_unmap_data' - Unmap device memory from host memory.
d3045 1
a3045 1
5.28 'acc_deviceptr' - Get device pointer associated with specific host address.
d3062 1
a3062 1
5.29 'acc_hostptr' - Get host pointer associated with specific device address.
d3079 1
a3079 1
5.30 'acc_is_present' - Indicate whether host variable / array is present on device.
d3115 1
a3115 1
5.31 'acc_memcpy_to_device' - Copy host memory to device memory.
d3134 1
a3134 1
5.32 'acc_memcpy_from_device' - Copy device memory to host memory.
d3153 1
a3153 1
5.33 'acc_attach' - Let device pointer point to device-pointer target.
d3171 1
a3171 1
5.34 'acc_detach' - Let device pointer point to host-pointer target.
d3191 1
a3191 1
5.35 'acc_get_current_cuda_device' - Get CUDA device handle.
d3208 1
a3208 1
5.36 'acc_get_current_cuda_context' - Get CUDA context handle.
d3225 1
a3225 1
5.37 'acc_get_cuda_stream' - Get CUDA stream handle.
d3243 1
a3243 1
5.38 'acc_set_cuda_stream' - Set CUDA stream handle.
d3265 1
a3265 1
5.39 'acc_prof_register' - Register callbacks.
d3284 1
a3284 1
5.40 'acc_prof_unregister' - Unregister callbacks.
d3303 1
a3303 1
5.41 'acc_prof_lookup' - Obtain inquiry functions.
d3321 1
a3321 1
5.42 'acc_register_library' - Library registration.
d3340 1
a3340 1
6 OpenACC Environment Variables
d3359 1
a3359 1
6.1 'ACC_DEVICE_TYPE'
d3368 1
a3368 1
6.2 'ACC_DEVICE_NUM'
d3377 1
a3377 1
6.3 'ACC_PROFLIB'
d3389 1
a3389 1
6.4 'GCC_ACC_NOTIFY'
d3398 1
a3398 1
7 CUDA Streams Usage
d3441 1
a3441 1
8 OpenACC Library Interoperability
d3444 1
a3444 1
8.1 Introduction
d3453 1
a3453 1
8.2 First invocation: NVIDIA CUBLAS library API
d3503 1
a3503 1
8.3 First invocation: OpenACC library API
d3573 1
a3573 1
8.4 OpenACC library and environment variables
d3605 2
a3606 2
9 OpenACC Profiling Interface
*****************************
d3608 2
a3609 2
9.1 Implementation Status and Implementation-Defined Behavior
=============================================================
d3777 1
a3777 1
        * Whan a compute construct triggers implicit
d3857 1
a3857 1
10 The libgomp ABI
d3884 1
a3884 1
10.1 Implementing MASTER construct
d3891 1
a3891 1
only include this in the version run by the master thread.  Surely this
d3897 1
a3897 1
10.2 Implementing CRITICAL construct
d3919 1
a3919 1
10.3 Implementing ATOMIC construct
d3935 1
a3935 1
10.4 Implementing FLUSH construct
d3943 1
a3943 1
10.5 Implementing BARRIER construct
d3951 1
a3951 1
10.6 Implementing THREADPRIVATE construct
d3966 1
a3966 1
10.7 Implementing PRIVATE clause
d3980 1
a3980 1
10.8 Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses
d4018 1
a4018 1
10.9 Implementing REDUCTION clause
d4024 1
a4024 1
the barrier, the master thread iterates over the array to collect the
d4030 1
a4030 1
10.10 Implementing PARALLEL construct
d4074 1
a4074 1
10.11 Implementing FOR construct
d4136 1
a4136 1
10.12 Implementing ORDERED construct
d4145 1
a4145 1
10.13 Implementing SECTIONS construct
d4180 1
a4180 1
10.14 Implementing SINGLE construct
d4217 1
a4217 1
10.15 Implementing OpenACC's PARALLEL construct
d4225 1
a4225 1
11 Reporting Bugs
d4241 1
a4241 1
     Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
d4919 1
a4919 1
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
d4940 1
a4940 1
the GNU GPL, see <http://www.gnu.org/licenses/>.
d4958 1
a4958 1
     <http://fsf.org/>
d5355 1
a5355 1
     <http://www.gnu.org/copyleft/>.
d5499 16
a5514 12
* Environment Variable <7>:              OMP_NUM_THREADS.       (line 6)
* Environment Variable <8>:              OMP_PROC_BIND.         (line 6)
* Environment Variable <9>:              OMP_PLACES.            (line 6)
* Environment Variable <10>:             OMP_STACKSIZE.         (line 6)
* Environment Variable <11>:             OMP_SCHEDULE.          (line 6)
* Environment Variable <12>:             OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <13>:             OMP_WAIT_POLICY.       (line 6)
* Environment Variable <14>:             GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <15>:             GOMP_DEBUG.            (line 6)
* Environment Variable <16>:             GOMP_STACKSIZE.        (line 6)
* Environment Variable <17>:             GOMP_SPINCOUNT.        (line 6)
* Environment Variable <18>:             GOMP_RTEMS_THREAD_POOLS.
d5521 4
a5524 3
* Implementation specific setting <3>:   GOMP_STACKSIZE.        (line 6)
* Implementation specific setting <4>:   GOMP_SPINCOUNT.        (line 6)
* Implementation specific setting <5>:   GOMP_RTEMS_THREAD_POOLS.
d5532 154
a5685 139
Node: Enabling OpenMP4645
Node: Runtime Library Routines5433
Node: omp_get_active_level8511
Node: omp_get_ancestor_thread_num9211
Node: omp_get_cancellation10141
Node: omp_get_default_device10955
Node: omp_get_dynamic11631
Node: omp_get_level12506
Node: omp_get_max_active_levels13126
Node: omp_get_max_task_priority13831
Node: omp_get_max_threads14451
Node: omp_get_nested15208
Node: omp_get_num_devices16122
Node: omp_get_num_procs16643
Node: omp_get_num_teams17182
Node: omp_get_num_threads17698
Node: omp_get_proc_bind18787
Node: omp_get_schedule19710
Node: omp_get_team_num20664
Node: omp_get_team_size21163
Node: omp_get_thread_limit22123
Node: omp_get_thread_num22742
Node: omp_in_parallel23613
Node: omp_in_final24262
Node: omp_is_initial_device24936
Node: omp_set_default_device25629
Node: omp_set_dynamic26420
Node: omp_set_max_active_levels27306
Node: omp_set_nested28083
Node: omp_set_num_threads28975
Node: omp_set_schedule29843
Node: omp_init_lock30924
Node: omp_set_lock31577
Node: omp_test_lock32432
Node: omp_unset_lock33408
Node: omp_destroy_lock34339
Node: omp_init_nest_lock35016
Node: omp_set_nest_lock35751
Node: omp_test_nest_lock36666
Node: omp_unset_nest_lock37693
Node: omp_destroy_nest_lock38708
Node: omp_get_wtick39459
Node: omp_get_wtime40051
Node: Environment Variables40827
Node: OMP_CANCELLATION42398
Node: OMP_DISPLAY_ENV42931
Node: OMP_DEFAULT_DEVICE43634
Node: OMP_DYNAMIC44414
Node: OMP_MAX_ACTIVE_LEVELS45010
Node: OMP_MAX_TASK_PRIORITY45660
Node: OMP_NESTED46318
Node: OMP_NUM_THREADS46923
Node: OMP_PROC_BIND47611
Node: OMP_PLACES48806
Node: OMP_STACKSIZE50985
Node: OMP_SCHEDULE51809
Node: OMP_THREAD_LIMIT52507
Node: OMP_WAIT_POLICY53107
Node: GOMP_CPU_AFFINITY53799
Node: GOMP_DEBUG55529
Node: GOMP_STACKSIZE56036
Node: GOMP_SPINCOUNT56867
Node: GOMP_RTEMS_THREAD_POOLS58071
Node: Enabling OpenACC60249
Node: OpenACC Runtime Library Routines61150
Node: acc_get_num_devices65431
Node: acc_set_device_type66157
Node: acc_get_device_type66921
Node: acc_set_device_num67934
Node: acc_get_device_num68751
Node: acc_get_property69550
Node: acc_async_test71773
Node: acc_async_test_all72761
Node: acc_wait73661
Node: acc_wait_all74524
Node: acc_wait_all_async75285
Node: acc_wait_async76037
Node: acc_init76745
Node: acc_shutdown77390
Node: acc_on_device78057
Node: acc_malloc79061
Node: acc_free79560
Node: acc_copyin79987
Node: acc_present_or_copyin81574
Node: acc_create83352
Node: acc_present_or_create84984
Node: acc_copyout86770
Node: acc_delete89074
Node: acc_update_device91321
Node: acc_update_self92895
Node: acc_map_data94485
Node: acc_unmap_data95170
Node: acc_deviceptr95691
Node: acc_hostptr96261
Node: acc_is_present96825
Node: acc_memcpy_to_device98352
Node: acc_memcpy_from_device99015
Node: acc_attach99682
Node: acc_detach100329
Node: acc_get_current_cuda_device101108
Node: acc_get_current_cuda_context101693
Node: acc_get_cuda_stream102293
Node: acc_set_cuda_stream102884
Node: acc_prof_register103555
Node: acc_prof_unregister104114
Node: acc_prof_lookup104681
Node: acc_register_library105202
Node: OpenACC Environment Variables105768
Node: ACC_DEVICE_TYPE106340
Node: ACC_DEVICE_NUM106576
Node: ACC_PROFLIB106830
Node: GCC_ACC_NOTIFY107161
Node: CUDA Streams Usage107381
Ref: CUDA Streams Usage-Footnote-1109282
Node: OpenACC Library Interoperability109391
Ref: OpenACC Library Interoperability-Footnote-1115759
Ref: OpenACC Library Interoperability-Footnote-2116011
Node: OpenACC Profiling Interface116219
Node: The libgomp ABI126243
Node: Implementing MASTER construct127096
Node: Implementing CRITICAL construct127512
Node: Implementing ATOMIC construct128253
Node: Implementing FLUSH construct128736
Node: Implementing BARRIER construct129009
Node: Implementing THREADPRIVATE construct129280
Node: Implementing PRIVATE clause129935
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses130518
Node: Implementing REDUCTION clause131844
Node: Implementing PARALLEL construct132403
Node: Implementing FOR construct133662
Node: Implementing ORDERED construct135662
Node: Implementing SECTIONS construct135970
Node: Implementing SINGLE construct136738
Node: Implementing OpenACC's PARALLEL construct137452
Node: Reporting Bugs137712
Node: Copying138075
Node: GNU Free Documentation License175621
Node: Funding200744
Node: Library Index203270
@


1.14
log
@merge GCC 10.4.0.
@
text
@d1 1
a1 1
This is libgomp.info, produced by makeinfo version 6.8 from
d153 1
a153 1
* omp_get_proc_bind::           Whether theads may be moved between CPUs
d510 2
a511 2
2.15 'omp_get_proc_bind' - Whether theads may be moved between CPUs
===================================================================
d1180 2
a1181 2
* OMP_PROC_BIND::           Whether theads may be moved between CPUs
* OMP_PLACES::              Specifies on which CPUs the theads should be placed
d1338 2
a1339 2
3.9 'OMP_PROC_BIND' - Whether theads may be moved between CPUs
==============================================================
d1343 1
a1343 1
     to 'TRUE', OpenMP theads should not be moved; if set to 'FALSE'
d1365 2
a1366 2
3.10 'OMP_PLACES' - Specifies on which CPUs the theads should be placed
=======================================================================
d4982 137
a5118 137
Node: omp_get_active_level8510
Node: omp_get_ancestor_thread_num9210
Node: omp_get_cancellation10140
Node: omp_get_default_device10954
Node: omp_get_dynamic11630
Node: omp_get_level12505
Node: omp_get_max_active_levels13125
Node: omp_get_max_task_priority13830
Node: omp_get_max_threads14450
Node: omp_get_nested15207
Node: omp_get_num_devices16121
Node: omp_get_num_procs16642
Node: omp_get_num_teams17181
Node: omp_get_num_threads17697
Node: omp_get_proc_bind18786
Node: omp_get_schedule19707
Node: omp_get_team_num20661
Node: omp_get_team_size21160
Node: omp_get_thread_limit22120
Node: omp_get_thread_num22739
Node: omp_in_parallel23610
Node: omp_in_final24259
Node: omp_is_initial_device24933
Node: omp_set_default_device25626
Node: omp_set_dynamic26417
Node: omp_set_max_active_levels27303
Node: omp_set_nested28080
Node: omp_set_num_threads28972
Node: omp_set_schedule29840
Node: omp_init_lock30921
Node: omp_set_lock31574
Node: omp_test_lock32429
Node: omp_unset_lock33405
Node: omp_destroy_lock34336
Node: omp_init_nest_lock35013
Node: omp_set_nest_lock35748
Node: omp_test_nest_lock36663
Node: omp_unset_nest_lock37690
Node: omp_destroy_nest_lock38705
Node: omp_get_wtick39456
Node: omp_get_wtime40048
Node: Environment Variables40824
Node: OMP_CANCELLATION42393
Node: OMP_DISPLAY_ENV42926
Node: OMP_DEFAULT_DEVICE43629
Node: OMP_DYNAMIC44409
Node: OMP_MAX_ACTIVE_LEVELS45005
Node: OMP_MAX_TASK_PRIORITY45655
Node: OMP_NESTED46313
Node: OMP_NUM_THREADS46918
Node: OMP_PROC_BIND47606
Node: OMP_PLACES48798
Node: OMP_STACKSIZE50975
Node: OMP_SCHEDULE51799
Node: OMP_THREAD_LIMIT52497
Node: OMP_WAIT_POLICY53097
Node: GOMP_CPU_AFFINITY53789
Node: GOMP_DEBUG55519
Node: GOMP_STACKSIZE56026
Node: GOMP_SPINCOUNT56857
Node: GOMP_RTEMS_THREAD_POOLS58061
Node: Enabling OpenACC60239
Node: OpenACC Runtime Library Routines61140
Node: acc_get_num_devices65421
Node: acc_set_device_type66147
Node: acc_get_device_type66911
Node: acc_set_device_num67924
Node: acc_get_device_num68741
Node: acc_get_property69540
Node: acc_async_test71763
Node: acc_async_test_all72751
Node: acc_wait73651
Node: acc_wait_all74514
Node: acc_wait_all_async75275
Node: acc_wait_async76027
Node: acc_init76735
Node: acc_shutdown77380
Node: acc_on_device78047
Node: acc_malloc79051
Node: acc_free79550
Node: acc_copyin79977
Node: acc_present_or_copyin81564
Node: acc_create83342
Node: acc_present_or_create84974
Node: acc_copyout86760
Node: acc_delete89064
Node: acc_update_device91311
Node: acc_update_self92885
Node: acc_map_data94475
Node: acc_unmap_data95160
Node: acc_deviceptr95681
Node: acc_hostptr96251
Node: acc_is_present96815
Node: acc_memcpy_to_device98342
Node: acc_memcpy_from_device99005
Node: acc_attach99672
Node: acc_detach100319
Node: acc_get_current_cuda_device101098
Node: acc_get_current_cuda_context101683
Node: acc_get_cuda_stream102283
Node: acc_set_cuda_stream102874
Node: acc_prof_register103545
Node: acc_prof_unregister104104
Node: acc_prof_lookup104671
Node: acc_register_library105192
Node: OpenACC Environment Variables105758
Node: ACC_DEVICE_TYPE106330
Node: ACC_DEVICE_NUM106566
Node: ACC_PROFLIB106820
Node: GCC_ACC_NOTIFY107151
Node: CUDA Streams Usage107371
Ref: CUDA Streams Usage-Footnote-1109272
Node: OpenACC Library Interoperability109381
Ref: OpenACC Library Interoperability-Footnote-1115749
Ref: OpenACC Library Interoperability-Footnote-2116001
Node: OpenACC Profiling Interface116209
Node: The libgomp ABI126233
Node: Implementing MASTER construct127086
Node: Implementing CRITICAL construct127502
Node: Implementing ATOMIC construct128243
Node: Implementing FLUSH construct128726
Node: Implementing BARRIER construct128999
Node: Implementing THREADPRIVATE construct129270
Node: Implementing PRIVATE clause129925
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses130508
Node: Implementing REDUCTION clause131834
Node: Implementing PARALLEL construct132393
Node: Implementing FOR construct133652
Node: Implementing ORDERED construct135652
Node: Implementing SECTIONS construct135960
Node: Implementing SINGLE construct136728
Node: Implementing OpenACC's PARALLEL construct137442
Node: Reporting Bugs137702
Node: Copying138065
Node: GNU Free Documentation License175611
Node: Funding200734
Node: Library Index203260
a5120 5


Local Variables:
coding: utf-8
End:
@


1.14.2.1
log
@Sync to head external/gpl3/gcc/dist, pulling up the following revisions
(requested by mrg in ticket #231):

	external/gpl3/gcc/dist/fixincludes/tests/base/objc/runtime.h up to 1.1.1.1
	external/gpl3/gcc/dist/gcc/opts-jobserver.h     up to 1.1.1.1
	external/gpl3/gcc/dist/libgcc/config/t-darwin-min-1 up to 1.1.1.1
	external/gpl3/gcc/dist/libgcc/config/t-darwin-min-5 up to 1.1.1.1
	external/gpl3/gcc/dist/libgcc/config/t-darwin-min-8 up to 1.1.1.1
	external/gpl3/gcc/dist/ChangeLog                up to 1.1.1.21
	external/gpl3/gcc/dist/LAST_UPDATED             up to 1.18
	external/gpl3/gcc/dist/MD5SUMS                  up to 1.18
	external/gpl3/gcc/dist/NEWS                     up to 1.16
	external/gpl3/gcc/dist/INSTALL/binaries.html    up to 1.13
	external/gpl3/gcc/dist/INSTALL/build.html       up to 1.15
	external/gpl3/gcc/dist/INSTALL/configure.html   up to 1.15
	external/gpl3/gcc/dist/INSTALL/download.html    up to 1.14
	external/gpl3/gcc/dist/INSTALL/finalinstall.html up to 1.13
	external/gpl3/gcc/dist/INSTALL/gfdl.html        up to 1.13
	external/gpl3/gcc/dist/INSTALL/index.html       up to 1.13
	external/gpl3/gcc/dist/INSTALL/old.html         up to 1.13
	external/gpl3/gcc/dist/INSTALL/prerequisites.html up to 1.15
	external/gpl3/gcc/dist/INSTALL/specific.html    up to 1.14
	external/gpl3/gcc/dist/INSTALL/test.html        up to 1.13
	external/gpl3/gcc/dist/config/ChangeLog         up to 1.1.1.21
	external/gpl3/gcc/dist/contrib/ChangeLog        up to 1.1.1.21
	external/gpl3/gcc/dist/contrib/header-tools/ChangeLog up to 1.1.1.11
	external/gpl3/gcc/dist/contrib/reghunt/ChangeLog up to 1.1.1.20
	external/gpl3/gcc/dist/contrib/regression/ChangeLog up to 1.1.1.20
	external/gpl3/gcc/dist/fixincludes/ChangeLog    up to 1.1.1.20
	external/gpl3/gcc/dist/fixincludes/fixincl.x    up to 1.1.1.16
	external/gpl3/gcc/dist/fixincludes/inclhack.def up to 1.1.1.15
	external/gpl3/gcc/dist/fixincludes/tests/base/stdio.h up to 1.1.1.6
	external/gpl3/gcc/dist/gcc/BASE-VER             up to 1.1.1.19
	external/gpl3/gcc/dist/gcc/ChangeLog            up to 1.24
	external/gpl3/gcc/dist/gcc/DATESTAMP            up to 1.1.1.22
	external/gpl3/gcc/dist/gcc/asan.c               up to 1.1.1.13
	external/gpl3/gcc/dist/gcc/bb-reorder.c         up to 1.1.1.15
	external/gpl3/gcc/dist/gcc/builtins.c           up to 1.20
	external/gpl3/gcc/dist/gcc/cfgbuild.c           up to 1.1.1.11
	external/gpl3/gcc/dist/gcc/cgraphclones.c       up to 1.1.1.13
	external/gpl3/gcc/dist/gcc/cgraphunit.c         up to 1.1.1.14
	external/gpl3/gcc/dist/gcc/config.gcc           up to 1.72
	external/gpl3/gcc/dist/gcc/cse.c                up to 1.1.1.13
	external/gpl3/gcc/dist/gcc/expr.c               up to 1.19
	external/gpl3/gcc/dist/gcc/function.c           up to 1.1.1.18
	external/gpl3/gcc/dist/gcc/function.h           up to 1.1.1.12
	external/gpl3/gcc/dist/gcc/gcc.c                up to 1.25
	external/gpl3/gcc/dist/gcc/generic-match-head.c up to 1.1.1.9
	external/gpl3/gcc/dist/gcc/gimple-ssa-store-merging.c up to 1.1.1.9
	external/gpl3/gcc/dist/gcc/ifcvt.c              up to 1.1.1.15
	external/gpl3/gcc/dist/gcc/ira-color.c          up to 1.10
	external/gpl3/gcc/dist/gcc/loop-invariant.c     up to 1.1.1.13
	external/gpl3/gcc/dist/gcc/lto-streamer-in.c    up to 1.1.1.13
	external/gpl3/gcc/dist/gcc/lto-wrapper.c        up to 1.1.1.12
	external/gpl3/gcc/dist/gcc/match.pd             up to 1.1.1.13
	external/gpl3/gcc/dist/gcc/omp-expand.c         up to 1.1.1.8
	external/gpl3/gcc/dist/gcc/omp-low.c            up to 1.1.1.19
	external/gpl3/gcc/dist/gcc/optabs.c             up to 1.1.1.15
	external/gpl3/gcc/dist/gcc/optc-save-gen.awk    up to 1.1.1.10
	external/gpl3/gcc/dist/gcc/opts-common.c        up to 1.1.1.13
	external/gpl3/gcc/dist/gcc/predict.c            up to 1.1.1.12
	external/gpl3/gcc/dist/gcc/ree.c                up to 1.1.1.12
	external/gpl3/gcc/dist/gcc/reg-stack.c          up to 1.1.1.11
	external/gpl3/gcc/dist/gcc/regrename.c          up to 1.1.1.11
	external/gpl3/gcc/dist/gcc/sanopt.c             up to 1.1.1.10
	external/gpl3/gcc/dist/gcc/selftest-diagnostic.c up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/symbol-summary.h     up to 1.1.1.9
	external/gpl3/gcc/dist/gcc/tree-inline.c        up to 1.1.1.18
	external/gpl3/gcc/dist/gcc/tree-loop-distribution.c up to 1.1.1.13
	external/gpl3/gcc/dist/gcc/tree-nested.c        up to 1.1.1.13
	external/gpl3/gcc/dist/gcc/tree-sra.c           up to 1.1.1.17
	external/gpl3/gcc/dist/gcc/tree-ssa-ccp.c       up to 1.16
	external/gpl3/gcc/dist/gcc/tree-ssa-dom.c       up to 1.1.1.16
	external/gpl3/gcc/dist/gcc/tree-ssa-loop-ivopts.c up to 1.1.1.14
	external/gpl3/gcc/dist/gcc/tree-ssa-reassoc.c   up to 1.1.1.18
	external/gpl3/gcc/dist/gcc/tree-ssa-sccvn.c     up to 1.1.1.18
	external/gpl3/gcc/dist/gcc/tree-ssa-strlen.c    up to 1.1.1.13
	external/gpl3/gcc/dist/gcc/tree-ssa.c           up to 1.1.1.13
	external/gpl3/gcc/dist/gcc/tree.c               up to 1.5
	external/gpl3/gcc/dist/gcc/tree.h               up to 1.5
	external/gpl3/gcc/dist/gcc/varasm.c             up to 1.14
	external/gpl3/gcc/dist/gcc/wide-int.cc          up to 1.1.1.10
	external/gpl3/gcc/dist/gcc/wide-int.h           up to 1.1.1.10
	external/gpl3/gcc/dist/gcc/analyzer/ChangeLog   up to 1.1.1.3
	external/gpl3/gcc/dist/gcc/brig/ChangeLog       up to 1.1.1.9
	external/gpl3/gcc/dist/gcc/c/ChangeLog          up to 1.1.1.19
	external/gpl3/gcc/dist/gcc/c/c-parser.c         up to 1.1.1.16
	external/gpl3/gcc/dist/gcc/c/c-typeck.c         up to 1.1.1.17
	external/gpl3/gcc/dist/gcc/c-family/ChangeLog   up to 1.1.1.18
	external/gpl3/gcc/dist/gcc/c-family/c-common.c  up to 1.1.1.17
	external/gpl3/gcc/dist/gcc/c-family/c-ubsan.c   up to 1.1.1.10
	external/gpl3/gcc/dist/gcc/c-family/c-warn.c    up to 1.1.1.8
	external/gpl3/gcc/dist/gcc/common/config/i386/i386-cpuinfo.h up to 1.1.1.2
	external/gpl3/gcc/dist/gcc/config/darwin.c      up to 1.1.1.15
	external/gpl3/gcc/dist/gcc/config/darwin.h      up to 1.1.1.14
	external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-c.c up to 1.1.1.9
	external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-cores.def up to 1.1.1.12
	external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-cost-tables.h up to 1.1.1.9
	external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-fusion-pairs.def up to 1.1.1.8
	external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h up to 1.7
	external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-protos.h up to 1.1.1.13
	external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-simd.md up to 1.1.1.13
	external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-sve-builtins.cc up to 1.1.1.3
	external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-sve.md up to 1.1.1.5
	external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-tune.md up to 1.1.1.12
	external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-tuning-flags.def up to 1.1.1.8
	external/gpl3/gcc/dist/gcc/config/aarch64/aarch64.c up to 1.1.1.19
	external/gpl3/gcc/dist/gcc/config/aarch64/aarch64.h up to 1.4
	external/gpl3/gcc/dist/gcc/config/aarch64/aarch64.md up to 1.1.1.17
	external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c up to 1.14
	external/gpl3/gcc/dist/gcc/config/aarch64/iterators.md up to 1.1.1.14
	external/gpl3/gcc/dist/gcc/config/i386/i386-builtin.def up to 1.1.1.8
	external/gpl3/gcc/dist/gcc/config/i386/i386-expand.c up to 1.1.1.3
	external/gpl3/gcc/dist/gcc/config/i386/i386-features.c up to 1.1.1.2
	external/gpl3/gcc/dist/gcc/config/i386/i386-options.c up to 1.1.1.2
	external/gpl3/gcc/dist/gcc/config/i386/smmintrin.h up to 1.1.1.11
	external/gpl3/gcc/dist/gcc/config/i386/t-i386   up to 1.1.1.11
	external/gpl3/gcc/dist/gcc/config/nvptx/nvptx.c up to 1.1.1.12
	external/gpl3/gcc/dist/gcc/config/nvptx/nvptx.h up to 1.1.1.9
	external/gpl3/gcc/dist/gcc/config/nvptx/nvptx.md up to 1.1.1.9
	external/gpl3/gcc/dist/gcc/config/pa/pa.md      up to 1.1.1.17
	external/gpl3/gcc/dist/gcc/config/riscv/t-rtems up to 1.1.1.2
	external/gpl3/gcc/dist/gcc/config/rs6000/altivec.md up to 1.1.1.19
	external/gpl3/gcc/dist/gcc/config/rs6000/mma.md up to 1.1.1.3
	external/gpl3/gcc/dist/gcc/config/rs6000/rs6000-builtin.def up to 1.1.1.19
	external/gpl3/gcc/dist/gcc/config/rs6000/rs6000-call.c up to 1.1.1.3
	external/gpl3/gcc/dist/gcc/config/rs6000/rs6000-logue.c up to 1.4
	external/gpl3/gcc/dist/gcc/config/rs6000/rs6000-p8swap.c up to 1.1.1.6
	external/gpl3/gcc/dist/gcc/config/rs6000/rs6000-protos.h up to 1.1.1.15
	external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c up to 1.32
	external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.h up to 1.1.1.17
	external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.md up to 1.1.1.20
	external/gpl3/gcc/dist/gcc/config/rs6000/rtems.h up to 1.1.1.11
	external/gpl3/gcc/dist/gcc/config/rs6000/t-rtems up to 1.1.1.11
	external/gpl3/gcc/dist/gcc/config/rs6000/vector.md up to 1.1.1.15
	external/gpl3/gcc/dist/gcc/config/rs6000/vsx.md up to 1.1.1.20
	external/gpl3/gcc/dist/gcc/config/s390/s390.c   up to 1.1.1.18
	external/gpl3/gcc/dist/gcc/config/sparc/sparc.c up to 1.1.1.19
	external/gpl3/gcc/dist/gcc/cp/ChangeLog         up to 1.1.1.22
	external/gpl3/gcc/dist/gcc/cp/constexpr.c       up to 1.1.1.14
	external/gpl3/gcc/dist/gcc/cp/cp-gimplify.c     up to 1.1.1.15
	external/gpl3/gcc/dist/gcc/cp/cp-tree.h         up to 1.1.1.15
	external/gpl3/gcc/dist/gcc/cp/cvt.c             up to 1.1.1.15
	external/gpl3/gcc/dist/gcc/cp/decl.c            up to 1.10
	external/gpl3/gcc/dist/gcc/cp/decl2.c           up to 1.1.1.18
	external/gpl3/gcc/dist/gcc/cp/expr.c            up to 1.1.1.12
	external/gpl3/gcc/dist/gcc/cp/friend.c          up to 1.1.1.12
	external/gpl3/gcc/dist/gcc/cp/lambda.c          up to 1.1.1.12
	external/gpl3/gcc/dist/gcc/cp/parser.c          up to 1.1.1.21
	external/gpl3/gcc/dist/gcc/cp/pt.c              up to 1.1.1.19
	external/gpl3/gcc/dist/gcc/cp/semantics.c       up to 1.1.1.20
	external/gpl3/gcc/dist/gcc/cp/tree.c            up to 1.1.1.18
	external/gpl3/gcc/dist/gcc/cp/typeck.c          up to 1.1.1.19
	external/gpl3/gcc/dist/gcc/d/ChangeLog          up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/d/d-convert.cc       up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/d/decl.cc            up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/d/expr.cc            up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/d/gdc.texi           up to 1.1.1.3
	external/gpl3/gcc/dist/gcc/d/imports.cc         up to 1.1.1.3
	external/gpl3/gcc/dist/gcc/d/toir.cc            up to 1.1.1.3
	external/gpl3/gcc/dist/gcc/d/dmd/dinterpret.c   up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/d/dmd/expressionsem.c up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/doc/cpp.1            up to 1.17
	external/gpl3/gcc/dist/gcc/doc/cpp.info         up to 1.16
	external/gpl3/gcc/dist/gcc/doc/cppinternals.info up to 1.18
	external/gpl3/gcc/dist/gcc/doc/cppopts.texi     up to 1.10
	external/gpl3/gcc/dist/gcc/doc/extend.texi      up to 1.10
	external/gpl3/gcc/dist/gcc/doc/fsf-funding.7    up to 1.15
	external/gpl3/gcc/dist/gcc/doc/g++.1            up to 1.18
	external/gpl3/gcc/dist/gcc/doc/gcc.1            up to 1.18
	external/gpl3/gcc/dist/gcc/doc/gcc.info         up to 1.16
	external/gpl3/gcc/dist/gcc/doc/gccinstall.info  up to 1.18
	external/gpl3/gcc/dist/gcc/doc/gccint.info      up to 1.17
	external/gpl3/gcc/dist/gcc/doc/gcov-dump.1      up to 1.1.1.12
	external/gpl3/gcc/dist/gcc/doc/gcov-tool.1      up to 1.11
	external/gpl3/gcc/dist/gcc/doc/gcov.1           up to 1.17
	external/gpl3/gcc/dist/gcc/doc/gfdl.7           up to 1.15
	external/gpl3/gcc/dist/gcc/doc/gfortran.1       up to 1.14
	external/gpl3/gcc/dist/gcc/doc/gpl.7            up to 1.15
	external/gpl3/gcc/dist/gcc/doc/invoke.texi      up to 1.23
	external/gpl3/gcc/dist/gcc/doc/lto-dump.1       up to 1.1.1.3
	external/gpl3/gcc/dist/gcc/fortran/ChangeLog    up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/fortran/array.c      up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/fortran/check.c      up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/fortran/decl.c       up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/fortran/dependency.c up to 1.1.1.3
	external/gpl3/gcc/dist/gcc/fortran/expr.c       up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/fortran/f95-lang.c   up to 1.1.1.3
	external/gpl3/gcc/dist/gcc/fortran/gfortran.info up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/fortran/interface.c  up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/fortran/iresolve.c   up to 1.1.1.3
	external/gpl3/gcc/dist/gcc/fortran/match.c      up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/fortran/parse.c      up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/fortran/primary.c    up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/fortran/resolve.c    up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/fortran/simplify.c   up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/fortran/symbol.c     up to 1.1.1.3
	external/gpl3/gcc/dist/gcc/fortran/trans-decl.c up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/fortran/trans-expr.c up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/fortran/trans-intrinsic.c up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/fortran/trans-types.c up to 1.1.1.4
	external/gpl3/gcc/dist/gcc/fortran/trans.h      up to 1.1.1.3
	external/gpl3/gcc/dist/gcc/jit/ChangeLog        up to 1.1.1.14
	external/gpl3/gcc/dist/gcc/lto/ChangeLog        up to 1.1.1.20
	external/gpl3/gcc/dist/gcc/objc/ChangeLog       up to 1.1.1.20
	external/gpl3/gcc/dist/gcc/objcp/ChangeLog      up to 1.1.1.20
	external/gpl3/gcc/dist/include/ChangeLog        up to 1.1.1.20
	external/gpl3/gcc/dist/intl/ChangeLog           up to 1.1.1.20
	external/gpl3/gcc/dist/libbacktrace/ChangeLog   up to 1.1.1.19
	external/gpl3/gcc/dist/libcc1/ChangeLog         up to 1.1.1.14
	external/gpl3/gcc/dist/libcpp/ChangeLog         up to 1.1.1.20
	external/gpl3/gcc/dist/libcpp/directives.c      up to 1.1.1.13
	external/gpl3/gcc/dist/libdecnumber/ChangeLog   up to 1.1.1.20
	external/gpl3/gcc/dist/libgcc/ChangeLog         up to 1.1.1.22
	external/gpl3/gcc/dist/libgcc/config.host       up to 1.33
	external/gpl3/gcc/dist/libgcc/config/darwin10-unwind-find-enc-func.c up to 1.1.1.2
	external/gpl3/gcc/dist/libgcc/config/t-darwin   up to 1.1.1.6
	external/gpl3/gcc/dist/libgcc/config/t-slibgcc-darwin up to 1.1.1.4
	external/gpl3/gcc/dist/libgcc/config/avr/libf7/ChangeLog up to 1.1.1.3
	external/gpl3/gcc/dist/libgcc/config/avr/libf7/libf7-asm.sx up to 1.1.1.2
	external/gpl3/gcc/dist/libgcc/config/i386/cpuinfo.c up to 1.1.1.11
	external/gpl3/gcc/dist/libgcc/config/libbid/ChangeLog up to 1.1.1.20
	external/gpl3/gcc/dist/libgcc/config/riscv/div.S up to 1.1.1.7
	external/gpl3/gcc/dist/libgcc/config/riscv/riscv-asm.h up to 1.1.1.4
	external/gpl3/gcc/dist/libgfortran/ChangeLog    up to 1.1.1.4
	external/gpl3/gcc/dist/libgomp/ChangeLog        up to 1.1.1.20
	external/gpl3/gcc/dist/libgomp/libgomp.info     up to 1.15
	external/gpl3/gcc/dist/libgomp/libgomp.texi     up to 1.1.1.11
	external/gpl3/gcc/dist/libgomp/target.c         up to 1.1.1.9
	external/gpl3/gcc/dist/libgomp/task.c           up to 1.1.1.12
	external/gpl3/gcc/dist/libhsail-rt/ChangeLog    up to 1.1.1.9
	external/gpl3/gcc/dist/libiberty/ChangeLog      up to 1.1.1.20
	external/gpl3/gcc/dist/libiberty/strstr.c       up to 1.1.1.2
	external/gpl3/gcc/dist/libobjc/ChangeLog        up to 1.1.1.21
	external/gpl3/gcc/dist/libphobos/ChangeLog      up to 1.1.1.4
	external/gpl3/gcc/dist/libphobos/src/std/path.d up to 1.1.1.2
	external/gpl3/gcc/dist/libquadmath/ChangeLog    up to 1.1.1.4
	external/gpl3/gcc/dist/libquadmath/libquadmath.info up to 1.1.1.4
	external/gpl3/gcc/dist/libquadmath/strtod/strtod_l.c up to 1.1.1.2
	external/gpl3/gcc/dist/libsanitizer/ChangeLog   up to 1.4
	external/gpl3/gcc/dist/libsanitizer/configure.tgt up to 1.10
	external/gpl3/gcc/dist/libssp/ChangeLog         up to 1.1.1.20
	external/gpl3/gcc/dist/libstdc++-v3/ChangeLog   up to 1.1.1.22
	external/gpl3/gcc/dist/libstdc++-v3/config/os/gnu-linux/os_defines.h up to 1.1.1.11
	external/gpl3/gcc/dist/libstdc++-v3/doc/doxygen/user.cfg.in up to 1.1.1.7
	external/gpl3/gcc/dist/libstdc++-v3/doc/html/bk02.html up to 1.1.1.4
	external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/api.html up to 1.1.1.11
	external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/ext_demangling.html up to 1.1.1.7
	external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/extensions.html up to 1.1.1.6
	external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/index.html up to 1.1.1.14
	external/gpl3/gcc/dist/libstdc++-v3/doc/xml/authors.xml up to 1.1.1.4
	external/gpl3/gcc/dist/libstdc++-v3/doc/xml/manual/evolution.xml up to 1.1.1.10
	external/gpl3/gcc/dist/libstdc++-v3/doc/xml/manual/extensions.xml up to 1.1.1.13
	external/gpl3/gcc/dist/libstdc++-v3/doc/xml/manual/spine.xml up to 1.1.1.11
	external/gpl3/gcc/dist/libstdc++-v3/include/Makefile.am up to 1.1.1.16
	external/gpl3/gcc/dist/libstdc++-v3/include/Makefile.in up to 1.1.1.16
	external/gpl3/gcc/dist/libstdc++-v3/include/bits/fs_path.h up to 1.1.1.6
	external/gpl3/gcc/dist/libstdc++-v3/include/bits/gslice_array.h up to 1.1.1.12
	external/gpl3/gcc/dist/libstdc++-v3/include/bits/indirect_array.h up to 1.1.1.12
	external/gpl3/gcc/dist/libstdc++-v3/include/bits/list.tcc up to 1.1.1.12
	external/gpl3/gcc/dist/libstdc++-v3/include/bits/mask_array.h up to 1.1.1.13
	external/gpl3/gcc/dist/libstdc++-v3/include/bits/range_access.h up to 1.1.1.11
	external/gpl3/gcc/dist/libstdc++-v3/include/bits/regex.h up to 1.1.1.13
	external/gpl3/gcc/dist/libstdc++-v3/include/bits/regex.tcc up to 1.1.1.10
	external/gpl3/gcc/dist/libstdc++-v3/include/bits/regex_automaton.h up to 1.1.1.11
	external/gpl3/gcc/dist/libstdc++-v3/include/bits/regex_compiler.h up to 1.1.1.12
	external/gpl3/gcc/dist/libstdc++-v3/include/bits/regex_compiler.tcc up to 1.1.1.10
	external/gpl3/gcc/dist/libstdc++-v3/include/bits/regex_error.h up to 1.1.1.11
	external/gpl3/gcc/dist/libstdc++-v3/include/bits/regex_executor.tcc up to 1.1.1.10
	external/gpl3/gcc/dist/libstdc++-v3/include/bits/regex_scanner.h up to 1.1.1.11
	external/gpl3/gcc/dist/libstdc++-v3/include/bits/regex_scanner.tcc up to 1.1.1.10
	external/gpl3/gcc/dist/libstdc++-v3/include/bits/shared_ptr_base.h up to 1.1.1.16
	external/gpl3/gcc/dist/libstdc++-v3/include/bits/slice_array.h up to 1.1.1.13
	external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_iterator.h up to 1.1.1.14
	external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_uninitialized.h up to 1.1.1.13
	external/gpl3/gcc/dist/libstdc++-v3/include/experimental/numeric up to 1.1.1.8
	external/gpl3/gcc/dist/libstdc++-v3/include/experimental/optional up to 1.1.1.12
	external/gpl3/gcc/dist/libstdc++-v3/include/std/any up to 1.1.1.9
	external/gpl3/gcc/dist/libstdc++-v3/include/std/memory up to 1.1.1.12
	external/gpl3/gcc/dist/libstdc++-v3/include/std/numeric up to 1.1.1.12
	external/gpl3/gcc/dist/libstdc++-v3/include/std/ranges up to 1.1.1.3
	external/gpl3/gcc/dist/libstdc++-v3/include/std/span up to 1.1.1.3
	external/gpl3/gcc/dist/libstdc++-v3/include/std/valarray up to 1.1.1.12
	external/gpl3/gcc/dist/libstdc++-v3/python/libstdcxx/v6/xmethods.py up to 1.1.1.12
	external/gpl3/gcc/dist/libstdc++-v3/src/c++11/thread.cc up to 1.1.1.12
	external/gpl3/gcc/dist/libstdc++-v3/src/c++17/fs_path.cc up to 1.1.1.4
	external/gpl3/gcc/dist/lto-plugin/ChangeLog     up to 1.1.1.20
	external/gpl3/gcc/dist/maintainer-scripts/ChangeLog up to 1.1.1.21

Import gcc 10.5.
@
text
@d1 1
a1 1
This is libgomp.info, produced by makeinfo version 6.5 from
d153 1
a153 1
* omp_get_proc_bind::           Whether threads may be moved between CPUs
d510 2
a511 2
2.15 'omp_get_proc_bind' - Whether threads may be moved between CPUs
====================================================================
d1180 2
a1181 2
* OMP_PROC_BIND::           Whether threads may be moved between CPUs
* OMP_PLACES::              Specifies on which CPUs the threads should be placed
d1338 2
a1339 2
3.9 'OMP_PROC_BIND' - Whether threads may be moved between CPUs
===============================================================
d1343 1
a1343 1
     to 'TRUE', OpenMP threads should not be moved; if set to 'FALSE'
d1365 2
a1366 2
3.10 'OMP_PLACES' - Specifies on which CPUs the threads should be placed
========================================================================
d4982 137
a5118 137
Node: omp_get_active_level8511
Node: omp_get_ancestor_thread_num9211
Node: omp_get_cancellation10141
Node: omp_get_default_device10955
Node: omp_get_dynamic11631
Node: omp_get_level12506
Node: omp_get_max_active_levels13126
Node: omp_get_max_task_priority13831
Node: omp_get_max_threads14451
Node: omp_get_nested15208
Node: omp_get_num_devices16122
Node: omp_get_num_procs16643
Node: omp_get_num_teams17182
Node: omp_get_num_threads17698
Node: omp_get_proc_bind18787
Node: omp_get_schedule19710
Node: omp_get_team_num20664
Node: omp_get_team_size21163
Node: omp_get_thread_limit22123
Node: omp_get_thread_num22742
Node: omp_in_parallel23613
Node: omp_in_final24262
Node: omp_is_initial_device24936
Node: omp_set_default_device25629
Node: omp_set_dynamic26420
Node: omp_set_max_active_levels27306
Node: omp_set_nested28083
Node: omp_set_num_threads28975
Node: omp_set_schedule29843
Node: omp_init_lock30924
Node: omp_set_lock31577
Node: omp_test_lock32432
Node: omp_unset_lock33408
Node: omp_destroy_lock34339
Node: omp_init_nest_lock35016
Node: omp_set_nest_lock35751
Node: omp_test_nest_lock36666
Node: omp_unset_nest_lock37693
Node: omp_destroy_nest_lock38708
Node: omp_get_wtick39459
Node: omp_get_wtime40051
Node: Environment Variables40827
Node: OMP_CANCELLATION42398
Node: OMP_DISPLAY_ENV42931
Node: OMP_DEFAULT_DEVICE43634
Node: OMP_DYNAMIC44414
Node: OMP_MAX_ACTIVE_LEVELS45010
Node: OMP_MAX_TASK_PRIORITY45660
Node: OMP_NESTED46318
Node: OMP_NUM_THREADS46923
Node: OMP_PROC_BIND47611
Node: OMP_PLACES48806
Node: OMP_STACKSIZE50985
Node: OMP_SCHEDULE51809
Node: OMP_THREAD_LIMIT52507
Node: OMP_WAIT_POLICY53107
Node: GOMP_CPU_AFFINITY53799
Node: GOMP_DEBUG55529
Node: GOMP_STACKSIZE56036
Node: GOMP_SPINCOUNT56867
Node: GOMP_RTEMS_THREAD_POOLS58071
Node: Enabling OpenACC60249
Node: OpenACC Runtime Library Routines61150
Node: acc_get_num_devices65431
Node: acc_set_device_type66157
Node: acc_get_device_type66921
Node: acc_set_device_num67934
Node: acc_get_device_num68751
Node: acc_get_property69550
Node: acc_async_test71773
Node: acc_async_test_all72761
Node: acc_wait73661
Node: acc_wait_all74524
Node: acc_wait_all_async75285
Node: acc_wait_async76037
Node: acc_init76745
Node: acc_shutdown77390
Node: acc_on_device78057
Node: acc_malloc79061
Node: acc_free79560
Node: acc_copyin79987
Node: acc_present_or_copyin81574
Node: acc_create83352
Node: acc_present_or_create84984
Node: acc_copyout86770
Node: acc_delete89074
Node: acc_update_device91321
Node: acc_update_self92895
Node: acc_map_data94485
Node: acc_unmap_data95170
Node: acc_deviceptr95691
Node: acc_hostptr96261
Node: acc_is_present96825
Node: acc_memcpy_to_device98352
Node: acc_memcpy_from_device99015
Node: acc_attach99682
Node: acc_detach100329
Node: acc_get_current_cuda_device101108
Node: acc_get_current_cuda_context101693
Node: acc_get_cuda_stream102293
Node: acc_set_cuda_stream102884
Node: acc_prof_register103555
Node: acc_prof_unregister104114
Node: acc_prof_lookup104681
Node: acc_register_library105202
Node: OpenACC Environment Variables105768
Node: ACC_DEVICE_TYPE106340
Node: ACC_DEVICE_NUM106576
Node: ACC_PROFLIB106830
Node: GCC_ACC_NOTIFY107161
Node: CUDA Streams Usage107381
Ref: CUDA Streams Usage-Footnote-1109282
Node: OpenACC Library Interoperability109391
Ref: OpenACC Library Interoperability-Footnote-1115759
Ref: OpenACC Library Interoperability-Footnote-2116011
Node: OpenACC Profiling Interface116219
Node: The libgomp ABI126243
Node: Implementing MASTER construct127096
Node: Implementing CRITICAL construct127512
Node: Implementing ATOMIC construct128253
Node: Implementing FLUSH construct128736
Node: Implementing BARRIER construct129009
Node: Implementing THREADPRIVATE construct129280
Node: Implementing PRIVATE clause129935
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses130518
Node: Implementing REDUCTION clause131844
Node: Implementing PARALLEL construct132403
Node: Implementing FOR construct133662
Node: Implementing ORDERED construct135662
Node: Implementing SECTIONS construct135970
Node: Implementing SINGLE construct136738
Node: Implementing OpenACC's PARALLEL construct137452
Node: Reporting Bugs137712
Node: Copying138075
Node: GNU Free Documentation License175621
Node: Funding200744
Node: Library Index203270
d5121 5
@


1.13
log
@initial merge of GCC 10.3.0.

these three files are not yet finished merging:

gcc/config/rs6000/rs6000.c
libsanitizer/lsan/lsan_allocator.h
libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h

our current GCC 9 sanitizers are newer than GCC 10's still, so that
may take a little to untease, so it's probable that more than
these 2 will need more changes.

rs6000.c has some changes related to ABI and supported functionality
that need to be merged forward.
@
text
@d1 1
a1 1
This is libgomp.info, produced by makeinfo version 6.5 from
d5121 5
@


1.12
log
@merge GCC 9.3.0.
@
text
@d4 1
a4 1
Copyright (C) 2006-2019 Free Software Foundation, Inc.
d36 1
a36 1
   Copyright (C) 2006-2019 Free Software Foundation, Inc.
d94 1
d1547 1
a1547 1
     (http://gcc.gnu.org/ml/gcc-patches/2006-06/msg00493.html), GCC
d1549 1
a1549 1
     (http://gcc.gnu.org/ml/gcc-patches/2006-06/msg00496.html)
d1622 1
a1622 1
OpenACC directive '#pragma acc' in C/C++ and '!$accp' directives in free
d1629 2
d1633 1
a1633 5
Interface manual, version 2.0.

   Note that this is an experimental feature and subject to change in
future versions of GCC. See <https://gcc.gnu.org/wiki/OpenACC> for more
information.
d1642 1
a1642 1
OpenACC specifications in version 2.0.  They have C linkage, and do not
d1655 1
d1658 1
a1658 1
* acc_async_test_all::          Tests for completion of all asychronous
d1662 1
a1662 1
* acc_wait_all::                Waits for completion of all asyncrhonous
d1694 1
a1694 1
* acc_is_present::              Indiciate whether host variable / array is
d1698 2
d1708 7
d1733 1
a1733 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1743 1
a1743 1
     This function indicates to the runtime library which device typr,
d1755 1
a1755 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1768 6
d1782 1
a1782 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1793 1
a1793 1
     specified by NUM, associated with the specifed device type
d1797 2
a1798 1
     _Prototype_:   'acc_set_device_num(int num, acc_device_t devicetype);'
d1806 1
a1806 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1810 1
a1810 1
File: libgomp.info,  Node: acc_get_device_num,  Next: acc_async_test,  Prev: acc_set_device_num,  Up: OpenACC Runtime Library Routines
d1829 1
a1829 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1833 48
a1880 1
File: libgomp.info,  Node: acc_async_test,  Next: acc_async_test_all,  Prev: acc_get_device_num,  Up: OpenACC Runtime Library Routines
d1882 1
a1882 1
5.6 'acc_async_test' - Test for completion of a specific asynchronous operation.
d1886 1
a1886 1
     This function tests for completion of the asynchrounous operation
d1889 1
a1889 1
     Fortran will return a 'true'.  If the asynchrounous operation has
d1901 2
a1902 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.6.
d1907 1
a1907 1
5.7 'acc_async_test_all' - Tests for completion of all asynchronous operations.
d1911 1
a1911 1
     This function tests for completion of all asynchrounous operations.
d1925 2
a1926 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.7.
d1931 1
a1931 1
5.8 'acc_wait' - Wait for completion of a specific asynchronous operation.
d1953 2
a1954 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.8.
d1959 2
a1960 2
5.9 'acc_wait_all' - Waits for completion of all asynchronous operations.
=========================================================================
d1979 2
a1980 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.10.
d1985 1
a1985 1
5.10 'acc_wait_all_async' - Wait for completion of all asynchronous operations.
d2001 2
a2002 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.11.
d2007 1
a2007 1
5.11 'acc_wait_async' - Wait for completion of asynchronous operations.
d2022 2
a2023 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.9.
d2028 1
a2028 1
5.12 'acc_init' - Initialize runtime for a specific device type.
d2043 2
a2044 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.12.
d2049 1
a2049 1
5.13 'acc_shutdown' - Shuts down the runtime for a specific device type.
d2064 2
a2065 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.13.
d2070 1
a2070 1
5.14 'acc_on_device' - Whether executing on a particular device
d2076 1
a2076 1
     value is returned to indicate the device is execiting on the
d2090 2
a2091 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.14.
d2096 1
a2096 1
5.15 'acc_malloc' - Allocate device memory.
d2107 2
a2108 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.15.
d2113 1
a2113 1
5.16 'acc_free' - Free device memory.
d2123 2
a2124 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.16.
d2129 1
a2129 1
5.17 'acc_copyin' - Allocate device memory and copy host memory to it.
d2143 2
d2152 7
d2161 2
a2162 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.17.
d2167 1
a2167 1
5.18 'acc_present_or_copyin' - If the data is not present on the device, allocate device memory and copy from host memory.
d2171 1
a2171 1
     This function tests if the host data specifed by A and of length
d2180 4
d2201 2
a2202 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.18.
d2207 1
a2207 1
5.19 'acc_create' - Allocate device memory and map it to host memory.
d2222 2
d2231 7
d2240 2
a2241 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.19.
d2246 1
a2246 1
5.20 'acc_present_or_create' - If the data is not present on the device, allocate device memory and map it to host memory.
d2250 1
a2250 1
     This function tests if the host data specifed by A and of length
d2259 4
d2280 2
a2281 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.20.
d2286 1
a2286 1
5.21 'acc_copyout' - Copy device memory to host memory.
d2299 4
d2310 19
d2331 2
a2332 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.21.
d2337 1
a2337 1
5.22 'acc_delete' - Free device memory.
d2350 4
d2361 19
d2382 2
a2383 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.22.
d2388 1
a2388 1
5.23 'acc_update_device' - Update device memory from mapped host memory.
d2402 1
d2410 7
d2419 2
a2420 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.23.
d2425 1
a2425 1
5.24 'acc_update_self' - Update host memory from mapped device memory.
d2439 2
d2448 7
d2457 2
a2458 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.24.
d2463 1
a2463 1
5.25 'acc_map_data' - Map previously allocated device memory to host memory.
d2475 2
a2476 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.25.
d2481 1
a2481 1
5.26 'acc_unmap_data' - Unmap device memory from host memory.
d2492 2
a2493 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.26.
d2498 1
a2498 1
5.27 'acc_deviceptr' - Get device pointer associated with specific host address.
d2509 2
a2510 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.27.
d2515 1
a2515 1
5.28 'acc_hostptr' - Get host pointer associated with specific device address.
d2526 2
a2527 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.28.
d2532 1
a2532 1
5.29 'acc_is_present' - Indicate whether host variable / array is present on device.
d2562 2
a2563 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.29.
d2568 1
a2568 1
5.30 'acc_memcpy_to_device' - Copy host memory to device memory.
d2581 2
a2582 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.30.
d2585 1
a2585 1
File: libgomp.info,  Node: acc_memcpy_from_device,  Next: acc_get_current_cuda_device,  Prev: acc_memcpy_to_device,  Up: OpenACC Runtime Library Routines
d2587 1
a2587 1
5.31 'acc_memcpy_from_device' - Copy device memory to host memory.
d2600 40
a2639 2
     OpenACC specification v2.0 (https://www.openacc.org), section
     3.2.31.
d2642 1
a2642 1
File: libgomp.info,  Node: acc_get_current_cuda_device,  Next: acc_get_current_cuda_context,  Prev: acc_memcpy_from_device,  Up: OpenACC Runtime Library Routines
d2644 1
a2644 1
5.32 'acc_get_current_cuda_device' - Get CUDA device handle.
d2655 1
a2655 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2661 1
a2661 1
5.33 'acc_get_current_cuda_context' - Get CUDA context handle.
d2672 1
a2672 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2678 1
a2678 1
5.34 'acc_get_cuda_stream' - Get CUDA stream handle.
d2690 1
a2690 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2694 1
a2694 1
File: libgomp.info,  Node: acc_set_cuda_stream,  Prev: acc_get_cuda_stream,  Up: OpenACC Runtime Library Routines
d2696 1
a2696 1
5.35 'acc_set_cuda_stream' - Set CUDA stream handle.
d2712 1
a2712 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2716 75
d2798 3
a2800 1
'GCC_ACC_NOTIFY' is used for diagnostic purposes.
d2806 1
d2816 1
a2816 1
     OpenACC specification v2.0 (https://www.openacc.org), section 4.1.
d2819 1
a2819 1
File: libgomp.info,  Node: ACC_DEVICE_NUM,  Next: GCC_ACC_NOTIFY,  Prev: ACC_DEVICE_TYPE,  Up: OpenACC Environment Variables
d2825 13
a2837 1
     OpenACC specification v2.0 (https://www.openacc.org), section 4.2.
d2840 1
a2840 1
File: libgomp.info,  Node: GCC_ACC_NOTIFY,  Prev: ACC_DEVICE_NUM,  Up: OpenACC Environment Variables
d2842 1
a2842 1
6.3 'GCC_ACC_NOTIFY'
d2861 1
a2861 1
   The primary means by that the asychronous functionality is accessed
d2892 1
a2892 1
File: libgomp.info,  Node: OpenACC Library Interoperability,  Next: The libgomp ABI,  Prev: CUDA Streams Usage,  Up: Top
d3031 2
a3032 2
'ACC_DEVICE_TYPE' and 'ACC_DEVICE_NUM', respecively.  These two
environement variables can be used as an alternative to calling
d3053 1
a3053 1
2.0.
d3056 7
a3062 1
File: libgomp.info,  Node: The libgomp ABI,  Next: Reporting Bugs,  Prev: OpenACC Library Interoperability,  Up: Top
d3064 248
a3311 2
9 The libgomp ABI
*****************
d3337 2
a3338 2
9.1 Implementing MASTER construct
=================================
d3350 2
a3351 2
9.2 Implementing CRITICAL construct
===================================
d3372 2
a3373 2
9.3 Implementing ATOMIC construct
=================================
d3388 2
a3389 2
9.4 Implementing FLUSH construct
================================
d3396 2
a3397 2
9.5 Implementing BARRIER construct
==================================
d3404 2
a3405 2
9.6 Implementing THREADPRIVATE construct
========================================
d3419 2
a3420 2
9.7 Implementing PRIVATE clause
===============================
d3433 2
a3434 2
9.8 Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses
========================================================================
d3471 2
a3472 2
9.9 Implementing REDUCTION clause
=================================
d3483 2
a3484 2
9.10 Implementing PARALLEL construct
====================================
d3527 2
a3528 2
9.11 Implementing FOR construct
===============================
d3589 2
a3590 2
9.12 Implementing ORDERED construct
===================================
d3598 2
a3599 2
9.13 Implementing SECTIONS construct
====================================
d3633 2
a3634 2
9.14 Implementing SINGLE construct
==================================
d3670 2
a3671 2
9.15 Implementing OpenACC's PARALLEL construct
==============================================
d3678 1
a3678 1
10 Reporting Bugs
d3682 1
a3682 1
be reported via Bugzilla (http://gcc.gnu.org/bugzilla/).  Please add
d4400 1
a4400 1
please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
d4943 2
d4980 139
a5118 130
Node: Enabling OpenMP4613
Node: Runtime Library Routines5401
Node: omp_get_active_level8478
Node: omp_get_ancestor_thread_num9178
Node: omp_get_cancellation10108
Node: omp_get_default_device10922
Node: omp_get_dynamic11598
Node: omp_get_level12473
Node: omp_get_max_active_levels13093
Node: omp_get_max_task_priority13798
Node: omp_get_max_threads14418
Node: omp_get_nested15175
Node: omp_get_num_devices16089
Node: omp_get_num_procs16610
Node: omp_get_num_teams17149
Node: omp_get_num_threads17665
Node: omp_get_proc_bind18754
Node: omp_get_schedule19675
Node: omp_get_team_num20629
Node: omp_get_team_size21128
Node: omp_get_thread_limit22088
Node: omp_get_thread_num22707
Node: omp_in_parallel23578
Node: omp_in_final24227
Node: omp_is_initial_device24901
Node: omp_set_default_device25594
Node: omp_set_dynamic26385
Node: omp_set_max_active_levels27271
Node: omp_set_nested28048
Node: omp_set_num_threads28940
Node: omp_set_schedule29808
Node: omp_init_lock30889
Node: omp_set_lock31542
Node: omp_test_lock32397
Node: omp_unset_lock33373
Node: omp_destroy_lock34304
Node: omp_init_nest_lock34981
Node: omp_set_nest_lock35716
Node: omp_test_nest_lock36631
Node: omp_unset_nest_lock37658
Node: omp_destroy_nest_lock38673
Node: omp_get_wtick39424
Node: omp_get_wtime40016
Node: Environment Variables40792
Node: OMP_CANCELLATION42361
Node: OMP_DISPLAY_ENV42894
Node: OMP_DEFAULT_DEVICE43597
Node: OMP_DYNAMIC44377
Node: OMP_MAX_ACTIVE_LEVELS44973
Node: OMP_MAX_TASK_PRIORITY45623
Node: OMP_NESTED46281
Node: OMP_NUM_THREADS46886
Node: OMP_PROC_BIND47574
Node: OMP_PLACES48766
Node: OMP_STACKSIZE50943
Node: OMP_SCHEDULE51767
Node: OMP_THREAD_LIMIT52465
Node: OMP_WAIT_POLICY53065
Node: GOMP_CPU_AFFINITY53757
Node: GOMP_DEBUG55487
Node: GOMP_STACKSIZE55994
Node: GOMP_SPINCOUNT56823
Node: GOMP_RTEMS_THREAD_POOLS58027
Node: Enabling OpenACC60205
Node: OpenACC Runtime Library Routines61198
Node: acc_get_num_devices64992
Node: acc_set_device_type65718
Node: acc_get_device_type66482
Node: acc_set_device_num67197
Node: acc_get_device_num67981
Node: acc_async_test68778
Node: acc_async_test_all69770
Node: acc_wait70670
Node: acc_wait_all71532
Node: acc_wait_all_async72291
Node: acc_wait_async73043
Node: acc_init73750
Node: acc_shutdown74396
Node: acc_on_device75064
Node: acc_malloc76068
Node: acc_free76567
Node: acc_copyin76994
Node: acc_present_or_copyin78104
Node: acc_create79730
Node: acc_present_or_create80885
Node: acc_copyout82519
Node: acc_delete83542
Node: acc_update_device84517
Node: acc_update_self85629
Node: acc_map_data86733
Node: acc_unmap_data87418
Node: acc_deviceptr87939
Node: acc_hostptr88509
Node: acc_is_present89073
Node: acc_memcpy_to_device90600
Node: acc_memcpy_from_device91263
Node: acc_get_current_cuda_device91947
Node: acc_get_current_cuda_context92544
Node: acc_get_cuda_stream93144
Node: acc_set_cuda_stream93735
Node: OpenACC Environment Variables94380
Node: ACC_DEVICE_TYPE94839
Node: ACC_DEVICE_NUM95075
Node: GCC_ACC_NOTIFY95332
Node: CUDA Streams Usage95555
Ref: CUDA Streams Usage-Footnote-197455
Node: OpenACC Library Interoperability97564
Ref: OpenACC Library Interoperability-Footnote-1103920
Ref: OpenACC Library Interoperability-Footnote-2104172
Node: The libgomp ABI104380
Node: Implementing MASTER construct105236
Node: Implementing CRITICAL construct105650
Node: Implementing ATOMIC construct106389
Node: Implementing FLUSH construct106870
Node: Implementing BARRIER construct107141
Node: Implementing THREADPRIVATE construct107410
Node: Implementing PRIVATE clause108063
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses108644
Node: Implementing REDUCTION clause109968
Node: Implementing PARALLEL construct110525
Node: Implementing FOR construct111782
Node: Implementing ORDERED construct113780
Node: Implementing SECTIONS construct114086
Node: Implementing SINGLE construct114852
Node: Implementing OpenACC's PARALLEL construct115564
Node: Reporting Bugs115822
Node: Copying116184
Node: GNU Free Documentation License153731
Node: Funding178854
Node: Library Index181380
@


1.11
log
@merge GCC 8.3.0 pass 1.  will not compile yet.  thare are still
about 25 files with merge issues.
@
text
@d4 1
a4 1
Copyright (C) 2006-2018 Free Software Foundation, Inc.
d36 1
a36 1
   Copyright (C) 2006-2018 Free Software Foundation, Inc.
d64 1
a64 1
OpenMP (http://www.openmp.org) Application Programming Interface (API)
d78 2
a79 1
* Runtime Library Routines::   The OpenMP runtime application programming
d81 3
a83 2
* Environment Variables::      Influencing runtime behavior with environment
                               variables.
d120 1
a120 1
in the OpenMP Application Program Interface (http://www.openmp.org)
d126 2
a127 2
2 Runtime Library Routines
**************************
d207 1
a207 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.20.
d233 1
a233 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.18.
d257 1
a257 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.9.
d278 1
a278 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.30.
d305 1
a305 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.8.
d327 1
a327 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.17.
d349 1
a349 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.16.
d369 1
a369 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.29.
d392 1
a392 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.3.
d420 1
a420 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.11.
d438 1
a438 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.31.
d456 1
a456 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.5.
d474 1
a474 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.32.
d504 1
a504 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.2.
d531 1
a531 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.22.
d558 1
a558 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.13.
d576 1
a576 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.33.
d603 1
a603 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.19.
d624 1
a624 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.14.
d649 1
a649 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.4.
d669 1
a669 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.6.
d689 1
a689 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.21.
d709 1
a709 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.34.
d732 1
a732 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.29.
d757 1
a757 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.7.
d780 1
a780 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.15.
d805 1
a805 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.10.
d830 1
a830 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.1.
d859 1
a859 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.12.
d882 1
a882 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.1.
d908 1
a908 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.4.
d934 1
a934 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.6.
d961 1
a961 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.5.
d984 1
a984 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.3.
d1007 1
a1007 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.1.
d1032 1
a1032 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.4.
d1058 1
a1058 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.6.
d1086 1
a1086 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.5.
d1110 1
a1110 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.3.
d1132 1
a1132 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.4.2.
d1157 1
a1157 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.4.1.
d1162 2
a1163 2
3 Environment Variables
***********************
d1206 1
a1206 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.11
d1222 1
a1222 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.12
d1241 1
a1241 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.13
d1259 1
a1259 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.3
d1276 1
a1276 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.9
d1295 1
a1295 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.14
d1313 1
a1313 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.6
d1332 1
a1332 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.2
d1359 1
a1359 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.4
d1401 1
a1401 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.5
d1420 1
a1420 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.7
d1439 1
a1439 1
     OpenMP specification v4.5 (http://www.openmp.org/), Sections
d1457 1
a1457 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.10
d1476 1
a1476 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.8
d2479 1
a2479 1
     _Prototype_:   'acc_get_current_cuda_context(void);'
d2492 3
a2494 2
     This function returns the CUDA stream handle.  This handle is the
     same as used by the CUDA Runtime or Driver API's.
d2497 1
a2497 1
     _Prototype_:   'acc_get_cuda_stream(void);'
d2511 6
a2516 1
     the asynchronous value specified by ASYNC.
d2519 1
a2519 1
     _Prototype_:   'acc_set_cuda_stream(int async void *stream);'
d4446 130
a4575 130
Node: Enabling OpenMP4489
Node: Runtime Library Routines5276
Node: omp_get_active_level8339
Node: omp_get_ancestor_thread_num9039
Node: omp_get_cancellation9969
Node: omp_get_default_device10783
Node: omp_get_dynamic11459
Node: omp_get_level12334
Node: omp_get_max_active_levels12954
Node: omp_get_max_task_priority13659
Node: omp_get_max_threads14279
Node: omp_get_nested15036
Node: omp_get_num_devices15950
Node: omp_get_num_procs16471
Node: omp_get_num_teams17010
Node: omp_get_num_threads17526
Node: omp_get_proc_bind18615
Node: omp_get_schedule19536
Node: omp_get_team_num20490
Node: omp_get_team_size20989
Node: omp_get_thread_limit21949
Node: omp_get_thread_num22568
Node: omp_in_parallel23439
Node: omp_in_final24088
Node: omp_is_initial_device24762
Node: omp_set_default_device25455
Node: omp_set_dynamic26246
Node: omp_set_max_active_levels27132
Node: omp_set_nested27909
Node: omp_set_num_threads28801
Node: omp_set_schedule29669
Node: omp_init_lock30750
Node: omp_set_lock31403
Node: omp_test_lock32258
Node: omp_unset_lock33234
Node: omp_destroy_lock34165
Node: omp_init_nest_lock34842
Node: omp_set_nest_lock35577
Node: omp_test_nest_lock36492
Node: omp_unset_nest_lock37519
Node: omp_destroy_nest_lock38534
Node: omp_get_wtick39285
Node: omp_get_wtime39877
Node: Environment Variables40653
Node: OMP_CANCELLATION42208
Node: OMP_DISPLAY_ENV42741
Node: OMP_DEFAULT_DEVICE43444
Node: OMP_DYNAMIC44224
Node: OMP_MAX_ACTIVE_LEVELS44820
Node: OMP_MAX_TASK_PRIORITY45470
Node: OMP_NESTED46128
Node: OMP_NUM_THREADS46733
Node: OMP_PROC_BIND47421
Node: OMP_PLACES48613
Node: OMP_STACKSIZE50790
Node: OMP_SCHEDULE51614
Node: OMP_THREAD_LIMIT52312
Node: OMP_WAIT_POLICY52912
Node: GOMP_CPU_AFFINITY53604
Node: GOMP_DEBUG55334
Node: GOMP_STACKSIZE55841
Node: GOMP_SPINCOUNT56670
Node: GOMP_RTEMS_THREAD_POOLS57874
Node: Enabling OpenACC60052
Node: OpenACC Runtime Library Routines61045
Node: acc_get_num_devices64839
Node: acc_set_device_type65565
Node: acc_get_device_type66329
Node: acc_set_device_num67044
Node: acc_get_device_num67828
Node: acc_async_test68625
Node: acc_async_test_all69617
Node: acc_wait70517
Node: acc_wait_all71379
Node: acc_wait_all_async72138
Node: acc_wait_async72890
Node: acc_init73597
Node: acc_shutdown74243
Node: acc_on_device74911
Node: acc_malloc75915
Node: acc_free76414
Node: acc_copyin76841
Node: acc_present_or_copyin77951
Node: acc_create79577
Node: acc_present_or_create80732
Node: acc_copyout82366
Node: acc_delete83389
Node: acc_update_device84364
Node: acc_update_self85476
Node: acc_map_data86580
Node: acc_unmap_data87265
Node: acc_deviceptr87786
Node: acc_hostptr88356
Node: acc_is_present88920
Node: acc_memcpy_to_device90447
Node: acc_memcpy_from_device91110
Node: acc_get_current_cuda_device91794
Node: acc_get_current_cuda_context92391
Node: acc_get_cuda_stream92985
Node: acc_set_cuda_stream93541
Node: OpenACC Environment Variables94073
Node: ACC_DEVICE_TYPE94532
Node: ACC_DEVICE_NUM94768
Node: GCC_ACC_NOTIFY95025
Node: CUDA Streams Usage95248
Ref: CUDA Streams Usage-Footnote-197148
Node: OpenACC Library Interoperability97257
Ref: OpenACC Library Interoperability-Footnote-1103613
Ref: OpenACC Library Interoperability-Footnote-2103865
Node: The libgomp ABI104073
Node: Implementing MASTER construct104929
Node: Implementing CRITICAL construct105343
Node: Implementing ATOMIC construct106082
Node: Implementing FLUSH construct106563
Node: Implementing BARRIER construct106834
Node: Implementing THREADPRIVATE construct107103
Node: Implementing PRIVATE clause107756
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses108337
Node: Implementing REDUCTION clause109661
Node: Implementing PARALLEL construct110218
Node: Implementing FOR construct111475
Node: Implementing ORDERED construct113473
Node: Implementing SECTIONS construct113779
Node: Implementing SINGLE construct114545
Node: Implementing OpenACC's PARALLEL construct115257
Node: Reporting Bugs115515
Node: Copying115877
Node: GNU Free Documentation License153424
Node: Funding178547
Node: Library Index181073
@


1.10
log
@first pass at merging GCC 7.4.0.  unlikely to compile..
@
text
@d1 2
a2 2
This is libgomp.info, produced by makeinfo version 4.13 from
/space/rguenther/gcc-7.4.0/gcc-7.4.0/libgomp/libgomp.texi.
d4 1
a4 1
Copyright (C) 2006-2017 Free Software Foundation, Inc.
d21 2
a22 3
software.  Copies published by the Free Software Foundation raise
funds for GNU development.

d36 1
a36 1
   Copyright (C) 2006-2017 Free Software Foundation, Inc.
d53 2
a54 2
software.  Copies published by the Free Software Foundation raise
funds for GNU development.
d62 6
a67 6
This manual documents the usage of libgomp, the GNU Offloading and
Multi Processing Runtime Library.  This includes the GNU implementation
of the OpenMP (http://www.openmp.org) Application Programming Interface
(API) for multi-platform shared-memory parallel programming in C/C++
and Fortran, and the GNU implementation of the OpenACC
(http://www.openacc.org/) Application Programming Interface (API) for
d110 10
a119 11
compile-time flag `-fopenmp' must be specified.  This enables the
OpenMP directive `#pragma omp' in C/C++ and `!$omp' directives in free
form, `c$omp', `*$omp' and `!$omp' directives in fixed form, `!$'
conditional compilation sentinels in free form and `c$', `*$' and `!$'
sentinels in fixed form, for Fortran.  The flag also arranges for
automatic linking of the OpenMP runtime library (*note Runtime Library
Routines::).

   A complete description of all OpenMP directives accepted may be
found in the OpenMP Application Program Interface
(http://www.openmp.org) manual, version 4.5.
d187 1
a187 1
2.1 `omp_get_active_level' - Number of parallel regions
d195 1
a195 1
     _Prototype_:  `int omp_get_active_level(void);'
d198 1
a198 1
     _Interface_:  `integer function omp_get_active_level()'
d210 1
a210 1
2.2 `omp_get_ancestor_thread_num' - Ancestor thread ID
d216 2
a217 2
     outside zero to `omp_get_level' -1 is returned; if LEVEL is
     `omp_get_level' the result is identical to `omp_get_thread_num'.
d220 1
a220 1
     _Prototype_:  `int omp_get_ancestor_thread_num(int level);'
d223 2
a224 2
     _Interface_:  `integer function omp_get_ancestor_thread_num(level)'
                   `integer level'
d236 1
a236 1
2.3 `omp_get_cancellation' - Whether cancellation support is enabled
d240 3
a242 3
     This function returns `true' if cancellation is activated, `false'
     otherwise.  Here, `true' and `false' represent their
     language-specific counterparts.  Unless `OMP_CANCELLATION' is set
d246 1
a246 1
     _Prototype_:  `int omp_get_cancellation(void);'
d249 1
a249 1
     _Interface_:  `logical function omp_get_cancellation()'
d260 1
a260 1
2.4 `omp_get_default_device' - Get the default device for target regions
d267 1
a267 1
     _Prototype_:  `int omp_get_default_device(void);'
d270 1
a270 1
     _Interface_:  `integer function omp_get_default_device()'
d281 1
a281 1
2.5 `omp_get_dynamic' - Dynamic teams setting
d285 2
a286 2
     This function returns `true' if enabled, `false' otherwise.  Here,
     `true' and `false' represent their language-specific counterparts.
d289 3
a291 3
     `OMP_DYNAMIC' environment variable or at runtime using
     `omp_set_dynamic'.  If undefined, dynamic adjustment is disabled
     by default.
d294 1
a294 1
     _Prototype_:  `int omp_get_dynamic(void);'
d297 1
a297 1
     _Interface_:  `logical function omp_get_dynamic()'
d308 1
a308 1
2.6 `omp_get_level' - Obtain the current nesting level
d316 1
a316 1
     _Prototype_:  `int omp_get_level(void);'
d319 1
a319 1
     _Interface_:  `integer function omp_level()'
d330 1
a330 1
2.7 `omp_get_max_active_levels' - Maximum number of active regions
d338 1
a338 1
     _Prototype_:  `int omp_get_max_active_levels(void);'
d341 1
a341 1
     _Interface_:  `integer function omp_get_max_active_levels()'
d352 1
a352 1
2.8 `omp_get_max_task_priority' - Maximum priority value
d361 1
a361 1
     _Prototype_:  `int omp_get_max_task_priority(void);'
d364 1
a364 1
     _Interface_:  `integer function omp_get_max_task_priority()'
d372 1
a372 1
2.9 `omp_get_max_threads' - Maximum number of threads of parallel region
d377 1
a377 1
     region that does not use the clause `num_threads'.
d380 1
a380 1
     _Prototype_:  `int omp_get_max_threads(void);'
d383 1
a383 1
     _Interface_:  `integer function omp_get_max_threads()'
d395 1
a395 1
2.10 `omp_get_nested' - Nested parallel regions
d399 2
a400 2
     This function returns `true' if nested parallel regions are
     enabled, `false' otherwise.  Here, `true' and `false' represent
d404 2
a405 2
     `OMP_NESTED' environment variable or at runtime using
     `omp_set_nested'.  If undefined, nested parallel regions are
d409 1
a409 1
     _Prototype_:  `int omp_get_nested(void);'
d412 1
a412 1
     _Interface_:  `logical function omp_get_nested()'
d423 1
a423 1
2.11 `omp_get_num_devices' - Number of target devices
d430 1
a430 1
     _Prototype_:  `int omp_get_num_devices(void);'
d433 1
a433 1
     _Interface_:  `integer function omp_get_num_devices()'
d441 1
a441 1
2.12 `omp_get_num_procs' - Number of processors online
d448 1
a448 1
     _Prototype_:  `int omp_get_num_procs(void);'
d451 1
a451 1
     _Interface_:  `integer function omp_get_num_procs()'
d459 1
a459 1
2.13 `omp_get_num_teams' - Number of teams
d466 1
a466 1
     _Prototype_:  `int omp_get_num_teams(void);'
d469 1
a469 1
     _Interface_:  `integer function omp_get_num_teams()'
d477 1
a477 1
2.14 `omp_get_num_threads' - Size of the active team
d481 2
a482 2
     Returns the number of threads in the current team.  In a
     sequential section of the program `omp_get_num_threads' returns 1.
d485 5
a489 5
     `OMP_NUM_THREADS' environment variable.  At runtime, the size of
     the current team may be set either by the `NUM_THREADS' clause or
     by `omp_set_num_threads'.  If none of the above were used to
     define a specific value and `OMP_DYNAMIC' is disabled, one thread
     per CPU online is used.
d492 1
a492 1
     _Prototype_:  `int omp_get_num_threads(void);'
d495 1
a495 1
     _Interface_:  `integer function omp_get_num_threads()'
d507 1
a507 1
2.15 `omp_get_proc_bind' - Whether theads may be moved between CPUs
d511 5
a515 5
     This functions returns the currently active thread affinity
     policy, which is set via `OMP_PROC_BIND'.  Possible values are
     `omp_proc_bind_false', `omp_proc_bind_true',
     `omp_proc_bind_master', `omp_proc_bind_close' and
     `omp_proc_bind_spread'.
d518 1
a518 1
     _Prototype_:  `omp_proc_bind_t omp_get_proc_bind(void);'
d521 2
a522 2
     _Interface_:  `integer(kind=omp_proc_bind_kind) function
                   omp_get_proc_bind()'
d534 1
a534 1
2.16 `omp_get_schedule' - Obtain the runtime scheduling method
d539 2
a540 2
     set to the value `omp_sched_static', `omp_sched_dynamic',
     `omp_sched_guided' or `omp_sched_auto'.  The second argument,
d544 2
a545 2
     _Prototype_:  `void omp_get_schedule(omp_sched_t *kind, int
                   *chunk_size);'
d548 3
a550 3
     _Interface_:  `subroutine omp_get_schedule(kind, chunk_size)'
                   `integer(kind=omp_sched_kind) kind'
                   `integer chunk_size'
d561 1
a561 1
2.17 `omp_get_team_num' - Get team number
d568 1
a568 1
     _Prototype_:  `int omp_get_team_num(void);'
d571 1
a571 1
     _Interface_:  `integer function omp_get_team_num()'
d579 1
a579 1
2.18 `omp_get_team_size' - Number of threads in a team
d585 3
a587 3
     values of LEVEL outside zero to `omp_get_level', -1 is returned;
     if LEVEL is zero, 1 is returned, and for `omp_get_level', the
     result is identical to `omp_get_num_threads'.
d590 1
a590 1
     _Prototype_:  `int omp_get_team_size(int level);'
d593 2
a594 2
     _Interface_:  `integer function omp_get_team_size(level)'
                   `integer level'
d606 1
a606 1
2.19 `omp_get_thread_limit' - Maximum number of threads
d613 1
a613 1
     _Prototype_:  `int omp_get_thread_limit(void);'
d616 1
a616 1
     _Interface_:  `integer function omp_get_thread_limit()'
d627 1
a627 1
2.20 `omp_get_thread_num' - Current thread ID
d632 4
a635 4
     team.  In a sequential parts of the program, `omp_get_thread_num'
     always returns 0.  In parallel regions the return value varies
     from 0 to `omp_get_num_threads'-1 inclusive.  The return value of
     the master thread of a team is always 0.
d638 1
a638 1
     _Prototype_:  `int omp_get_thread_num(void);'
d641 1
a641 1
     _Interface_:  `integer function omp_get_thread_num()'
d652 1
a652 1
2.21 `omp_in_parallel' - Whether a parallel region is active
d656 2
a657 2
     This function returns `true' if currently running in parallel,
     `false' otherwise.  Here, `true' and `false' represent their
d661 1
a661 1
     _Prototype_:  `int omp_in_parallel(void);'
d664 1
a664 1
     _Interface_:  `logical function omp_in_parallel()'
d672 1
a672 1
2.22 `omp_in_final' - Whether in final or included task region
d676 2
a677 2
     This function returns `true' if currently running in a final or
     included task region, `false' otherwise.  Here, `true' and `false'
d681 1
a681 1
     _Prototype_:  `int omp_in_final(void);'
d684 1
a684 1
     _Interface_:  `logical function omp_in_final()'
d692 1
a692 1
2.23 `omp_is_initial_device' - Whether executing on the host device
d696 2
a697 2
     This function returns `true' if currently running on the host
     device, `false' otherwise.  Here, `true' and `false' represent
d701 1
a701 1
     _Prototype_:  `int omp_is_initial_device(void);'
d704 1
a704 1
     _Interface_:  `logical function omp_is_initial_device()'
d712 1
a712 1
2.24 `omp_set_default_device' - Set the default device for target regions
d720 1
a720 1
     _Prototype_:  `void omp_set_default_device(int device_num);'
d723 2
a724 2
     _Interface_:  `subroutine omp_set_default_device(device_num)'
                   `integer device_num'
d735 1
a735 1
2.25 `omp_set_dynamic' - Enable/disable dynamic teams
d741 2
a742 2
     of `true' and `false', where `true' enables dynamic adjustment of
     team sizes and `false' disables it.
d745 1
a745 1
     _Prototype_:  `void omp_set_dynamic(int dynamic_threads);'
d748 2
a749 2
     _Interface_:  `subroutine omp_set_dynamic(dynamic_threads)'
                   `logical, intent(in) :: dynamic_threads'
d760 1
a760 1
2.26 `omp_set_max_active_levels' - Limits the number of active parallel regions
d768 1
a768 1
     _Prototype_:  `void omp_set_max_active_levels(int max_levels);'
d771 2
a772 2
     _Interface_:  `subroutine omp_set_max_active_levels(max_levels)'
                   `integer max_levels'
d783 1
a783 1
2.27 `omp_set_nested' - Enable/disable nested parallel regions
d789 2
a790 2
     language-specific equivalent of `true' and `false', where `true'
     enables dynamic adjustment of team sizes and `false' disables it.
d793 1
a793 1
     _Prototype_:  `void omp_set_nested(int nested);'
d796 2
a797 2
     _Interface_:  `subroutine omp_set_nested(nested)'
                   `logical, intent(in) :: nested'
d808 1
a808 1
2.28 `omp_set_num_threads' - Set upper team size limit
d813 2
a814 2
     parallel sections, if those do not specify a `num_threads' clause.
     The argument of `omp_set_num_threads' shall be a positive integer.
d817 1
a817 1
     _Prototype_:  `void omp_set_num_threads(int num_threads);'
d820 2
a821 2
     _Interface_:  `subroutine omp_set_num_threads(num_threads)'
                   `integer, intent(in) :: num_threads'
d833 1
a833 1
2.29 `omp_set_schedule' - Set the runtime scheduling method
d838 2
a839 2
     value `omp_sched_static', `omp_sched_dynamic', `omp_sched_guided'
     or `omp_sched_auto'.  Except for `omp_sched_auto', the chunk size
d841 1
a841 1
     value if zero or negative.  For `omp_sched_auto' the CHUNK_SIZE
d845 2
a846 2
     _Prototype_:  `void omp_set_schedule(omp_sched_t kind, int
                   chunk_size);'
d849 3
a851 3
     _Interface_:  `subroutine omp_set_schedule(kind, chunk_size)'
                   `integer(kind=omp_sched_kind) kind'
                   `integer chunk_size'
d862 1
a862 1
2.30 `omp_init_lock' - Initialize simple lock
d870 1
a870 1
     _Prototype_:  `void omp_init_lock(omp_lock_t *lock);'
d873 2
a874 2
     _Interface_:  `subroutine omp_init_lock(svar)'
                   `integer(omp_lock_kind), intent(out) :: svar'
d885 1
a885 1
2.31 `omp_set_lock' - Wait for and set simple lock
d889 4
a892 4
     Before setting a simple lock, the lock variable must be
     initialized by `omp_init_lock'.  The calling thread is blocked
     until the lock is available.  If the lock is already held by the
     current thread, a deadlock occurs.
d895 1
a895 1
     _Prototype_:  `void omp_set_lock(omp_lock_t *lock);'
d898 2
a899 2
     _Interface_:  `subroutine omp_set_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d911 1
a911 1
2.32 `omp_test_lock' - Test and set simple lock if available
d915 5
a919 5
     Before setting a simple lock, the lock variable must be
     initialized by `omp_init_lock'.  Contrary to `omp_set_lock',
     `omp_test_lock' does not block if the lock is not available.  This
     function returns `true' upon success, `false' otherwise.  Here,
     `true' and `false' represent their language-specific counterparts.
d922 1
a922 1
     _Prototype_:  `int omp_test_lock(omp_lock_t *lock);'
d925 2
a926 2
     _Interface_:  `logical function omp_test_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d937 1
a937 1
2.33 `omp_unset_lock' - Unset simple lock
d942 4
a945 4
     `omp_set_lock' or `omp_test_lock' before.  In addition, the lock
     must be held by the thread calling `omp_unset_lock'.  Then, the
     lock becomes unlocked.  If one or more threads attempted to set
     the lock before, one of them is chosen to, again, set the lock to
d949 1
a949 1
     _Prototype_:  `void omp_unset_lock(omp_lock_t *lock);'
d952 2
a953 2
     _Interface_:  `subroutine omp_unset_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d964 1
a964 1
2.34 `omp_destroy_lock' - Destroy simple lock
d972 1
a972 1
     _Prototype_:  `void omp_destroy_lock(omp_lock_t *lock);'
d975 2
a976 2
     _Interface_:  `subroutine omp_destroy_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d987 1
a987 1
2.35 `omp_init_nest_lock' - Initialize nested lock
d995 1
a995 1
     _Prototype_:  `void omp_init_nest_lock(omp_nest_lock_t *lock);'
d998 2
a999 2
     _Interface_:  `subroutine omp_init_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(out) :: nvar'
d1010 1
a1010 1
2.36 `omp_set_nest_lock' - Wait for and set nested lock
d1014 4
a1017 5
     Before setting a nested lock, the lock variable must be
     initialized by `omp_init_nest_lock'.  The calling thread is
     blocked until the lock is available.  If the lock is already held
     by the current thread, the nesting count for the lock is
     incremented.
d1020 1
a1020 1
     _Prototype_:  `void omp_set_nest_lock(omp_nest_lock_t *lock);'
d1023 2
a1024 2
     _Interface_:  `subroutine omp_set_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1035 1
a1035 1
2.37 `omp_test_nest_lock' - Test and set nested lock if available
d1039 5
a1043 6
     Before setting a nested lock, the lock variable must be
     initialized by `omp_init_nest_lock'.  Contrary to
     `omp_set_nest_lock', `omp_test_nest_lock' does not block if the
     lock is not available.  If the lock is already held by the current
     thread, the new nesting count is returned.  Otherwise, the return
     value equals zero.
d1046 1
a1046 1
     _Prototype_:  `int omp_test_nest_lock(omp_nest_lock_t *lock);'
d1049 2
a1050 2
     _Interface_:  `logical function omp_test_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1061 1
a1061 1
2.38 `omp_unset_nest_lock' - Unset nested lock
d1066 1
a1066 1
     `omp_set_nested_lock' or `omp_test_nested_lock' before.  In
d1068 1
a1068 1
     `omp_unset_nested_lock'.  If the nesting count drops to zero, the
d1074 1
a1074 1
     _Prototype_:  `void omp_unset_nest_lock(omp_nest_lock_t *lock);'
d1077 2
a1078 2
     _Interface_:  `subroutine omp_unset_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1089 1
a1089 1
2.39 `omp_destroy_nest_lock' - Destroy nested lock
d1098 1
a1098 1
     _Prototype_:  `void omp_destroy_nest_lock(omp_nest_lock_t *);'
d1101 2
a1102 2
     _Interface_:  `subroutine omp_destroy_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1113 1
a1113 1
2.40 `omp_get_wtick' - Get timer precision
d1121 1
a1121 1
     _Prototype_:  `double omp_get_wtick(void);'
d1124 1
a1124 1
     _Interface_:  `double precision function omp_get_wtick()'
d1135 1
a1135 1
2.41 `omp_get_wtime' - Elapsed wall clock time
d1146 1
a1146 1
     _Prototype_:  `double omp_get_wtime(void);'
d1149 1
a1149 1
     _Interface_:  `double precision function omp_get_wtime()'
d1163 1
a1163 1
The environment variables which beginning with `OMP_' are defined by
d1165 1
a1165 1
beginning with `GOMP_' are GNU extensions.
d1192 1
a1192 1
3.1 `OMP_CANCELLATION' - Set whether cancellation is activated
d1196 3
a1198 3
     If set to `TRUE', the cancellation is activated.  If set to
     `FALSE' or if unset, cancellation is disabled and the `cancel'
     construct is ignored.
d1209 1
a1209 1
3.2 `OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
d1213 1
a1213 1
     If set to `TRUE', the OpenMP version number and the values
d1215 1
a1215 1
     `stderr'.  If set to `VERBOSE', it additionally shows the value of
d1217 1
a1217 1
     or set to `FALSE', this information will not be shown.
d1225 1
a1225 1
3.3 `OMP_DEFAULT_DEVICE' - Set the device used in target regions
d1229 5
a1233 5
     Set to choose the device which is used in a `target' region,
     unless the value is overridden by `omp_set_default_device' or by a
     `device' clause.  The value shall be the nonnegative device
     number. If no device with the given device number exists, the code
     is executed on the host.  If unset, device number 0 will be used.
d1244 1
a1244 1
3.4 `OMP_DYNAMIC' - Dynamic adjustment of threads
d1250 2
a1251 2
     `TRUE' or `FALSE'.  If undefined, dynamic adjustment is disabled
     by default.
d1262 1
a1262 1
3.5 `OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1279 1
a1279 1
3.6 `OMP_MAX_TASK_PRIORITY' - Set the maximum priority
d1282 1
a1282 1
number that can be set for a task.  
d1284 2
a1285 2
     Specifies the initial value for the maximum priority value that
     can be set for a task.  The value of this variable shall be a
d1298 1
a1298 1
3.7 `OMP_NESTED' - Nested parallel regions
d1304 1
a1304 1
     environment variable shall be `TRUE' or `FALSE'.  If undefined,
d1316 1
a1316 1
3.8 `OMP_NUM_THREADS' - Specifies the number of threads to use
d1320 5
a1324 5
     Specifies the default number of threads to use in parallel
     regions.  The value of this variable shall be a comma-separated
     list of positive integers; the value specified the number of
     threads to use for the corresponding nested level.  If undefined
     one thread per CPU is used.
d1335 1
a1335 1
3.9 `OMP_PROC_BIND' - Whether theads may be moved between CPUs
d1340 1
a1340 1
     to `TRUE', OpenMP theads should not be moved; if set to `FALSE'
d1342 1
a1342 1
     values `MASTER', `CLOSE' and `SPREAD' can be used to specify the
d1344 3
a1346 3
     `MASTER' the worker threads are in the same place partition as the
     master thread.  With `CLOSE' those are kept close to the master
     thread in contiguous place partitions.  And with `SPREAD' a sparse
d1349 2
a1350 2
     When undefined, `OMP_PROC_BIND' defaults to `TRUE' when
     `OMP_PLACES' or `GOMP_CPU_AFFINITY' is set and `FALSE' otherwise.
d1362 1
a1362 1
3.10 `OMP_PLACES' - Specifies on which CPUs the theads should be placed
d1366 3
a1368 3
     The thread placement can be either specified using an abstract
     name or by an explicit list of the places.  The abstract names
     `threads', `cores' and `sockets' can be optionally followed by a
d1370 3
a1372 3
     shall be created.  With `threads' each place corresponds to a
     single hardware thread; `cores' to a single core with the
     corresponding number of hardware threads; and with `sockets' the
d1374 1
a1374 1
     be shown by setting the `OMP_DISPLAY_ENV' environment variable.
d1387 2
a1388 2
     specifies the same places list: `"{0,1,2}, {3,4,6}, {7,8,9},
     {10,11,12}"'; `"{0:3}, {3:3}, {7:3}, {10:3}"'; and `"{0:2}:4:3"'.
d1390 2
a1391 2
     If `OMP_PLACES' and `GOMP_CPU_AFFINITY' are unset and
     `OMP_PROC_BIND' is either unset or `false', threads may be moved
d1404 1
a1404 1
3.11 `OMP_STACKSIZE' - Set default thread stack size
d1409 7
a1415 7
     is suffixed by `B', `K', `M' or `G', in which case the size is,
     respectively, in bytes, kilobytes, megabytes or gigabytes.  This
     is different from `pthread_attr_setstacksize' which gets the
     number of bytes as an argument.  If the stack size cannot be set
     due to system constraints, an error is reported and the initial
     stack size is left unchanged.  If undefined, the stack size is
     system dependent.
d1423 1
a1423 1
3.12 `OMP_SCHEDULE' - How threads are scheduled
d1427 5
a1431 5
     Allows to specify `schedule type' and `chunk size'.  The value of
     the variable shall have the form: `type[,chunk]' where `type' is
     one of `static', `dynamic', `guided' or `auto' The optional
     `chunk' size shall be a positive integer.  If undefined, dynamic
     scheduling and a chunk size of 1 is used.
d1443 1
a1443 1
3.13 `OMP_THREAD_LIMIT' - Set the maximum number of threads
d1460 1
a1460 1
3.14 `OMP_WAIT_POLICY' - How waiting threads are handled
d1465 2
a1466 2
     the value is `PASSIVE', waiting threads should not consume CPU
     power while waiting; while the value is `ACTIVE' specifies that
d1479 1
a1479 1
3.15 `GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d1487 2
a1488 2
     (M-N:S).  CPU numbers are zero based.  For example,
     `GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
d1492 1
a1492 1
     beginning of the list.  `GOMP_CPU_AFFINITY=0' binds all threads to
d1497 10
a1506 10
     language-specific library functions, e.g., `getenv' in C or
     `GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
     setting of the `GOMP_CPU_AFFINITY' environment variable.  A
     defined CPU affinity on startup cannot be changed or disabled
     during the runtime of the application.

     If both `GOMP_CPU_AFFINITY' and `OMP_PROC_BIND' are set,
     `OMP_PROC_BIND' has a higher precedence.  If neither has been set
     and `OMP_PROC_BIND' is unset, or when `OMP_PROC_BIND' is set to
     `FALSE', the host system will handle the assignment of threads to
d1515 1
a1515 1
3.16 `GOMP_DEBUG' - Enable debugging output
d1519 2
a1520 2
     Enable debugging output.  The variable should be set to `0'
     (disabled, also the default if not set), or `1' (enabled).
d1529 1
a1529 1
3.17 `GOMP_STACKSIZE' - Set default thread stack size
d1534 1
a1534 1
     from `pthread_attr_setstacksize' which gets the number of bytes as
d1551 1
a1551 1
3.18 `GOMP_SPINCOUNT' - Set the busy-wait spin count
d1557 1
a1557 1
     value may be either `INFINITE', `INFINITY' to always wait actively
d1560 8
a1567 9
     suffixes acting as multiplication factors: `k' (kilo, thousand),
     `M' (mega, million), `G' (giga, billion), or `T' (tera, trillion).
     If undefined, 0 is used when `OMP_WAIT_POLICY' is `PASSIVE',
     300,000 is used when `OMP_WAIT_POLICY' is undefined and 30 billion
     is used when `OMP_WAIT_POLICY' is `ACTIVE'.  If there are more
     OpenMP threads than available CPUs, 1000 and 100 spins are used
     for `OMP_WAIT_POLICY' being `ACTIVE' or undefined, respectively;
     unless the `GOMP_SPINCOUNT' is lower or `OMP_WAIT_POLICY' is
     `PASSIVE'.
d1575 1
a1575 1
3.19 `GOMP_RTEMS_THREAD_POOLS' - Set the RTEMS specific thread pools
d1581 4
a1584 4
     thread pools.  The format for `GOMP_RTEMS_THREAD_POOLS' is a list
     of optional `<thread-pool-count>[$<priority>]@@<scheduler-name>'
     configurations separated by `:' where:
        * `<thread-pool-count>' is the thread pool count for this
d1586 2
a1587 3

        * `$<priority>' is an optional priority for the worker threads
          of a thread pool according to `pthread_setschedparam'.  In
d1593 1
a1593 2

        * `@@<scheduler-name>' is the scheduler instance name according
d1596 4
a1599 5
     instance, then each OpenMP master thread of this scheduler
     instance will use its own dynamically allocated thread pool.  To
     limit the worker thread count of the thread pools, each OpenMP
     master thread must call `omp_set_num_threads'.

d1601 2
a1602 2
     Lets suppose we have three scheduler instances `IO', `WRK0', and
     `WRK1' with `GOMP_RTEMS_THREAD_POOLS' set to `"1@@WRK0:3$4@@WRK1"'.
d1604 1
a1604 1
     `IO'.  In the scheduler instance `WRK0' there is one thread pool
d1607 3
a1609 3
     master thread that created it.  In the scheduler instance `WRK1'
     there are three thread pools available and their worker threads
     run at priority four.
d1618 4
a1621 4
compile-time flag `-fopenacc' must be specified.  This enables the
OpenACC directive `#pragma acc' in C/C++ and `!$accp' directives in
free form, `c$acc', `*$acc' and `!$acc' directives in fixed form, `!$'
conditional compilation sentinels in free form and `c$', `*$' and `!$'
d1627 1
a1627 1
found in the OpenACC (http://www.openacc.org/) Application Programming
d1631 2
a1632 2
future versions of GCC.  See `https://gcc.gnu.org/wiki/OpenACC' for
more information.
d1642 3
a1644 3
throw exceptions.  Generally, they are available only for the host,
with the exception of `acc_on_device', which is available for both the
host and the acceleration device.
d1707 1
a1707 1
5.1 `acc_get_num_devices' - Get number of devices for given device type
d1715 1
a1715 1
     _Prototype_:  `int acc_get_num_devices(acc_device_t devicetype);'
d1718 2
a1719 2
     _Interface_:  `integer function acc_get_num_devices(devicetype)'
                   `integer(kind=acc_device_kind) devicetype'
d1722 1
a1722 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1728 1
a1728 1
5.2 `acc_set_device_type' - Set type of device accelerator to use.
d1737 1
a1737 1
     _Prototype_:  `acc_set_device_type(acc_device_t devicetype);'
d1740 2
a1741 2
     _Interface_:  `subroutine acc_set_device_type(devicetype)'
                   `integer(kind=acc_device_kind) devicetype'
d1744 1
a1744 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1750 1
a1750 1
5.3 `acc_get_device_type' - Get type of device accelerator to be used.
d1758 1
a1758 1
     _Prototype_:  `acc_device_t acc_get_device_type(void);'
d1761 2
a1762 2
     _Interface_:  `function acc_get_device_type(void)'
                   `integer(kind=acc_device_kind) acc_get_device_type'
d1765 1
a1765 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1771 1
a1771 1
5.4 `acc_set_device_num' - Set device number to use.
d1780 1
a1780 2
     _Prototype_:  `acc_set_device_num(int num, acc_device_t
                   devicetype);'
d1783 3
a1785 3
     _Interface_:  `subroutine acc_set_device_num(devicenum, devicetype)'
                   `integer devicenum'
                   `integer(kind=acc_device_kind) devicetype'
d1788 1
a1788 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1794 1
a1794 1
5.5 `acc_get_device_num' - Get device number to be used.
d1803 1
a1803 1
     _Prototype_:  `int acc_get_device_num(acc_device_t devicetype);'
d1806 3
a1808 3
     _Interface_:  `function acc_get_device_num(devicetype)'
                   `integer(kind=acc_device_kind) devicetype'
                   `integer acc_get_device_num'
d1811 1
a1811 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1817 1
a1817 1
5.6 `acc_async_test' - Test for completion of a specific asynchronous operation.
d1822 4
a1825 4
     specified in ARG. In C/C++, a non-zero value will be returned to
     indicate the specified asynchronous operation has completed. While
     Fortran will return a `true'. If the asynchrounous operation has
     not completed, C/C++ returns a zero and Fortran returns a `false'.
d1828 1
a1828 1
     _Prototype_:  `int acc_async_test(int arg);'
d1831 3
a1833 3
     _Interface_:  `function acc_async_test(arg)'
                   `integer(kind=acc_handle_kind) arg'
                   `logical acc_async_test'
d1836 1
a1836 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1842 1
a1842 1
5.7 `acc_async_test_all' - Tests for completion of all asynchronous operations.
d1848 3
a1850 3
     asynchronous operations have completed. While Fortran will return
     a `true'. If any asynchronous operation has not completed, C/C++
     returns a zero and Fortran returns a `false'.
d1853 1
a1853 1
     _Prototype_:  `int acc_async_test_all(void);'
d1856 2
a1857 2
     _Interface_:  `function acc_async_test()'
                   `logical acc_get_device_num'
d1860 1
a1860 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1866 1
a1866 1
5.8 `acc_wait' - Wait for completion of a specific asynchronous operation.
d1874 4
a1877 1
     _Prototype_:  `acc_wait(arg);'
d1880 6
a1885 2
     _Interface_:  `subroutine acc_wait(arg)'
                   `integer(acc_handle_kind) arg'
d1888 1
a1888 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1894 1
a1894 1
5.9 `acc_wait_all' - Waits for completion of all asynchronous operations.
d1902 4
a1905 1
     _Prototype_:  `acc_wait_all(void);'
d1908 4
a1911 1
     _Interface_:  `subroutine acc_wait_async()'
d1914 1
a1914 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1920 1
a1920 1
5.10 `acc_wait_all_async' - Wait for completion of all asynchronous operations.
d1929 1
a1929 1
     _Prototype_:  `acc_wait_all_async(int async);'
d1932 2
a1933 2
     _Interface_:  `subroutine acc_wait_all_async(async)'
                   `integer(acc_handle_kind) async'
d1936 1
a1936 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1942 1
a1942 1
5.11 `acc_wait_async' - Wait for completion of asynchronous operations.
d1950 1
a1950 1
     _Prototype_:  `acc_wait_async(int arg, int async);'
d1953 2
a1954 2
     _Interface_:  `subroutine acc_wait_async(arg, async)'
                   `integer(acc_handle_kind) arg, async'
d1957 1
a1957 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1963 1
a1963 1
5.12 `acc_init' - Initialize runtime for a specific device type.
d1967 2
a1968 2
     This function initializes the runtime for the device type
     specified in DEVICETYPE.
d1971 1
a1971 1
     _Prototype_:  `acc_init(acc_device_t devicetype);'
d1974 2
a1975 2
     _Interface_:  `subroutine acc_init(devicetype)'
                   `integer(acc_device_kind) devicetype'
d1978 1
a1978 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1984 1
a1984 1
5.13 `acc_shutdown' - Shuts down the runtime for a specific device type.
d1992 1
a1992 1
     _Prototype_:  `acc_shutdown(acc_device_t devicetype);'
d1995 2
a1996 2
     _Interface_:  `subroutine acc_shutdown(devicetype)'
                   `integer(acc_device_kind) devicetype'
d1999 1
a1999 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2005 1
a2005 1
5.14 `acc_on_device' - Whether executing on a particular device
d2010 1
a2010 1
     particular device specified in DEVICETYPE. In C/C++ a non-zero
d2012 1
a2012 1
     specified device type.  In Fortran, `true' will be returned. If
d2014 1
a2014 1
     will return a zero, while Fortran will return `false'.
d2017 1
a2017 1
     _Prototype_:  `acc_on_device(acc_device_t devicetype);'
d2020 3
a2022 3
     _Interface_:  `function acc_on_device(devicetype)'
                   `integer(acc_device_kind) devicetype'
                   `logical acc_on_device'
d2025 1
a2025 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2031 1
a2031 1
5.15 `acc_malloc' - Allocate device memory.
d2035 1
a2035 1
     This function allocates LEN bytes of device memory. It returns the
d2039 1
a2039 1
     _Prototype_:  `d_void* acc_malloc(size_t len);'
d2042 1
a2042 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2048 1
a2048 1
5.16 `acc_free' - Free device memory.
d2052 1
a2052 1
     Free previously allocated device memory at the device address `a'.
d2055 1
a2055 1
     _Prototype_:  `acc_free(d_void *a);'
d2058 1
a2058 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2064 1
a2064 1
5.17 `acc_copyin' - Allocate device memory and copy host memory to it.
d2069 1
a2069 1
     maps it to the specified host address in A. The device address of
d2072 3
a2074 3
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies a
     variable or array element and LEN specifies the length in bytes.
d2077 1
a2077 1
     _Prototype_:  `void *acc_copyin(h_void *a, size_t len);'
d2080 5
a2084 5
     _Interface_:  `subroutine acc_copyin(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_copyin(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2087 1
a2087 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2093 1
a2093 1
5.18 `acc_present_or_copyin' - If the data is not present on the device, allocate device memory and copy from host memory.
d2098 3
a2100 3
     LEN is present or not. If it is not present, then device memory
     will be allocated and the host memory copied. The device address of
     the newly allocated device memory is returned.
d2102 2
a2103 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2107 2
a2108 2
     _Prototype_:  `void *acc_present_or_copyin(h_void *a, size_t len);'
     _Prototype_:  `void *acc_pcopyin(h_void *a, size_t len);'
d2111 10
a2120 10
     _Interface_:  `subroutine acc_present_or_copyin(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_present_or_copyin(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
     _Interface_:  `subroutine acc_pcopyin(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_pcopyin(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2123 1
a2123 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2129 1
a2129 1
5.19 `acc_create' - Allocate device memory and map it to host memory.
d2134 1
a2134 1
     specified by the host address A with a length of LEN bytes. In
d2138 2
a2139 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2143 1
a2143 1
     _Prototype_:  `void *acc_create(h_void *a, size_t len);'
d2146 5
a2150 5
     _Interface_:  `subroutine acc_create(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_create(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2153 1
a2153 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2159 1
a2159 1
5.20 `acc_present_or_create' - If the data is not present on the device, allocate device memory and map it to host memory.
d2164 2
a2165 2
     LEN is present or not. If it is not present, then device memory
     will be allocated and mapped to host memory. In C/C++, the device
d2168 2
a2169 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2173 2
a2174 2
     _Prototype_:  `void *acc_present_or_create(h_void *a, size_t len)'
     _Prototype_:  `void *acc_pcreate(h_void *a, size_t len)'
d2177 10
a2186 10
     _Interface_:  `subroutine acc_present_or_create(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_present_or_create(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
     _Interface_:  `subroutine acc_pcreate(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_pcreate(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2189 1
a2189 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2195 1
a2195 1
5.21 `acc_copyout' - Copy device memory to host memory.
d2202 2
a2203 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2207 1
a2207 1
     _Prototype_:  `acc_copyout(h_void *a, size_t len);'
d2210 5
a2214 5
     _Interface_:  `subroutine acc_copyout(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_copyout(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2217 1
a2217 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2223 1
a2223 1
5.22 `acc_delete' - Free device memory.
d2230 2
a2231 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2235 1
a2235 1
     _Prototype_:  `acc_delete(h_void *a, size_t len);'
d2238 5
a2242 5
     _Interface_:  `subroutine acc_delete(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_delete(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2245 1
a2245 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2251 1
a2251 1
5.23 `acc_update_device' - Update device memory from mapped host memory.
d2259 2
a2260 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2264 1
a2264 1
     _Prototype_:  `acc_update_device(h_void *a, size_t len);'
d2267 5
a2271 5
     _Interface_:  `subroutine acc_update_device(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_update_device(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2274 1
a2274 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2280 1
a2280 1
5.24 `acc_update_self' - Update host memory from mapped device memory.
d2288 2
a2289 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2293 1
a2293 1
     _Prototype_:  `acc_update_self(h_void *a, size_t len);'
d2296 5
a2300 5
     _Interface_:  `subroutine acc_update_self(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_update_self(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2303 1
a2303 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2309 1
a2309 1
5.25 `acc_map_data' - Map previously allocated device memory to host memory.
d2314 1
a2314 1
     The device memory is specified with the device address D. The host
d2318 1
a2318 1
     _Prototype_:  `acc_map_data(h_void *h, d_void *d, size_t len);'
d2321 1
a2321 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2327 1
a2327 1
5.26 `acc_unmap_data' - Unmap device memory from host memory.
d2331 1
a2331 1
     This function unmaps previously mapped device and host memory. The
d2335 1
a2335 1
     _Prototype_:  `acc_unmap_data(h_void *h);'
d2338 1
a2338 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2344 1
a2344 1
5.27 `acc_deviceptr' - Get device pointer associated with specific host address.
d2352 1
a2352 1
     _Prototype_:  `void *acc_deviceptr(h_void *h);'
d2355 1
a2355 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2361 1
a2361 1
5.28 `acc_hostptr' - Get host pointer associated with specific device address.
d2369 1
a2369 1
     _Prototype_:  `void *acc_hostptr(d_void *d);'
d2372 1
a2372 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2378 1
a2378 1
5.29 `acc_is_present' - Indicate whether host variable / array is present on device.
d2382 2
a2383 2
     This function indicates whether the specified host address in A
     and a length of LEN bytes is present on the device. In C/C++, a
d2385 1
a2385 1
     memory on the device. A zero is returned to indicate the memory is
d2388 2
a2389 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2391 2
a2392 2
     If the host memory is mapped to device memory, then a `true' is
     returned. Otherwise, a `false' is return to indicate the mapped
d2396 1
a2396 1
     _Prototype_:  `int acc_is_present(h_void *a, size_t len);'
d2399 7
a2405 7
     _Interface_:  `function acc_is_present(a)'
                   `type, dimension(:[,:]...) :: a'
                   `logical acc_is_present'
     _Interface_:  `function acc_is_present(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
                   `logical acc_is_present'
d2408 1
a2408 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2414 1
a2414 1
5.30 `acc_memcpy_to_device' - Copy host memory to device memory.
d2423 2
a2424 2
     _Prototype_:  `acc_memcpy_to_device(d_void *dest, h_void *src,
                   size_t bytes);'
d2427 1
a2427 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2433 1
a2433 1
5.31 `acc_memcpy_from_device' - Copy device memory to host memory.
d2442 2
a2443 2
     _Prototype_:  `acc_memcpy_from_device(d_void *dest, h_void *src,
                   size_t bytes);'
d2446 1
a2446 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2452 1
a2452 1
5.32 `acc_get_current_cuda_device' - Get CUDA device handle.
d2456 1
a2456 1
     This function returns the CUDA device handle. This handle is the
d2460 1
a2460 1
     _Prototype_:  `void *acc_get_current_cuda_device(void);'
d2463 1
a2463 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2469 1
a2469 1
5.33 `acc_get_current_cuda_context' - Get CUDA context handle.
d2473 1
a2473 1
     This function returns the CUDA context handle. This handle is the
d2477 1
a2477 1
     _Prototype_:  `acc_get_current_cuda_context(void);'
d2480 1
a2480 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2486 1
a2486 1
5.34 `acc_get_cuda_stream' - Get CUDA stream handle.
d2490 1
a2490 1
     This function returns the CUDA stream handle. This handle is the
d2494 1
a2494 1
     _Prototype_:  `acc_get_cuda_stream(void);'
d2497 1
a2497 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2503 1
a2503 1
5.35 `acc_set_cuda_stream' - Set CUDA stream handle.
d2511 1
a2511 1
     _Prototype_:  `acc_set_cuda_stream(int async void *stream);'
d2514 1
a2514 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2523 1
a2523 1
The variables `ACC_DEVICE_TYPE' and `ACC_DEVICE_NUM' are defined by
d2525 1
a2525 1
`GCC_ACC_NOTIFY' is used for diagnostic purposes.
d2536 1
a2536 1
6.1 `ACC_DEVICE_TYPE'
d2540 1
a2540 1
     OpenACC specification v2.0 (http://www.openacc.org/), section 4.1.
d2545 1
a2545 1
6.2 `ACC_DEVICE_NUM'
d2549 1
a2549 1
     OpenACC specification v2.0 (http://www.openacc.org/), section 4.2.
d2554 1
a2554 1
6.3 `GCC_ACC_NOTIFY'
d2566 1
a2566 1
This applies to the `nvptx' plugin only.
d2575 4
a2578 4
`async' and `wait' clauses.  When the `async' clause is first used with
a directive, it creates a CUDA stream.  If an `async-argument' is used
with the `async' clause, then the stream is associated with the
specified `async-argument'.
d2581 2
a2582 2
the `async-argument' of an `async' clause, both the `wait' clause and
the `wait' directive can be used.  When either the clause or directive
d2585 1
a2585 1
`async-argument', that is, stream, have completed.
d2588 2
a2589 2
of using the `async' clause, is done without any intervention by the
caller.  This implies the association between the `async-argument' and
d2592 5
a2596 5
function `acc_set_cuda_stream'.  When the function
`acc_set_cuda_stream' is called, the CUDA stream that was originally
associated with the `async' clause will be destroyed.  Caution should
be taken when changing the association as subsequent references to the
`async-argument' refer to a different CUDA stream.
d2613 4
a2616 4
programs that use the Runtime library directly, or another library
based on the Runtime library, e.g., CUBLAS(1).  This chapter describes
the use cases and what changes are required in order to use both the
OpenACC library and the CUBLAS and Runtime libraries within a program.
d2622 2
a2623 2
called prior to any of the functions in the OpenACC library. More
specifically, the function `cublasCreate()'.
d2628 5
a2632 5
returned to the caller. The OpenACC library also requires
initialization and allocation of hardware resources. Since the CUBLAS
library has already allocated the hardware resources for the device,
all that is left to do is to initialize the OpenACC library and acquire
the hardware resources on the host.
d2635 10
a2644 10
and allocate the host hardware resources, you need to acquire the
device number that was allocated during the call to `cublasCreate()'.
The invoking of the runtime library function `cudaGetDevice()'
accomplishes this. Once acquired, the device number is passed along
with the device type as parameters to the OpenACC library function
`acc_set_device_num()'.

   Once the call to `acc_set_device_num()' has completed, the OpenACC
library uses the  context that was created during the call to
`cublasCreate()'. In other words, both libraries will be sharing the
d2665 2
a2666 1
                                 Use Case 1
d2672 2
a2673 2
is called prior to any of the functions in the CUBLAS library. More
specificially, the function `acc_set_device_num()'.
d2675 1
a2675 1
   In the use case presented here, the function `acc_set_device_num()'
d2677 3
a2679 3
resources on the host and the device. In the call to the function, the
call parameters specify which device to use and what device type to
use, i.e., `acc_device_nvidia'. It should be noted that this is but one
d2681 1
a2681 1
hardware resources. Other methods are available through the use of
d2684 1
a2684 1
   Once the call to `acc_set_device_num()' has completed, other OpenACC
d2686 4
a2689 4
`acc_copyin()'. In addition, calls can be made to functions in the
CUBLAS library. In the use case a call to `cublasCreate()' is made
subsequent to the calls to `acc_copyin()'.  As seen in the previous use
case, a call to `cublasCreate()' initializes the CUBLAS library and
d2691 1
a2691 1
since the device has already been allocated, `cublasCreate()' will only
d2693 1
a2693 1
resources on the host. The context that was created as part of the
d2735 2
a2736 1
                                 Use Case 2
d2743 1
a2743 1
`ACC_DEVICE_TYPE' and `ACC_DEVICE_NUM', respecively. These two
d2745 2
a2746 2
`acc_set_device_num()'. As seen in the second use case, the device type
and device number were specified using `acc_set_device_num()'.  If
d2748 1
a2748 1
call to `acc_set_device_num()' would not be required.
d2750 4
a2753 4
   The use of the environment variables is only relevant when an
OpenACC function is called prior to a call to `cudaCreate()'. If
`cudaCreate()' is called prior to a call to an OpenACC function, then
you must call `acc_set_device_num()'(2)
d2759 2
a2760 2
Interoperability", in "CUDA Driver API", TRM-06703-001, Version 5.5,
for additional information on library interoperability.
d2762 3
a2764 3
   (2) More complete information about `ACC_DEVICE_TYPE' and
`ACC_DEVICE_NUM' can be found in sections 4.1 and 4.2 of the OpenACC
(http://www.openacc.org/) Application Programming Interface”, Version
d2773 2
a2774 2
The following sections present notes on the external ABI as presented
by libgomp.  Only maintainers should need them.
d2835 1
a2835 1
The target should implement the `__sync' builtins.
d2851 1
a2851 1
Expands to the `__sync_synchronize' builtin.
d2867 4
a2870 4
In _most_ cases we can map this directly to `__thread'.  Except that
OMP allows constructors for C++ objects.  We can either refuse to
support this (how often is it used?) or we can implement something akin
to .ctors.
d2902 2
a2903 2
   It is not clear what to do with bare FOR or SECTION blocks.  The
only thing I can figure is that we do something like:
d2921 2
a2922 2
for the two variables, i.e. not something you could write directly in
C.  Presumably this only makes sense if the "outer" x and y are global
d2935 4
a2938 4
pointer to an array of the type of the variable, indexed by the
thread's TEAM_ID.  The thread stores its final value into the array,
and after the barrier, the master thread iterates over the array to
collect the values.
d2975 3
a2977 3
   The function needs to create the appropriate number of threads
and/or launch them from the dock.  It needs to create the team
structure and assign team ids.
d2982 1
a2982 1
`omp_in_parallel()' state.
d3034 2
a3035 2
also pull it into a local variable if we like, but since its supposed
to remain unchanged, we can also not if we like.
d3037 5
a3041 5
   If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be
able to get away with no work-sharing context at all, since we can
simply perform the arithmetic directly in each thread to divide up the
iterations.  Which would mean that we wouldn't need to call any of
these routines.
d3143 2
a3144 2
"openacc", or "openmp", or both to the keywords field in the bug
report, as appropriate.
d3154 1
a3154 1
     Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/'
d3182 3
a3184 3
these rights or asking you to surrender the rights.  Therefore, you
have certain responsibilities if you distribute copies of the software,
or if you modify it: responsibilities to respect the freedom of others.
d3203 9
a3211 10
modified versions of the software inside them, although the
manufacturer can do so.  This is fundamentally incompatible with the
aim of protecting users' freedom to change the software.  The
systematic pattern of such abuse occurs in the area of products for
individuals to use, which is precisely where it is most unacceptable.
Therefore, we have designed this version of the GPL to prohibit the
practice for those products.  If such problems arise substantially in
other domains, we stand ready to extend this provision to those domains
in future versions of the GPL, as needed to protect the freedom of
users.
d3248 2
a3249 2
     infringement under applicable copyright law, except executing it
     on a computer or modifying a private copy.  Propagation includes
d3263 2
a3264 2
     the extent that warranties are provided), that licensees may
     convey the work under this License, and how to view a copy of this
d3272 2
a3273 2
     for making modifications to it.  "Object code" means any
     non-source form of a work.
d3284 4
a3287 4
     Major Component, and (b) serves only to enable use of the work
     with that Major Component, or to implement a Standard Interface
     for which an implementation is available to the public in source
     code form.  A "Major Component", in this context, means a major
d3295 3
a3297 3
     work) run the object code and to modify the work, including
     scripts to control those activities.  However, it does not include
     the work's System Libraries, or general-purpose tools or generally
d3300 4
a3303 4
     Corresponding Source includes interface definition files
     associated with source files for the work, and the source code for
     shared libraries and dynamically linked subprograms that the work
     is specifically designed to require, such as by intimate data
d3320 4
a3323 4
     a covered work is covered by this License only if the output,
     given its content, constitutes a covered work.  This License
     acknowledges your rights of fair use or other equivalent, as
     provided by copyright law.
d3328 8
a3335 8
     sole purpose of having them make modifications exclusively for
     you, or provide you with facilities for running those works,
     provided that you comply with the terms of this License in
     conveying all material for which you do not control copyright.
     Those thus making or running the covered works for you must do so
     exclusively on your behalf, under your direction and control, on
     terms that prohibit them from making any copies of your
     copyrighted material outside their relationship with you.
d3352 2
a3353 2
     with respect to the covered work, and you disclaim any intention
     to limit operation or modification of the work as a means of
d3423 2
a3424 2
          written offer, valid for at least three years and valid for
          as long as you offer spare parts or customer support for that
d3434 2
a3435 2
       c. Convey individual copies of the object code with a copy of
          the written offer to provide the Corresponding Source.  This
d3441 2
a3442 2
          place (gratis or for a charge), and offer equivalent access
          to the Corresponding Source in the same way through the same
d3446 4
a3449 4
          Corresponding Source may be on a different server (operated
          by you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to
          the object code saying where to find the Corresponding Source.
d3451 2
a3452 2
          remain obligated to ensure that it is available for as long
          as needed to satisfy these requirements.
a3458 1

d3466 2
a3467 2
     incorporation into a dwelling.  In determining whether a product
     is a consumer product, doubtful cases shall be resolved in favor of
d3498 5
a3502 5
     warranty, or updates for a work that has been modified or
     installed by the recipient, or for the User Product in which it
     has been modified or installed.  Access to a network may be denied
     when the modification itself materially and adversely affects the
     operation of the network or violates the rules and protocols for
d3532 2
a3533 2
     holders of that material) supplement the terms of this License
     with terms:
d3543 2
a3544 3
          or requiring that modified versions of such material be
          marked in reasonable ways as different from the original
          version; or
d3563 4
a3566 5
     contains a further restriction but permits relicensing or
     conveying under this License, you may add to a covered work
     material governed by the terms of that license document, provided
     that the further restriction does not survive such relicensing or
     conveying.
d3582 2
a3583 2
     under this License (including any patent licenses granted under
     the third paragraph of section 11).
d3587 2
a3588 2
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
d3600 4
a3603 4
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, you do not qualify to receive new
     licenses for the same material under section 10.
d3617 1
a3617 1
 10. Automatic Licensing of Downstream Recipients.
d3631 4
a3634 4
     could give under the previous paragraph, plus a right to
     possession of the Corresponding Source of the work from the
     predecessor in interest, if the predecessor has it or can get it
     with reasonable efforts.
d3638 6
a3643 6
     may not impose a license fee, royalty, or other charge for
     exercise of rights granted under this License, and you may not
     initiate litigation (including a cross-claim or counterclaim in a
     lawsuit) alleging that any patent claim is infringed by making,
     using, selling, offering for sale, or importing the Program or any
     portion of it.
d3645 1
a3645 1
 11. Patents.
d3665 2
a3666 2
     otherwise run, modify and propagate the contents of its
     contributor version.
d3671 3
a3673 3
     patent or covenant not to sue for patent infringement).  To
     "grant" such a patent license to a party means to make such an
     agreement or commitment not to enforce a patent against the party.
d3703 10
a3712 10
     party that is in the business of distributing software, under
     which you make payment to the third party based on the extent of
     your activity of conveying the work, and under which the third
     party grants, to any of the parties who would receive the covered
     work from you, a discriminatory patent license (a) in connection
     with copies of the covered work conveyed by you (or copies made
     from those copies), or (b) primarily for and in connection with
     specific products or compilations that contain the covered work,
     unless you entered into that arrangement, or that patent license
     was granted, prior to 28 March 2007.
d3718 1
a3718 1
 12. No Surrender of Others' Freedom.
d3720 10
a3729 11
     If conditions are imposed on you (whether by court order,
     agreement or otherwise) that contradict the conditions of this
     License, they do not excuse you from the conditions of this
     License.  If you cannot convey a covered work so as to satisfy
     simultaneously your obligations under this License and any other
     pertinent obligations, then as a consequence you may not convey it
     at all.  For example, if you agree to terms that obligate you to
     collect a royalty for further conveying from those to whom you
     convey the Program, the only way you could satisfy both those
     terms and this License would be to refrain entirely from conveying
     the Program.
d3731 1
a3731 1
 13. Use with the GNU Affero General Public License.
d3742 1
a3742 1
 14. Revised Versions of this License.
d3745 3
a3747 4
     versions of the GNU General Public License from time to time.
     Such new versions will be similar in spirit to the present
     version, but may differ in detail to address new problems or
     concerns.
d3753 4
a3756 4
     that numbered version or of any later version published by the
     Free Software Foundation.  If the Program does not specify a
     version number of the GNU General Public License, you may choose
     any version ever published by the Free Software Foundation.
d3768 1
a3768 1
 15. Disclaimer of Warranty.
d3771 1
a3771 1
     APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE
d3775 1
a3775 1
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE
d3780 1
a3780 1
 16. Limitation of Liability.
d3784 2
a3785 2
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
     FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
d3793 1
a3793 1
 17. Interpretation of Sections 15 and 16.
a3801 1

d3832 1
a3832 1
     along with this program.  If not, see `http://www.gnu.org/licenses/'.
d3841 1
a3841 1
     This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
d3843 1
a3843 1
     under certain conditions; type `show c' for details.
d3845 1
a3845 1
   The hypothetical commands `show w' and `show c' should show the
d3853 1
a3853 1
the GNU GPL, see `http://www.gnu.org/licenses/'.
d3860 1
a3860 1
please read `http://www.gnu.org/philosophy/why-not-lgpl.html'.
d3871 1
a3871 1
     `http://fsf.org/'
d3896 2
a3897 2
     of subject matter or whether it is published as a printed book.
     We recommend this License principally for works whose purpose is
d3903 2
a3904 2
     that contains a notice placed by the copyright holder saying it
     can be distributed under the terms of this License.  Such a notice
d3908 3
a3910 3
     of the public is a licensee, and is addressed as "you".  You
     accept the license if you copy, modify or distribute the work in a
     way requiring permission under copyright law.
d3928 6
a3933 6
     titles are designated, as being those of Invariant Sections, in
     the notice that says that the Document is released under this
     License.  If a section does not fit the above definition of
     Secondary then it is not allowed to be designated as Invariant.
     The Document may contain zero Invariant Sections.  If the Document
     does not identify any Invariant Sections then there are none.
d3944 10
a3953 10
     straightforwardly with generic text editors or (for images
     composed of pixels) generic paint programs or (for drawings) some
     widely available drawing editor, and that is suitable for input to
     text formatters or for automatic translation to a variety of
     formats suitable for input to text formatters.  A copy made in an
     otherwise Transparent file format whose markup, or absence of
     markup, has been arranged to thwart or discourage subsequent
     modification by readers is not Transparent.  An image format is
     not Transparent if used for any substantial amount of text.  A
     copy that is not "Transparent" is called "Opaque".
d3957 8
a3964 8
     SGML or XML using a publicly available DTD, and
     standard-conforming simple HTML, PostScript or PDF designed for
     human modification.  Examples of transparent image formats include
     PNG, XCF and JPG.  Opaque formats include proprietary formats that
     can be read and edited only by proprietary word processors, SGML or
     XML for which the DTD and/or processing tools are not generally
     available, and the machine-generated HTML, PostScript or PDF
     produced by some word processors for output purposes only.
d4002 2
a4003 2
     distribute a large enough number of copies you must also follow
     the conditions in section 3.
d4017 5
a4021 6
     front cover must present the full title with all words of the
     title equally prominent and visible.  You may add other material
     on the covers in addition.  Copying with changes limited to the
     covers, as long as they preserve the title of the Document and
     satisfy these conditions, can be treated as verbatim copying in
     other respects.
d4029 11
a4039 12
     numbering more than 100, you must either include a
     machine-readable Transparent copy along with each Opaque copy, or
     state in or with each Opaque copy a computer-network location from
     which the general network-using public has access to download
     using public-standard network protocols a complete Transparent
     copy of the Document, free of added material.  If you use the
     latter option, you must take reasonably prudent steps, when you
     begin distribution of Opaque copies in quantity, to ensure that
     this Transparent copy will remain thus accessible at the stated
     location until at least one year after the last time you
     distribute an Opaque copy (directly or through your agents or
     retailers) of that edition to the public.
d4042 3
a4044 3
     the Document well before redistributing any large number of
     copies, to give them a chance to provide you with an updated
     version of the Document.
d4050 5
a4054 5
     release the Modified Version under precisely this License, with
     the Modified Version filling the role of the Document, thus
     licensing distribution and modification of the Modified Version to
     whoever possesses a copy of it.  In addition, you must do these
     things in the Modified Version:
d4057 5
a4061 5
          distinct from that of the Document, and from those of
          previous versions (which should, if there were any, be listed
          in the History section of the Document).  You may use the
          same title as a previous version if the original publisher of
          that version gives permission.
d4091 6
a4096 6
          authors, and publisher of the Modified Version as given on
          the Title Page.  If there is no section Entitled "History" in
          the Document, create one stating the title, year, authors,
          and publisher of the Document as given on its Title Page,
          then add an item describing the Modified Version as stated in
          the previous sentence.
d4101 5
a4105 5
          previous versions it was based on.  These may be placed in
          the "History" section.  You may omit a network location for a
          work that was published at least four years before the
          Document itself, or if the original publisher of the version
          it refers to gives permission.
d4108 2
a4109 2
          Preserve the Title of the section, and preserve in the
          section all the substance and tone of each of the contributor
d4112 3
a4114 4
       L. Preserve all the Invariant Sections of the Document,
          unaltered in their text and in their titles.  Section numbers
          or the equivalent are not considered part of the section
          titles.
d4127 5
a4131 5
     material copied from the Document, you may at your option
     designate some or all of these sections as invariant.  To do this,
     add their titles to the list of Invariant Sections in the Modified
     Version's license notice.  These titles must be distinct from any
     other section titles.
d4140 9
a4148 9
     and a passage of up to 25 words as a Back-Cover Text, to the end
     of the list of Cover Texts in the Modified Version.  Only one
     passage of Front-Cover Text and one of Back-Cover Text may be
     added by (or through arrangements made by) any one entity.  If the
     Document already includes a cover text for the same cover,
     previously added by you or by arrangement made by the same entity
     you are acting on behalf of, you may not add another; but you may
     replace the old one, on explicit permission from the previous
     publisher that added the old one.
d4158 2
a4159 2
     modified versions, provided that you include in the combination
     all of the Invariant Sections of all of the original documents,
d4186 2
a4187 2
     rules of this License for verbatim copying of each of the
     documents in all other respects.
d4191 3
a4193 3
     a copy of this License into the extracted document, and follow
     this License in all other respects regarding verbatim copying of
     that document.
d4198 2
a4199 2
     separate and independent documents or works, in or on a volume of
     a storage or distribution medium, is called an "aggregate" if the
d4244 2
a4245 2
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
d4257 4
a4260 4
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, receipt of a copy of some or all of
     the same material does not give you any rights to use it.
d4262 1
a4262 1
 10. FUTURE REVISIONS OF THIS LICENSE
d4268 1
a4268 1
     `http://www.gnu.org/copyleft/'.
d4275 5
a4279 5
     published (not as a draft) by the Free Software Foundation.  If
     the Document does not specify a version number of this License,
     you may choose any version ever published (not as a draft) by the
     Free Software Foundation.  If the Document specifies that a proxy
     can decide which future versions of this License can be used, that
d4283 1
a4283 1
 11. RELICENSING
a4312 1

d4329 1
a4329 1
Texts, replace the "with...Texts." line with this:
d4340 3
a4342 3
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License, to
permit their use in free software.
d4372 2
a4373 2
can greatly alter what fraction of the sales price counts as profit.
If the price you pay is $50, ten percent of the profit is probably less
d4383 2
a4384 2
ports such as adding a new CPU to the GNU Compiler Collection
contribute more; major new features or packages contribute the most.
d4403 19
a4421 1
* Environment Variable <1>:              GOMP_RTEMS_THREAD_POOLS.
a4422 18
* Environment Variable <2>:              GOMP_SPINCOUNT.        (line 6)
* Environment Variable <3>:              GOMP_STACKSIZE.        (line 6)
* Environment Variable <4>:              GOMP_DEBUG.            (line 6)
* Environment Variable <5>:              GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <6>:              OMP_WAIT_POLICY.       (line 6)
* Environment Variable <7>:              OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <8>:              OMP_SCHEDULE.          (line 6)
* Environment Variable <9>:              OMP_STACKSIZE.         (line 6)
* Environment Variable <10>:             OMP_PLACES.            (line 6)
* Environment Variable <11>:             OMP_PROC_BIND.         (line 6)
* Environment Variable <12>:             OMP_NUM_THREADS.       (line 6)
* Environment Variable <13>:             OMP_NESTED.            (line 6)
* Environment Variable <14>:             OMP_MAX_TASK_PRIORITY. (line 6)
* Environment Variable <15>:             OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable <16>:             OMP_DYNAMIC.           (line 6)
* Environment Variable <17>:             OMP_DEFAULT_DEVICE.    (line 6)
* Environment Variable <18>:             OMP_DISPLAY_ENV.       (line 6)
* Environment Variable:                  OMP_CANCELLATION.      (line 6)
d4425 6
a4430 1
* Implementation specific setting <1>:   GOMP_RTEMS_THREAD_POOLS.
a4431 5
* Implementation specific setting <2>:   GOMP_SPINCOUNT.        (line 6)
* Implementation specific setting <3>:   GOMP_STACKSIZE.        (line 6)
* Implementation specific setting <4>:   OMP_SCHEDULE.          (line 6)
* Implementation specific setting <5>:   OMP_NUM_THREADS.       (line 6)
* Implementation specific setting:       OMP_NESTED.            (line 6)
d4437 131
a4567 131
Node: Top2130
Node: Enabling OpenMP4536
Node: Runtime Library Routines5323
Node: omp_get_active_level8386
Node: omp_get_ancestor_thread_num9084
Node: omp_get_cancellation10011
Node: omp_get_default_device10823
Node: omp_get_dynamic11497
Node: omp_get_level12370
Node: omp_get_max_active_levels12988
Node: omp_get_max_task_priority13691
Node: omp_get_max_threads14309
Node: omp_get_nested15064
Node: omp_get_num_devices15976
Node: omp_get_num_procs16495
Node: omp_get_num_teams17032
Node: omp_get_num_threads17546
Node: omp_get_proc_bind18633
Node: omp_get_schedule19551
Node: omp_get_team_num20500
Node: omp_get_team_size20997
Node: omp_get_thread_limit21954
Node: omp_get_thread_num22571
Node: omp_in_parallel23440
Node: omp_in_final24087
Node: omp_is_initial_device24759
Node: omp_set_default_device25450
Node: omp_set_dynamic26238
Node: omp_set_max_active_levels27121
Node: omp_set_nested27895
Node: omp_set_num_threads28784
Node: omp_set_schedule29649
Node: omp_init_lock30725
Node: omp_set_lock31375
Node: omp_test_lock32227
Node: omp_unset_lock33200
Node: omp_destroy_lock34128
Node: omp_init_nest_lock34802
Node: omp_set_nest_lock35534
Node: omp_test_nest_lock36451
Node: omp_unset_nest_lock37481
Node: omp_destroy_nest_lock38493
Node: omp_get_wtick39241
Node: omp_get_wtime39831
Node: Environment Variables40605
Node: OMP_CANCELLATION42160
Node: OMP_DISPLAY_ENV42693
Node: OMP_DEFAULT_DEVICE43396
Node: OMP_DYNAMIC44176
Node: OMP_MAX_ACTIVE_LEVELS44772
Node: OMP_MAX_TASK_PRIORITY45422
Node: OMP_NESTED46082
Node: OMP_NUM_THREADS46687
Node: OMP_PROC_BIND47376
Node: OMP_PLACES48568
Node: OMP_STACKSIZE50745
Node: OMP_SCHEDULE51569
Node: OMP_THREAD_LIMIT52267
Node: OMP_WAIT_POLICY52867
Node: GOMP_CPU_AFFINITY53559
Node: GOMP_DEBUG55290
Node: GOMP_STACKSIZE55797
Node: GOMP_SPINCOUNT56626
Node: GOMP_RTEMS_THREAD_POOLS57835
Node: Enabling OpenACC60016
Node: OpenACC Runtime Library Routines61010
Node: acc_get_num_devices64804
Node: acc_set_device_type65527
Node: acc_get_device_type66288
Node: acc_set_device_num67000
Node: acc_get_device_num67799
Node: acc_async_test68592
Node: acc_async_test_all69577
Node: acc_wait70472
Node: acc_wait_all71104
Node: acc_wait_all_async71681
Node: acc_wait_async72430
Node: acc_init73134
Node: acc_shutdown73777
Node: acc_on_device74442
Node: acc_malloc75440
Node: acc_free75937
Node: acc_copyin76363
Node: acc_present_or_copyin77464
Node: acc_create79074
Node: acc_present_or_create80220
Node: acc_copyout81838
Node: acc_delete82853
Node: acc_update_device83820
Node: acc_update_self84924
Node: acc_map_data86020
Node: acc_unmap_data86703
Node: acc_deviceptr87222
Node: acc_hostptr87791
Node: acc_is_present88354
Node: acc_memcpy_to_device89868
Node: acc_memcpy_from_device90529
Node: acc_get_current_cuda_device91211
Node: acc_get_current_cuda_context91806
Node: acc_get_cuda_stream92398
Node: acc_set_cuda_stream92952
Node: OpenACC Environment Variables93483
Node: ACC_DEVICE_TYPE93942
Node: ACC_DEVICE_NUM94178
Node: GCC_ACC_NOTIFY94435
Node: CUDA Streams Usage94658
Ref: CUDA Streams Usage-Footnote-196558
Node: OpenACC Library Interoperability96667
Ref: OpenACC Library Interoperability-Footnote-1103013
Ref: OpenACC Library Interoperability-Footnote-2103265
Node: The libgomp ABI103473
Node: Implementing MASTER construct104329
Node: Implementing CRITICAL construct104743
Node: Implementing ATOMIC construct105482
Node: Implementing FLUSH construct105963
Node: Implementing BARRIER construct106234
Node: Implementing THREADPRIVATE construct106503
Node: Implementing PRIVATE clause107155
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses107736
Node: Implementing REDUCTION clause109060
Node: Implementing PARALLEL construct109617
Node: Implementing FOR construct110874
Node: Implementing ORDERED construct112872
Node: Implementing SECTIONS construct113178
Node: Implementing SINGLE construct113944
Node: Implementing OpenACC's PARALLEL construct114656
Node: Reporting Bugs114914
Node: Copying115276
Node: GNU Free Documentation License152841
Node: Funding177983
Node: Library Index180508
@


1.9
log
@merge GCC 6.5.  needs mknative as some new files appeared.
@
text
@d1 2
a2 2
This is libgomp.info, produced by makeinfo version 6.4 from
libgomp.texi.
d4 1
a4 1
Copyright (C) 2006-2016 Free Software Foundation, Inc.
d21 3
a23 2
software.  Copies published by the Free Software Foundation raise funds
for GNU development.
d37 1
a37 1
   Copyright (C) 2006-2016 Free Software Foundation, Inc.
d54 2
a55 2
software.  Copies published by the Free Software Foundation raise funds
for GNU development.
d63 5
a67 5
This manual documents the usage of libgomp, the GNU Offloading and Multi
Processing Runtime Library.  This includes the GNU implementation of the
OpenMP (http://www.openmp.org) Application Programming Interface (API)
for multi-platform shared-memory parallel programming in C/C++ and
Fortran, and the GNU implementation of the OpenACC
d111 11
a121 10
compile-time flag '-fopenmp' must be specified.  This enables the OpenMP
directive '#pragma omp' in C/C++ and '!$omp' directives in free form,
'c$omp', '*$omp' and '!$omp' directives in fixed form, '!$' conditional
compilation sentinels in free form and 'c$', '*$' and '!$' sentinels in
fixed form, for Fortran.  The flag also arranges for automatic linking
of the OpenMP runtime library (*note Runtime Library Routines::).

   A complete description of all OpenMP directives accepted may be found
in the OpenMP Application Program Interface (http://www.openmp.org)
manual, version 4.5.
d189 1
a189 1
2.1 'omp_get_active_level' - Number of parallel regions
d197 1
a197 1
     _Prototype_:   'int omp_get_active_level(void);'
d200 1
a200 1
     _Interface_:   'integer function omp_get_active_level()'
d212 1
a212 1
2.2 'omp_get_ancestor_thread_num' - Ancestor thread ID
d218 2
a219 2
     outside zero to 'omp_get_level' -1 is returned; if LEVEL is
     'omp_get_level' the result is identical to 'omp_get_thread_num'.
d222 1
a222 1
     _Prototype_:   'int omp_get_ancestor_thread_num(int level);'
d225 2
a226 2
     _Interface_:   'integer function omp_get_ancestor_thread_num(level)'
                    'integer level'
d238 1
a238 1
2.3 'omp_get_cancellation' - Whether cancellation support is enabled
d242 3
a244 3
     This function returns 'true' if cancellation is activated, 'false'
     otherwise.  Here, 'true' and 'false' represent their
     language-specific counterparts.  Unless 'OMP_CANCELLATION' is set
d248 1
a248 1
     _Prototype_:   'int omp_get_cancellation(void);'
d251 1
a251 1
     _Interface_:   'logical function omp_get_cancellation()'
d262 1
a262 1
2.4 'omp_get_default_device' - Get the default device for target regions
d269 1
a269 1
     _Prototype_:   'int omp_get_default_device(void);'
d272 1
a272 1
     _Interface_:   'integer function omp_get_default_device()'
d283 1
a283 1
2.5 'omp_get_dynamic' - Dynamic teams setting
d287 2
a288 2
     This function returns 'true' if enabled, 'false' otherwise.  Here,
     'true' and 'false' represent their language-specific counterparts.
d291 3
a293 3
     'OMP_DYNAMIC' environment variable or at runtime using
     'omp_set_dynamic'.  If undefined, dynamic adjustment is disabled by
     default.
d296 1
a296 1
     _Prototype_:   'int omp_get_dynamic(void);'
d299 1
a299 1
     _Interface_:   'logical function omp_get_dynamic()'
d310 1
a310 1
2.6 'omp_get_level' - Obtain the current nesting level
d318 1
a318 1
     _Prototype_:   'int omp_get_level(void);'
d321 1
a321 1
     _Interface_:   'integer function omp_level()'
d332 1
a332 1
2.7 'omp_get_max_active_levels' - Maximum number of active regions
d340 1
a340 1
     _Prototype_:   'int omp_get_max_active_levels(void);'
d343 1
a343 1
     _Interface_:   'integer function omp_get_max_active_levels()'
d354 1
a354 1
2.8 'omp_get_max_task_priority' - Maximum priority value
d363 1
a363 1
     _Prototype_:   'int omp_get_max_task_priority(void);'
d366 1
a366 1
     _Interface_:   'integer function omp_get_max_task_priority()'
d374 1
a374 1
2.9 'omp_get_max_threads' - Maximum number of threads of parallel region
d379 1
a379 1
     region that does not use the clause 'num_threads'.
d382 1
a382 1
     _Prototype_:   'int omp_get_max_threads(void);'
d385 1
a385 1
     _Interface_:   'integer function omp_get_max_threads()'
d397 1
a397 1
2.10 'omp_get_nested' - Nested parallel regions
d401 2
a402 2
     This function returns 'true' if nested parallel regions are
     enabled, 'false' otherwise.  Here, 'true' and 'false' represent
d406 2
a407 2
     'OMP_NESTED' environment variable or at runtime using
     'omp_set_nested'.  If undefined, nested parallel regions are
d411 1
a411 1
     _Prototype_:   'int omp_get_nested(void);'
d414 1
a414 1
     _Interface_:   'logical function omp_get_nested()'
d425 1
a425 1
2.11 'omp_get_num_devices' - Number of target devices
d432 1
a432 1
     _Prototype_:   'int omp_get_num_devices(void);'
d435 1
a435 1
     _Interface_:   'integer function omp_get_num_devices()'
d443 1
a443 1
2.12 'omp_get_num_procs' - Number of processors online
d450 1
a450 1
     _Prototype_:   'int omp_get_num_procs(void);'
d453 1
a453 1
     _Interface_:   'integer function omp_get_num_procs()'
d461 1
a461 1
2.13 'omp_get_num_teams' - Number of teams
d468 1
a468 1
     _Prototype_:   'int omp_get_num_teams(void);'
d471 1
a471 1
     _Interface_:   'integer function omp_get_num_teams()'
d479 1
a479 1
2.14 'omp_get_num_threads' - Size of the active team
d483 2
a484 2
     Returns the number of threads in the current team.  In a sequential
     section of the program 'omp_get_num_threads' returns 1.
d487 5
a491 5
     'OMP_NUM_THREADS' environment variable.  At runtime, the size of
     the current team may be set either by the 'NUM_THREADS' clause or
     by 'omp_set_num_threads'.  If none of the above were used to define
     a specific value and 'OMP_DYNAMIC' is disabled, one thread per CPU
     online is used.
d494 1
a494 1
     _Prototype_:   'int omp_get_num_threads(void);'
d497 1
a497 1
     _Interface_:   'integer function omp_get_num_threads()'
d509 1
a509 1
2.15 'omp_get_proc_bind' - Whether theads may be moved between CPUs
d513 5
a517 5
     This functions returns the currently active thread affinity policy,
     which is set via 'OMP_PROC_BIND'.  Possible values are
     'omp_proc_bind_false', 'omp_proc_bind_true',
     'omp_proc_bind_master', 'omp_proc_bind_close' and
     'omp_proc_bind_spread'.
d520 1
a520 1
     _Prototype_:   'omp_proc_bind_t omp_get_proc_bind(void);'
d523 2
a524 2
     _Interface_:   'integer(kind=omp_proc_bind_kind) function
                    omp_get_proc_bind()'
d536 1
a536 1
2.16 'omp_get_schedule' - Obtain the runtime scheduling method
d541 2
a542 2
     set to the value 'omp_sched_static', 'omp_sched_dynamic',
     'omp_sched_guided' or 'omp_sched_auto'.  The second argument,
d546 2
a547 2
     _Prototype_:   'void omp_get_schedule(omp_sched_t *kind, int
                    *chunk_size);'
d550 3
a552 3
     _Interface_:   'subroutine omp_get_schedule(kind, chunk_size)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer chunk_size'
d563 1
a563 1
2.17 'omp_get_team_num' - Get team number
d570 1
a570 1
     _Prototype_:   'int omp_get_team_num(void);'
d573 1
a573 1
     _Interface_:   'integer function omp_get_team_num()'
d581 1
a581 1
2.18 'omp_get_team_size' - Number of threads in a team
d587 3
a589 3
     values of LEVEL outside zero to 'omp_get_level', -1 is returned; if
     LEVEL is zero, 1 is returned, and for 'omp_get_level', the result
     is identical to 'omp_get_num_threads'.
d592 1
a592 1
     _Prototype_:   'int omp_get_team_size(int level);'
d595 2
a596 2
     _Interface_:   'integer function omp_get_team_size(level)'
                    'integer level'
d608 1
a608 1
2.19 'omp_get_thread_limit' - Maximum number of threads
d615 1
a615 1
     _Prototype_:   'int omp_get_thread_limit(void);'
d618 1
a618 1
     _Interface_:   'integer function omp_get_thread_limit()'
d629 1
a629 1
2.20 'omp_get_thread_num' - Current thread ID
d634 4
a637 4
     team.  In a sequential parts of the program, 'omp_get_thread_num'
     always returns 0.  In parallel regions the return value varies from
     0 to 'omp_get_num_threads'-1 inclusive.  The return value of the
     master thread of a team is always 0.
d640 1
a640 1
     _Prototype_:   'int omp_get_thread_num(void);'
d643 1
a643 1
     _Interface_:   'integer function omp_get_thread_num()'
d654 1
a654 1
2.21 'omp_in_parallel' - Whether a parallel region is active
d658 2
a659 2
     This function returns 'true' if currently running in parallel,
     'false' otherwise.  Here, 'true' and 'false' represent their
d663 1
a663 1
     _Prototype_:   'int omp_in_parallel(void);'
d666 1
a666 1
     _Interface_:   'logical function omp_in_parallel()'
d674 1
a674 1
2.22 'omp_in_final' - Whether in final or included task region
d678 2
a679 2
     This function returns 'true' if currently running in a final or
     included task region, 'false' otherwise.  Here, 'true' and 'false'
d683 1
a683 1
     _Prototype_:   'int omp_in_final(void);'
d686 1
a686 1
     _Interface_:   'logical function omp_in_final()'
d694 1
a694 1
2.23 'omp_is_initial_device' - Whether executing on the host device
d698 2
a699 2
     This function returns 'true' if currently running on the host
     device, 'false' otherwise.  Here, 'true' and 'false' represent
d703 1
a703 1
     _Prototype_:   'int omp_is_initial_device(void);'
d706 1
a706 1
     _Interface_:   'logical function omp_is_initial_device()'
d714 1
a714 1
2.24 'omp_set_default_device' - Set the default device for target regions
d722 1
a722 1
     _Prototype_:   'void omp_set_default_device(int device_num);'
d725 2
a726 2
     _Interface_:   'subroutine omp_set_default_device(device_num)'
                    'integer device_num'
d737 1
a737 1
2.25 'omp_set_dynamic' - Enable/disable dynamic teams
d743 2
a744 2
     of 'true' and 'false', where 'true' enables dynamic adjustment of
     team sizes and 'false' disables it.
d747 1
a747 1
     _Prototype_:   'void omp_set_dynamic(int dynamic_threads);'
d750 2
a751 2
     _Interface_:   'subroutine omp_set_dynamic(dynamic_threads)'
                    'logical, intent(in) :: dynamic_threads'
d762 1
a762 1
2.26 'omp_set_max_active_levels' - Limits the number of active parallel regions
d770 1
a770 1
     _Prototype_:   'void omp_set_max_active_levels(int max_levels);'
d773 2
a774 2
     _Interface_:   'subroutine omp_set_max_active_levels(max_levels)'
                    'integer max_levels'
d785 1
a785 1
2.27 'omp_set_nested' - Enable/disable nested parallel regions
d791 2
a792 2
     language-specific equivalent of 'true' and 'false', where 'true'
     enables dynamic adjustment of team sizes and 'false' disables it.
d795 1
a795 1
     _Prototype_:   'void omp_set_nested(int nested);'
d798 2
a799 2
     _Interface_:   'subroutine omp_set_nested(nested)'
                    'logical, intent(in) :: nested'
d810 1
a810 1
2.28 'omp_set_num_threads' - Set upper team size limit
d815 2
a816 2
     parallel sections, if those do not specify a 'num_threads' clause.
     The argument of 'omp_set_num_threads' shall be a positive integer.
d819 1
a819 1
     _Prototype_:   'void omp_set_num_threads(int num_threads);'
d822 2
a823 2
     _Interface_:   'subroutine omp_set_num_threads(num_threads)'
                    'integer, intent(in) :: num_threads'
d835 1
a835 1
2.29 'omp_set_schedule' - Set the runtime scheduling method
d840 2
a841 2
     value 'omp_sched_static', 'omp_sched_dynamic', 'omp_sched_guided'
     or 'omp_sched_auto'.  Except for 'omp_sched_auto', the chunk size
d843 1
a843 1
     value if zero or negative.  For 'omp_sched_auto' the CHUNK_SIZE
d847 2
a848 2
     _Prototype_:   'void omp_set_schedule(omp_sched_t kind, int
                    chunk_size);'
d851 3
a853 3
     _Interface_:   'subroutine omp_set_schedule(kind, chunk_size)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer chunk_size'
d864 1
a864 1
2.30 'omp_init_lock' - Initialize simple lock
d872 1
a872 1
     _Prototype_:   'void omp_init_lock(omp_lock_t *lock);'
d875 2
a876 2
     _Interface_:   'subroutine omp_init_lock(svar)'
                    'integer(omp_lock_kind), intent(out) :: svar'
d887 1
a887 1
2.31 'omp_set_lock' - Wait for and set simple lock
d891 4
a894 4
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  The calling thread is blocked until the lock
     is available.  If the lock is already held by the current thread, a
     deadlock occurs.
d897 1
a897 1
     _Prototype_:   'void omp_set_lock(omp_lock_t *lock);'
d900 2
a901 2
     _Interface_:   'subroutine omp_set_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d913 1
a913 1
2.32 'omp_test_lock' - Test and set simple lock if available
d917 5
a921 5
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  Contrary to 'omp_set_lock', 'omp_test_lock'
     does not block if the lock is not available.  This function returns
     'true' upon success, 'false' otherwise.  Here, 'true' and 'false'
     represent their language-specific counterparts.
d924 1
a924 1
     _Prototype_:   'int omp_test_lock(omp_lock_t *lock);'
d927 2
a928 2
     _Interface_:   'logical function omp_test_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d939 1
a939 1
2.33 'omp_unset_lock' - Unset simple lock
d944 4
a947 4
     'omp_set_lock' or 'omp_test_lock' before.  In addition, the lock
     must be held by the thread calling 'omp_unset_lock'.  Then, the
     lock becomes unlocked.  If one or more threads attempted to set the
     lock before, one of them is chosen to, again, set the lock to
d951 1
a951 1
     _Prototype_:   'void omp_unset_lock(omp_lock_t *lock);'
d954 2
a955 2
     _Interface_:   'subroutine omp_unset_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d966 1
a966 1
2.34 'omp_destroy_lock' - Destroy simple lock
d974 1
a974 1
     _Prototype_:   'void omp_destroy_lock(omp_lock_t *lock);'
d977 2
a978 2
     _Interface_:   'subroutine omp_destroy_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d989 1
a989 1
2.35 'omp_init_nest_lock' - Initialize nested lock
d997 1
a997 1
     _Prototype_:   'void omp_init_nest_lock(omp_nest_lock_t *lock);'
d1000 2
a1001 2
     _Interface_:   'subroutine omp_init_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(out) :: nvar'
d1012 1
a1012 1
2.36 'omp_set_nest_lock' - Wait for and set nested lock
d1016 5
a1020 4
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  The calling thread is blocked until the
     lock is available.  If the lock is already held by the current
     thread, the nesting count for the lock is incremented.
d1023 1
a1023 1
     _Prototype_:   'void omp_set_nest_lock(omp_nest_lock_t *lock);'
d1026 2
a1027 2
     _Interface_:   'subroutine omp_set_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1038 1
a1038 1
2.37 'omp_test_nest_lock' - Test and set nested lock if available
d1042 6
a1047 5
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  Contrary to 'omp_set_nest_lock',
     'omp_test_nest_lock' does not block if the lock is not available.
     If the lock is already held by the current thread, the new nesting
     count is returned.  Otherwise, the return value equals zero.
d1050 1
a1050 1
     _Prototype_:   'int omp_test_nest_lock(omp_nest_lock_t *lock);'
d1053 2
a1054 2
     _Interface_:   'logical function omp_test_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1065 1
a1065 1
2.38 'omp_unset_nest_lock' - Unset nested lock
d1070 1
a1070 1
     'omp_set_nested_lock' or 'omp_test_nested_lock' before.  In
d1072 1
a1072 1
     'omp_unset_nested_lock'.  If the nesting count drops to zero, the
d1078 1
a1078 1
     _Prototype_:   'void omp_unset_nest_lock(omp_nest_lock_t *lock);'
d1081 2
a1082 2
     _Interface_:   'subroutine omp_unset_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1093 1
a1093 1
2.39 'omp_destroy_nest_lock' - Destroy nested lock
d1102 1
a1102 1
     _Prototype_:   'void omp_destroy_nest_lock(omp_nest_lock_t *);'
d1105 2
a1106 2
     _Interface_:   'subroutine omp_destroy_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1117 1
a1117 1
2.40 'omp_get_wtick' - Get timer precision
d1125 1
a1125 1
     _Prototype_:   'double omp_get_wtick(void);'
d1128 1
a1128 1
     _Interface_:   'double precision function omp_get_wtick()'
d1139 1
a1139 1
2.41 'omp_get_wtime' - Elapsed wall clock time
d1150 1
a1150 1
     _Prototype_:   'double omp_get_wtime(void);'
d1153 1
a1153 1
     _Interface_:   'double precision function omp_get_wtime()'
d1167 1
a1167 1
The environment variables which beginning with 'OMP_' are defined by
d1169 1
a1169 1
beginning with 'GOMP_' are GNU extensions.
d1196 1
a1196 1
3.1 'OMP_CANCELLATION' - Set whether cancellation is activated
d1200 3
a1202 3
     If set to 'TRUE', the cancellation is activated.  If set to 'FALSE'
     or if unset, cancellation is disabled and the 'cancel' construct is
     ignored.
d1213 1
a1213 1
3.2 'OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
d1217 1
a1217 1
     If set to 'TRUE', the OpenMP version number and the values
d1219 1
a1219 1
     'stderr'.  If set to 'VERBOSE', it additionally shows the value of
d1221 1
a1221 1
     or set to 'FALSE', this information will not be shown.
d1229 1
a1229 1
3.3 'OMP_DEFAULT_DEVICE' - Set the device used in target regions
d1233 5
a1237 5
     Set to choose the device which is used in a 'target' region, unless
     the value is overridden by 'omp_set_default_device' or by a
     'device' clause.  The value shall be the nonnegative device number.
     If no device with the given device number exists, the code is
     executed on the host.  If unset, device number 0 will be used.
d1248 1
a1248 1
3.4 'OMP_DYNAMIC' - Dynamic adjustment of threads
d1254 2
a1255 2
     'TRUE' or 'FALSE'.  If undefined, dynamic adjustment is disabled by
     default.
d1266 1
a1266 1
3.5 'OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1283 1
a1283 1
3.6 'OMP_MAX_TASK_PRIORITY' - Set the maximum priority
d1286 1
a1286 1
number that can be set for a task.
d1288 2
a1289 2
     Specifies the initial value for the maximum priority value that can
     be set for a task.  The value of this variable shall be a
d1302 1
a1302 1
3.7 'OMP_NESTED' - Nested parallel regions
d1308 1
a1308 1
     environment variable shall be 'TRUE' or 'FALSE'.  If undefined,
d1320 1
a1320 1
3.8 'OMP_NUM_THREADS' - Specifies the number of threads to use
d1324 5
a1328 5
     Specifies the default number of threads to use in parallel regions.
     The value of this variable shall be a comma-separated list of
     positive integers; the value specified the number of threads to use
     for the corresponding nested level.  If undefined one thread per
     CPU is used.
d1339 1
a1339 1
3.9 'OMP_PROC_BIND' - Whether theads may be moved between CPUs
d1344 1
a1344 1
     to 'TRUE', OpenMP theads should not be moved; if set to 'FALSE'
d1346 1
a1346 1
     values 'MASTER', 'CLOSE' and 'SPREAD' can be used to specify the
d1348 3
a1350 3
     'MASTER' the worker threads are in the same place partition as the
     master thread.  With 'CLOSE' those are kept close to the master
     thread in contiguous place partitions.  And with 'SPREAD' a sparse
d1353 2
a1354 2
     When undefined, 'OMP_PROC_BIND' defaults to 'TRUE' when
     'OMP_PLACES' or 'GOMP_CPU_AFFINITY' is set and 'FALSE' otherwise.
d1366 1
a1366 1
3.10 'OMP_PLACES' - Specifies on which CPUs the theads should be placed
d1370 3
a1372 3
     The thread placement can be either specified using an abstract name
     or by an explicit list of the places.  The abstract names
     'threads', 'cores' and 'sockets' can be optionally followed by a
d1374 3
a1376 3
     shall be created.  With 'threads' each place corresponds to a
     single hardware thread; 'cores' to a single core with the
     corresponding number of hardware threads; and with 'sockets' the
d1378 1
a1378 1
     be shown by setting the 'OMP_DISPLAY_ENV' environment variable.
d1391 2
a1392 2
     specifies the same places list: '"{0,1,2}, {3,4,6}, {7,8,9},
     {10,11,12}"'; '"{0:3}, {3:3}, {7:3}, {10:3}"'; and '"{0:2}:4:3"'.
d1394 2
a1395 2
     If 'OMP_PLACES' and 'GOMP_CPU_AFFINITY' are unset and
     'OMP_PROC_BIND' is either unset or 'false', threads may be moved
d1408 1
a1408 1
3.11 'OMP_STACKSIZE' - Set default thread stack size
d1413 7
a1419 7
     is suffixed by 'B', 'K', 'M' or 'G', in which case the size is,
     respectively, in bytes, kilobytes, megabytes or gigabytes.  This is
     different from 'pthread_attr_setstacksize' which gets the number of
     bytes as an argument.  If the stack size cannot be set due to
     system constraints, an error is reported and the initial stack size
     is left unchanged.  If undefined, the stack size is system
     dependent.
d1427 1
a1427 1
3.12 'OMP_SCHEDULE' - How threads are scheduled
d1431 5
a1435 5
     Allows to specify 'schedule type' and 'chunk size'.  The value of
     the variable shall have the form: 'type[,chunk]' where 'type' is
     one of 'static', 'dynamic', 'guided' or 'auto' The optional 'chunk'
     size shall be a positive integer.  If undefined, dynamic scheduling
     and a chunk size of 1 is used.
d1447 1
a1447 1
3.13 'OMP_THREAD_LIMIT' - Set the maximum number of threads
d1464 1
a1464 1
3.14 'OMP_WAIT_POLICY' - How waiting threads are handled
d1469 2
a1470 2
     the value is 'PASSIVE', waiting threads should not consume CPU
     power while waiting; while the value is 'ACTIVE' specifies that
d1483 1
a1483 1
3.15 'GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d1491 2
a1492 2
     (M-N:S). CPU numbers are zero based.  For example,
     'GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
d1496 1
a1496 1
     beginning of the list.  'GOMP_CPU_AFFINITY=0' binds all threads to
d1501 10
a1510 10
     language-specific library functions, e.g., 'getenv' in C or
     'GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
     setting of the 'GOMP_CPU_AFFINITY' environment variable.  A defined
     CPU affinity on startup cannot be changed or disabled during the
     runtime of the application.

     If both 'GOMP_CPU_AFFINITY' and 'OMP_PROC_BIND' are set,
     'OMP_PROC_BIND' has a higher precedence.  If neither has been set
     and 'OMP_PROC_BIND' is unset, or when 'OMP_PROC_BIND' is set to
     'FALSE', the host system will handle the assignment of threads to
d1519 1
a1519 1
3.16 'GOMP_DEBUG' - Enable debugging output
d1523 2
a1524 2
     Enable debugging output.  The variable should be set to '0'
     (disabled, also the default if not set), or '1' (enabled).
d1533 1
a1533 1
3.17 'GOMP_STACKSIZE' - Set default thread stack size
d1538 1
a1538 1
     from 'pthread_attr_setstacksize' which gets the number of bytes as
d1555 1
a1555 1
3.18 'GOMP_SPINCOUNT' - Set the busy-wait spin count
d1561 1
a1561 1
     value may be either 'INFINITE', 'INFINITY' to always wait actively
d1564 9
a1572 8
     suffixes acting as multiplication factors: 'k' (kilo, thousand),
     'M' (mega, million), 'G' (giga, billion), or 'T' (tera, trillion).
     If undefined, 0 is used when 'OMP_WAIT_POLICY' is 'PASSIVE',
     300,000 is used when 'OMP_WAIT_POLICY' is undefined and 30 billion
     is used when 'OMP_WAIT_POLICY' is 'ACTIVE'.  If there are more
     OpenMP threads than available CPUs, 1000 and 100 spins are used for
     'OMP_WAIT_POLICY' being 'ACTIVE' or undefined, respectively; unless
     the 'GOMP_SPINCOUNT' is lower or 'OMP_WAIT_POLICY' is 'PASSIVE'.
d1580 1
a1580 1
3.19 'GOMP_RTEMS_THREAD_POOLS' - Set the RTEMS specific thread pools
d1586 4
a1589 4
     thread pools.  The format for 'GOMP_RTEMS_THREAD_POOLS' is a list
     of optional '<thread-pool-count>[$<priority>]@@<scheduler-name>'
     configurations separated by ':' where:
        * '<thread-pool-count>' is the thread pool count for this
d1591 3
a1593 2
        * '$<priority>' is an optional priority for the worker threads
          of a thread pool according to 'pthread_setschedparam'.  In
d1599 2
a1600 1
        * '@@<scheduler-name>' is the scheduler instance name according
d1603 5
a1607 4
     instance, then each OpenMP master thread of this scheduler instance
     will use its own dynamically allocated thread pool.  To limit the
     worker thread count of the thread pools, each OpenMP master thread
     must call 'omp_set_num_threads'.
d1609 2
a1610 2
     Lets suppose we have three scheduler instances 'IO', 'WRK0', and
     'WRK1' with 'GOMP_RTEMS_THREAD_POOLS' set to '"1@@WRK0:3$4@@WRK1"'.
d1612 1
a1612 1
     'IO'.  In the scheduler instance 'WRK0' there is one thread pool
d1615 3
a1617 3
     master thread that created it.  In the scheduler instance 'WRK1'
     there are three thread pools available and their worker threads run
     at priority four.
d1626 4
a1629 4
compile-time flag '-fopenacc' must be specified.  This enables the
OpenACC directive '#pragma acc' in C/C++ and '!$accp' directives in free
form, 'c$acc', '*$acc' and '!$acc' directives in fixed form, '!$'
conditional compilation sentinels in free form and 'c$', '*$' and '!$'
d1639 2
a1640 2
future versions of GCC. See <https://gcc.gnu.org/wiki/OpenACC> for more
information.
d1650 3
a1652 3
throw exceptions.  Generally, they are available only for the host, with
the exception of 'acc_on_device', which is available for both the host
and the acceleration device.
d1715 1
a1715 1
5.1 'acc_get_num_devices' - Get number of devices for given device type
d1723 1
a1723 1
     _Prototype_:   'int acc_get_num_devices(acc_device_t devicetype);'
d1726 2
a1727 2
     _Interface_:   'integer function acc_get_num_devices(devicetype)'
                    'integer(kind=acc_device_kind) devicetype'
d1736 1
a1736 1
5.2 'acc_set_device_type' - Set type of device accelerator to use.
d1745 1
a1745 1
     _Prototype_:   'acc_set_device_type(acc_device_t devicetype);'
d1748 2
a1749 2
     _Interface_:   'subroutine acc_set_device_type(devicetype)'
                    'integer(kind=acc_device_kind) devicetype'
d1758 1
a1758 1
5.3 'acc_get_device_type' - Get type of device accelerator to be used.
d1766 1
a1766 1
     _Prototype_:   'acc_device_t acc_get_device_type(void);'
d1769 2
a1770 2
     _Interface_:   'function acc_get_device_type(void)'
                    'integer(kind=acc_device_kind) acc_get_device_type'
d1779 1
a1779 1
5.4 'acc_set_device_num' - Set device number to use.
d1788 2
a1789 1
     _Prototype_:   'acc_set_device_num(int num, acc_device_t devicetype);'
d1792 3
a1794 3
     _Interface_:   'subroutine acc_set_device_num(devicenum, devicetype)'
                    'integer devicenum'
                    'integer(kind=acc_device_kind) devicetype'
d1803 1
a1803 1
5.5 'acc_get_device_num' - Get device number to be used.
d1812 1
a1812 1
     _Prototype_:   'int acc_get_device_num(acc_device_t devicetype);'
d1815 3
a1817 3
     _Interface_:   'function acc_get_device_num(devicetype)'
                    'integer(kind=acc_device_kind) devicetype'
                    'integer acc_get_device_num'
d1826 1
a1826 1
5.6 'acc_async_test' - Test for completion of a specific asynchronous operation.
d1831 4
a1834 4
     specified in ARG.  In C/C++, a non-zero value will be returned to
     indicate the specified asynchronous operation has completed.  While
     Fortran will return a 'true'.  If the asynchrounous operation has
     not completed, C/C++ returns a zero and Fortran returns a 'false'.
d1837 1
a1837 1
     _Prototype_:   'int acc_async_test(int arg);'
d1840 3
a1842 3
     _Interface_:   'function acc_async_test(arg)'
                    'integer(kind=acc_handle_kind) arg'
                    'logical acc_async_test'
d1851 1
a1851 1
5.7 'acc_async_test_all' - Tests for completion of all asynchronous operations.
d1857 3
a1859 3
     asynchronous operations have completed.  While Fortran will return
     a 'true'.  If any asynchronous operation has not completed, C/C++
     returns a zero and Fortran returns a 'false'.
d1862 1
a1862 1
     _Prototype_:   'int acc_async_test_all(void);'
d1865 2
a1866 2
     _Interface_:   'function acc_async_test()'
                    'logical acc_get_device_num'
d1875 1
a1875 1
5.8 'acc_wait' - Wait for completion of a specific asynchronous operation.
d1883 1
a1883 1
     _Prototype_:   'acc_wait(arg);'
d1886 2
a1887 2
     _Interface_:   'subroutine acc_wait(arg)'
                    'integer(acc_handle_kind) arg'
d1896 1
a1896 1
5.9 'acc_wait_all' - Waits for completion of all asynchronous operations.
d1904 1
a1904 1
     _Prototype_:   'acc_wait_all(void);'
d1907 1
a1907 1
     _Interface_:   'subroutine acc_wait_async()'
d1916 1
a1916 1
5.10 'acc_wait_all_async' - Wait for completion of all asynchronous operations.
d1925 1
a1925 1
     _Prototype_:   'acc_wait_all_async(int async);'
d1928 2
a1929 2
     _Interface_:   'subroutine acc_wait_all_async(async)'
                    'integer(acc_handle_kind) async'
d1938 1
a1938 1
5.11 'acc_wait_async' - Wait for completion of asynchronous operations.
d1946 1
a1946 1
     _Prototype_:   'acc_wait_async(int arg, int async);'
d1949 2
a1950 2
     _Interface_:   'subroutine acc_wait_async(arg, async)'
                    'integer(acc_handle_kind) arg, async'
d1959 1
a1959 1
5.12 'acc_init' - Initialize runtime for a specific device type.
d1963 2
a1964 2
     This function initializes the runtime for the device type specified
     in DEVICETYPE.
d1967 1
a1967 1
     _Prototype_:   'acc_init(acc_device_t devicetype);'
d1970 2
a1971 2
     _Interface_:   'subroutine acc_init(devicetype)'
                    'integer(acc_device_kind) devicetype'
d1980 1
a1980 1
5.13 'acc_shutdown' - Shuts down the runtime for a specific device type.
d1988 1
a1988 1
     _Prototype_:   'acc_shutdown(acc_device_t devicetype);'
d1991 2
a1992 2
     _Interface_:   'subroutine acc_shutdown(devicetype)'
                    'integer(acc_device_kind) devicetype'
d2001 1
a2001 1
5.14 'acc_on_device' - Whether executing on a particular device
d2006 1
a2006 1
     particular device specified in DEVICETYPE.  In C/C++ a non-zero
d2008 1
a2008 1
     specified device type.  In Fortran, 'true' will be returned.  If
d2010 1
a2010 1
     will return a zero, while Fortran will return 'false'.
d2013 1
a2013 1
     _Prototype_:   'acc_on_device(acc_device_t devicetype);'
d2016 3
a2018 3
     _Interface_:   'function acc_on_device(devicetype)'
                    'integer(acc_device_kind) devicetype'
                    'logical acc_on_device'
d2027 1
a2027 1
5.15 'acc_malloc' - Allocate device memory.
d2031 1
a2031 1
     This function allocates LEN bytes of device memory.  It returns the
d2035 1
a2035 1
     _Prototype_:   'd_void* acc_malloc(size_t len);'
d2044 1
a2044 1
5.16 'acc_free' - Free device memory.
d2048 1
a2048 1
     Free previously allocated device memory at the device address 'a'.
d2051 1
a2051 1
     _Prototype_:   'acc_free(d_void *a);'
d2060 1
a2060 1
5.17 'acc_copyin' - Allocate device memory and copy host memory to it.
d2065 1
a2065 1
     maps it to the specified host address in A.  The device address of
d2068 3
a2070 3
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
     a variable or array element and LEN specifies the length in bytes.
d2073 1
a2073 1
     _Prototype_:   'void *acc_copyin(h_void *a, size_t len);'
d2076 5
a2080 5
     _Interface_:   'subroutine acc_copyin(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_copyin(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2089 1
a2089 1
5.18 'acc_present_or_copyin' - If the data is not present on the device, allocate device memory and copy from host memory.
d2094 3
a2096 3
     LEN is present or not.  If it is not present, then device memory
     will be allocated and the host memory copied.  The device address
     of the newly allocated device memory is returned.
d2098 2
a2099 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2103 2
a2104 2
     _Prototype_:   'void *acc_present_or_copyin(h_void *a, size_t len);'
     _Prototype_:   'void *acc_pcopyin(h_void *a, size_t len);'
d2107 10
a2116 10
     _Interface_:   'subroutine acc_present_or_copyin(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_present_or_copyin(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_pcopyin(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_pcopyin(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2125 1
a2125 1
5.19 'acc_create' - Allocate device memory and map it to host memory.
d2130 1
a2130 1
     specified by the host address A with a length of LEN bytes.  In
d2134 2
a2135 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2139 1
a2139 1
     _Prototype_:   'void *acc_create(h_void *a, size_t len);'
d2142 5
a2146 5
     _Interface_:   'subroutine acc_create(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_create(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2155 1
a2155 1
5.20 'acc_present_or_create' - If the data is not present on the device, allocate device memory and map it to host memory.
d2160 2
a2161 2
     LEN is present or not.  If it is not present, then device memory
     will be allocated and mapped to host memory.  In C/C++, the device
d2164 2
a2165 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2169 2
a2170 2
     _Prototype_:   'void *acc_present_or_create(h_void *a, size_t len)'
     _Prototype_:   'void *acc_pcreate(h_void *a, size_t len)'
d2173 10
a2182 10
     _Interface_:   'subroutine acc_present_or_create(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_present_or_create(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_pcreate(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_pcreate(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2191 1
a2191 1
5.21 'acc_copyout' - Copy device memory to host memory.
d2198 2
a2199 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2203 1
a2203 1
     _Prototype_:   'acc_copyout(h_void *a, size_t len);'
d2206 5
a2210 5
     _Interface_:   'subroutine acc_copyout(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_copyout(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2219 1
a2219 1
5.22 'acc_delete' - Free device memory.
d2226 2
a2227 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2231 1
a2231 1
     _Prototype_:   'acc_delete(h_void *a, size_t len);'
d2234 5
a2238 5
     _Interface_:   'subroutine acc_delete(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_delete(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2247 1
a2247 1
5.23 'acc_update_device' - Update device memory from mapped host memory.
d2255 2
a2256 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2260 1
a2260 1
     _Prototype_:   'acc_update_device(h_void *a, size_t len);'
d2263 5
a2267 5
     _Interface_:   'subroutine acc_update_device(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_update_device(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2276 1
a2276 1
5.24 'acc_update_self' - Update host memory from mapped device memory.
d2284 2
a2285 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2289 1
a2289 1
     _Prototype_:   'acc_update_self(h_void *a, size_t len);'
d2292 5
a2296 5
     _Interface_:   'subroutine acc_update_self(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_update_self(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2305 1
a2305 1
5.25 'acc_map_data' - Map previously allocated device memory to host memory.
d2310 1
a2310 1
     The device memory is specified with the device address D.  The host
d2314 1
a2314 1
     _Prototype_:   'acc_map_data(h_void *h, d_void *d, size_t len);'
d2323 1
a2323 1
5.26 'acc_unmap_data' - Unmap device memory from host memory.
d2327 1
a2327 1
     This function unmaps previously mapped device and host memory.  The
d2331 1
a2331 1
     _Prototype_:   'acc_unmap_data(h_void *h);'
d2340 1
a2340 1
5.27 'acc_deviceptr' - Get device pointer associated with specific host address.
d2348 1
a2348 1
     _Prototype_:   'void *acc_deviceptr(h_void *h);'
d2357 1
a2357 1
5.28 'acc_hostptr' - Get host pointer associated with specific device address.
d2365 1
a2365 1
     _Prototype_:   'void *acc_hostptr(d_void *d);'
d2374 1
a2374 1
5.29 'acc_is_present' - Indicate whether host variable / array is present on device.
d2378 2
a2379 2
     This function indicates whether the specified host address in A and
     a length of LEN bytes is present on the device.  In C/C++, a
d2381 1
a2381 1
     memory on the device.  A zero is returned to indicate the memory is
d2384 2
a2385 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2387 2
a2388 2
     If the host memory is mapped to device memory, then a 'true' is
     returned.  Otherwise, a 'false' is return to indicate the mapped
d2392 1
a2392 1
     _Prototype_:   'int acc_is_present(h_void *a, size_t len);'
d2395 7
a2401 7
     _Interface_:   'function acc_is_present(a)'
                    'type, dimension(:[,:]...) :: a'
                    'logical acc_is_present'
     _Interface_:   'function acc_is_present(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'logical acc_is_present'
d2410 1
a2410 1
5.30 'acc_memcpy_to_device' - Copy host memory to device memory.
d2419 2
a2420 2
     _Prototype_:   'acc_memcpy_to_device(d_void *dest, h_void *src, size_t
                    bytes);'
d2429 1
a2429 1
5.31 'acc_memcpy_from_device' - Copy device memory to host memory.
d2438 2
a2439 2
     _Prototype_:   'acc_memcpy_from_device(d_void *dest, h_void *src,
                    size_t bytes);'
d2448 1
a2448 1
5.32 'acc_get_current_cuda_device' - Get CUDA device handle.
d2452 1
a2452 1
     This function returns the CUDA device handle.  This handle is the
d2456 1
a2456 1
     _Prototype_:   'void *acc_get_current_cuda_device(void);'
d2465 1
a2465 1
5.33 'acc_get_current_cuda_context' - Get CUDA context handle.
d2469 1
a2469 1
     This function returns the CUDA context handle.  This handle is the
d2473 1
a2473 1
     _Prototype_:   'acc_get_current_cuda_context(void);'
d2482 1
a2482 1
5.34 'acc_get_cuda_stream' - Get CUDA stream handle.
d2486 1
a2486 1
     This function returns the CUDA stream handle.  This handle is the
d2490 1
a2490 1
     _Prototype_:   'acc_get_cuda_stream(void);'
d2499 1
a2499 1
5.35 'acc_set_cuda_stream' - Set CUDA stream handle.
d2507 1
a2507 1
     _Prototype_:   'acc_set_cuda_stream(int async void *stream);'
d2519 1
a2519 1
The variables 'ACC_DEVICE_TYPE' and 'ACC_DEVICE_NUM' are defined by
d2521 1
a2521 1
'GCC_ACC_NOTIFY' is used for diagnostic purposes.
d2532 1
a2532 1
6.1 'ACC_DEVICE_TYPE'
d2541 1
a2541 1
6.2 'ACC_DEVICE_NUM'
d2550 1
a2550 1
6.3 'GCC_ACC_NOTIFY'
d2562 1
a2562 1
This applies to the 'nvptx' plugin only.
d2571 4
a2574 4
'async' and 'wait' clauses.  When the 'async' clause is first used with
a directive, it creates a CUDA stream.  If an 'async-argument' is used
with the 'async' clause, then the stream is associated with the
specified 'async-argument'.
d2577 2
a2578 2
the 'async-argument' of an 'async' clause, both the 'wait' clause and
the 'wait' directive can be used.  When either the clause or directive
d2581 1
a2581 1
'async-argument', that is, stream, have completed.
d2584 2
a2585 2
of using the 'async' clause, is done without any intervention by the
caller.  This implies the association between the 'async-argument' and
d2588 5
a2592 5
function 'acc_set_cuda_stream'.  When the function 'acc_set_cuda_stream'
is called, the CUDA stream that was originally associated with the
'async' clause will be destroyed.  Caution should be taken when changing
the association as subsequent references to the 'async-argument' refer
to a different CUDA stream.
d2609 4
a2612 4
programs that use the Runtime library directly, or another library based
on the Runtime library, e.g., CUBLAS(1). This chapter describes the use
cases and what changes are required in order to use both the OpenACC
library and the CUBLAS and Runtime libraries within a program.
d2618 2
a2619 2
called prior to any of the functions in the OpenACC library.  More
specifically, the function 'cublasCreate()'.
d2624 5
a2628 5
returned to the caller.  The OpenACC library also requires
initialization and allocation of hardware resources.  Since the CUBLAS
library has already allocated the hardware resources for the device, all
that is left to do is to initialize the OpenACC library and acquire the
hardware resources on the host.
d2631 10
a2640 10
and allocate the host hardware resources, you need to acquire the device
number that was allocated during the call to 'cublasCreate()'.  The
invoking of the runtime library function 'cudaGetDevice()' accomplishes
this.  Once acquired, the device number is passed along with the device
type as parameters to the OpenACC library function
'acc_set_device_num()'.

   Once the call to 'acc_set_device_num()' has completed, the OpenACC
library uses the context that was created during the call to
'cublasCreate()'.  In other words, both libraries will be sharing the
d2661 1
a2661 2

                              Use Case 1
d2667 2
a2668 2
is called prior to any of the functions in the CUBLAS library.  More
specificially, the function 'acc_set_device_num()'.
d2670 1
a2670 1
   In the use case presented here, the function 'acc_set_device_num()'
d2672 3
a2674 3
resources on the host and the device.  In the call to the function, the
call parameters specify which device to use and what device type to use,
i.e., 'acc_device_nvidia'.  It should be noted that this is but one
d2676 1
a2676 1
hardware resources.  Other methods are available through the use of
d2679 1
a2679 1
   Once the call to 'acc_set_device_num()' has completed, other OpenACC
d2681 4
a2684 4
'acc_copyin()'.  In addition, calls can be made to functions in the
CUBLAS library.  In the use case a call to 'cublasCreate()' is made
subsequent to the calls to 'acc_copyin()'.  As seen in the previous use
case, a call to 'cublasCreate()' initializes the CUBLAS library and
d2686 1
a2686 1
since the device has already been allocated, 'cublasCreate()' will only
d2688 1
a2688 1
resources on the host.  The context that was created as part of the
d2730 1
a2730 2

                              Use Case 2
d2737 1
a2737 1
'ACC_DEVICE_TYPE' and 'ACC_DEVICE_NUM', respecively.  These two
d2739 2
a2740 2
'acc_set_device_num()'.  As seen in the second use case, the device type
and device number were specified using 'acc_set_device_num()'.  If
d2742 1
a2742 1
call to 'acc_set_device_num()' would not be required.
d2744 4
a2747 4
   The use of the environment variables is only relevant when an OpenACC
function is called prior to a call to 'cudaCreate()'.  If 'cudaCreate()'
is called prior to a call to an OpenACC function, then you must call
'acc_set_device_num()'(2)
d2753 2
a2754 2
Interoperability", in "CUDA Driver API", TRM-06703-001, Version 5.5, for
additional information on library interoperability.
d2756 2
a2757 2
   (2) More complete information about 'ACC_DEVICE_TYPE' and
'ACC_DEVICE_NUM' can be found in sections 4.1 and 4.2 of the OpenACC
d2767 2
a2768 2
The following sections present notes on the external ABI as presented by
libgomp.  Only maintainers should need them.
d2829 1
a2829 1
The target should implement the '__sync' builtins.
d2845 1
a2845 1
Expands to the '__sync_synchronize' builtin.
d2861 4
a2864 4
In _most_ cases we can map this directly to '__thread'.  Except that OMP
allows constructors for C++ objects.  We can either refuse to support
this (how often is it used?)  or we can implement something akin to
.ctors.
d2896 2
a2897 2
   It is not clear what to do with bare FOR or SECTION blocks.  The only
thing I can figure is that we do something like:
d2915 2
a2916 2
for the two variables, i.e.  not something you could write directly in
C. Presumably this only makes sense if the "outer" x and y are global
d2929 4
a2932 4
pointer to an array of the type of the variable, indexed by the thread's
TEAM_ID.  The thread stores its final value into the array, and after
the barrier, the master thread iterates over the array to collect the
values.
d2969 3
a2971 3
   The function needs to create the appropriate number of threads and/or
launch them from the dock.  It needs to create the team structure and
assign team ids.
d2976 1
a2976 1
'omp_in_parallel()' state.
d3028 2
a3029 2
also pull it into a local variable if we like, but since its supposed to
remain unchanged, we can also not if we like.
d3031 5
a3035 5
   If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be able
to get away with no work-sharing context at all, since we can simply
perform the arithmetic directly in each thread to divide up the
iterations.  Which would mean that we wouldn't need to call any of these
routines.
d3137 2
a3138 2
"openacc", or "openmp", or both to the keywords field in the bug report,
as appropriate.
d3148 1
a3148 1
     Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
d3176 3
a3178 3
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
d3197 10
a3206 9
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
d3243 2
a3244 2
     infringement under applicable copyright law, except executing it on
     a computer or modifying a private copy.  Propagation includes
d3258 2
a3259 2
     the extent that warranties are provided), that licensees may convey
     the work under this License, and how to view a copy of this
d3267 2
a3268 2
     for making modifications to it.  "Object code" means any non-source
     form of a work.
d3279 4
a3282 4
     Major Component, and (b) serves only to enable use of the work with
     that Major Component, or to implement a Standard Interface for
     which an implementation is available to the public in source code
     form.  A "Major Component", in this context, means a major
d3290 3
a3292 3
     work) run the object code and to modify the work, including scripts
     to control those activities.  However, it does not include the
     work's System Libraries, or general-purpose tools or generally
d3295 4
a3298 4
     Corresponding Source includes interface definition files associated
     with source files for the work, and the source code for shared
     libraries and dynamically linked subprograms that the work is
     specifically designed to require, such as by intimate data
d3315 4
a3318 4
     a covered work is covered by this License only if the output, given
     its content, constitutes a covered work.  This License acknowledges
     your rights of fair use or other equivalent, as provided by
     copyright law.
d3323 8
a3330 8
     sole purpose of having them make modifications exclusively for you,
     or provide you with facilities for running those works, provided
     that you comply with the terms of this License in conveying all
     material for which you do not control copyright.  Those thus making
     or running the covered works for you must do so exclusively on your
     behalf, under your direction and control, on terms that prohibit
     them from making any copies of your copyrighted material outside
     their relationship with you.
d3347 2
a3348 2
     with respect to the covered work, and you disclaim any intention to
     limit operation or modification of the work as a means of
d3418 2
a3419 2
          written offer, valid for at least three years and valid for as
          long as you offer spare parts or customer support for that
d3429 2
a3430 2
       c. Convey individual copies of the object code with a copy of the
          written offer to provide the Corresponding Source.  This
d3436 2
a3437 2
          place (gratis or for a charge), and offer equivalent access to
          the Corresponding Source in the same way through the same
d3441 4
a3444 4
          Corresponding Source may be on a different server (operated by
          you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to the
          object code saying where to find the Corresponding Source.
d3446 2
a3447 2
          remain obligated to ensure that it is available for as long as
          needed to satisfy these requirements.
d3454 1
d3462 2
a3463 2
     incorporation into a dwelling.  In determining whether a product is
     a consumer product, doubtful cases shall be resolved in favor of
d3494 5
a3498 5
     warranty, or updates for a work that has been modified or installed
     by the recipient, or for the User Product in which it has been
     modified or installed.  Access to a network may be denied when the
     modification itself materially and adversely affects the operation
     of the network or violates the rules and protocols for
d3528 2
a3529 2
     holders of that material) supplement the terms of this License with
     terms:
d3539 3
a3541 2
          or requiring that modified versions of such material be marked
          in reasonable ways as different from the original version; or
d3560 5
a3564 4
     contains a further restriction but permits relicensing or conveying
     under this License, you may add to a covered work material governed
     by the terms of that license document, provided that the further
     restriction does not survive such relicensing or conveying.
d3580 2
a3581 2
     under this License (including any patent licenses granted under the
     third paragraph of section 11).
d3585 2
a3586 2
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
d3598 4
a3601 4
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, you do not qualify to receive new licenses
     for the same material under section 10.
d3615 1
a3615 1
  10. Automatic Licensing of Downstream Recipients.
d3629 4
a3632 4
     could give under the previous paragraph, plus a right to possession
     of the Corresponding Source of the work from the predecessor in
     interest, if the predecessor has it or can get it with reasonable
     efforts.
d3636 6
a3641 6
     may not impose a license fee, royalty, or other charge for exercise
     of rights granted under this License, and you may not initiate
     litigation (including a cross-claim or counterclaim in a lawsuit)
     alleging that any patent claim is infringed by making, using,
     selling, offering for sale, or importing the Program or any portion
     of it.
d3643 1
a3643 1
  11. Patents.
d3663 2
a3664 2
     otherwise run, modify and propagate the contents of its contributor
     version.
d3669 3
a3671 3
     patent or covenant not to sue for patent infringement).  To "grant"
     such a patent license to a party means to make such an agreement or
     commitment not to enforce a patent against the party.
d3701 10
a3710 10
     party that is in the business of distributing software, under which
     you make payment to the third party based on the extent of your
     activity of conveying the work, and under which the third party
     grants, to any of the parties who would receive the covered work
     from you, a discriminatory patent license (a) in connection with
     copies of the covered work conveyed by you (or copies made from
     those copies), or (b) primarily for and in connection with specific
     products or compilations that contain the covered work, unless you
     entered into that arrangement, or that patent license was granted,
     prior to 28 March 2007.
d3716 1
a3716 1
  12. No Surrender of Others' Freedom.
d3718 11
a3728 10
     If conditions are imposed on you (whether by court order, agreement
     or otherwise) that contradict the conditions of this License, they
     do not excuse you from the conditions of this License.  If you
     cannot convey a covered work so as to satisfy simultaneously your
     obligations under this License and any other pertinent obligations,
     then as a consequence you may not convey it at all.  For example,
     if you agree to terms that obligate you to collect a royalty for
     further conveying from those to whom you convey the Program, the
     only way you could satisfy both those terms and this License would
     be to refrain entirely from conveying the Program.
d3730 1
a3730 1
  13. Use with the GNU Affero General Public License.
d3741 1
a3741 1
  14. Revised Versions of this License.
d3744 4
a3747 3
     versions of the GNU General Public License from time to time.  Such
     new versions will be similar in spirit to the present version, but
     may differ in detail to address new problems or concerns.
d3753 4
a3756 4
     that numbered version or of any later version published by the Free
     Software Foundation.  If the Program does not specify a version
     number of the GNU General Public License, you may choose any
     version ever published by the Free Software Foundation.
d3768 1
a3768 1
  15. Disclaimer of Warranty.
d3771 1
a3771 1
     APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
d3775 1
a3775 1
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
d3780 1
a3780 1
  16. Limitation of Liability.
d3784 2
a3785 2
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
     DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
d3793 1
a3793 1
  17. Interpretation of Sections 15 and 16.
d3802 1
d3833 1
a3833 1
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
d3842 1
a3842 1
     This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
d3844 1
a3844 1
     under certain conditions; type 'show c' for details.
d3846 1
a3846 1
   The hypothetical commands 'show w' and 'show c' should show the
d3854 1
a3854 1
the GNU GPL, see <http://www.gnu.org/licenses/>.
d3861 1
a3861 1
please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
d3872 1
a3872 1
     <http://fsf.org/>
d3897 2
a3898 2
     of subject matter or whether it is published as a printed book.  We
     recommend this License principally for works whose purpose is
d3904 2
a3905 2
     that contains a notice placed by the copyright holder saying it can
     be distributed under the terms of this License.  Such a notice
d3909 3
a3911 3
     of the public is a licensee, and is addressed as "you".  You accept
     the license if you copy, modify or distribute the work in a way
     requiring permission under copyright law.
d3929 6
a3934 6
     titles are designated, as being those of Invariant Sections, in the
     notice that says that the Document is released under this License.
     If a section does not fit the above definition of Secondary then it
     is not allowed to be designated as Invariant.  The Document may
     contain zero Invariant Sections.  If the Document does not identify
     any Invariant Sections then there are none.
d3945 10
a3954 10
     straightforwardly with generic text editors or (for images composed
     of pixels) generic paint programs or (for drawings) some widely
     available drawing editor, and that is suitable for input to text
     formatters or for automatic translation to a variety of formats
     suitable for input to text formatters.  A copy made in an otherwise
     Transparent file format whose markup, or absence of markup, has
     been arranged to thwart or discourage subsequent modification by
     readers is not Transparent.  An image format is not Transparent if
     used for any substantial amount of text.  A copy that is not
     "Transparent" is called "Opaque".
d3958 8
a3965 8
     SGML or XML using a publicly available DTD, and standard-conforming
     simple HTML, PostScript or PDF designed for human modification.
     Examples of transparent image formats include PNG, XCF and JPG.
     Opaque formats include proprietary formats that can be read and
     edited only by proprietary word processors, SGML or XML for which
     the DTD and/or processing tools are not generally available, and
     the machine-generated HTML, PostScript or PDF produced by some word
     processors for output purposes only.
d4003 2
a4004 2
     distribute a large enough number of copies you must also follow the
     conditions in section 3.
d4018 6
a4023 5
     front cover must present the full title with all words of the title
     equally prominent and visible.  You may add other material on the
     covers in addition.  Copying with changes limited to the covers, as
     long as they preserve the title of the Document and satisfy these
     conditions, can be treated as verbatim copying in other respects.
d4031 12
a4042 11
     numbering more than 100, you must either include a machine-readable
     Transparent copy along with each Opaque copy, or state in or with
     each Opaque copy a computer-network location from which the general
     network-using public has access to download using public-standard
     network protocols a complete Transparent copy of the Document, free
     of added material.  If you use the latter option, you must take
     reasonably prudent steps, when you begin distribution of Opaque
     copies in quantity, to ensure that this Transparent copy will
     remain thus accessible at the stated location until at least one
     year after the last time you distribute an Opaque copy (directly or
     through your agents or retailers) of that edition to the public.
d4045 3
a4047 3
     the Document well before redistributing any large number of copies,
     to give them a chance to provide you with an updated version of the
     Document.
d4053 5
a4057 5
     release the Modified Version under precisely this License, with the
     Modified Version filling the role of the Document, thus licensing
     distribution and modification of the Modified Version to whoever
     possesses a copy of it.  In addition, you must do these things in
     the Modified Version:
d4060 5
a4064 5
          distinct from that of the Document, and from those of previous
          versions (which should, if there were any, be listed in the
          History section of the Document).  You may use the same title
          as a previous version if the original publisher of that
          version gives permission.
d4094 6
a4099 6
          authors, and publisher of the Modified Version as given on the
          Title Page.  If there is no section Entitled "History" in the
          Document, create one stating the title, year, authors, and
          publisher of the Document as given on its Title Page, then add
          an item describing the Modified Version as stated in the
          previous sentence.
d4104 5
a4108 5
          previous versions it was based on.  These may be placed in the
          "History" section.  You may omit a network location for a work
          that was published at least four years before the Document
          itself, or if the original publisher of the version it refers
          to gives permission.
d4111 2
a4112 2
          Preserve the Title of the section, and preserve in the section
          all the substance and tone of each of the contributor
d4115 4
a4118 3
       L. Preserve all the Invariant Sections of the Document, unaltered
          in their text and in their titles.  Section numbers or the
          equivalent are not considered part of the section titles.
d4131 5
a4135 5
     material copied from the Document, you may at your option designate
     some or all of these sections as invariant.  To do this, add their
     titles to the list of Invariant Sections in the Modified Version's
     license notice.  These titles must be distinct from any other
     section titles.
d4144 9
a4152 9
     and a passage of up to 25 words as a Back-Cover Text, to the end of
     the list of Cover Texts in the Modified Version.  Only one passage
     of Front-Cover Text and one of Back-Cover Text may be added by (or
     through arrangements made by) any one entity.  If the Document
     already includes a cover text for the same cover, previously added
     by you or by arrangement made by the same entity you are acting on
     behalf of, you may not add another; but you may replace the old
     one, on explicit permission from the previous publisher that added
     the old one.
d4162 2
a4163 2
     modified versions, provided that you include in the combination all
     of the Invariant Sections of all of the original documents,
d4190 2
a4191 2
     rules of this License for verbatim copying of each of the documents
     in all other respects.
d4195 3
a4197 3
     a copy of this License into the extracted document, and follow this
     License in all other respects regarding verbatim copying of that
     document.
d4202 2
a4203 2
     separate and independent documents or works, in or on a volume of a
     storage or distribution medium, is called an "aggregate" if the
d4248 2
a4249 2
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
d4261 4
a4264 4
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, receipt of a copy of some or all of the
     same material does not give you any rights to use it.
d4266 1
a4266 1
  10. FUTURE REVISIONS OF THIS LICENSE
d4272 1
a4272 1
     <http://www.gnu.org/copyleft/>.
d4279 5
a4283 5
     published (not as a draft) by the Free Software Foundation.  If the
     Document does not specify a version number of this License, you may
     choose any version ever published (not as a draft) by the Free
     Software Foundation.  If the Document specifies that a proxy can
     decide which future versions of this License can be used, that
d4287 1
a4287 1
  11. RELICENSING
d4317 1
d4334 1
a4334 1
Texts, replace the "with...Texts."  line with this:
d4345 3
a4347 3
recommend releasing these examples in parallel under your choice of free
software license, such as the GNU General Public License, to permit
their use in free software.
d4377 2
a4378 2
can greatly alter what fraction of the sales price counts as profit.  If
the price you pay is $50, ten percent of the profit is probably less
d4388 2
a4389 2
ports such as adding a new CPU to the GNU Compiler Collection contribute
more; major new features or packages contribute the most.
d4408 19
d4428 1
a4428 18
* Environment Variable <1>:              OMP_DISPLAY_ENV.       (line 6)
* Environment Variable <2>:              OMP_DEFAULT_DEVICE.    (line 6)
* Environment Variable <3>:              OMP_DYNAMIC.           (line 6)
* Environment Variable <4>:              OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable <5>:              OMP_MAX_TASK_PRIORITY. (line 6)
* Environment Variable <6>:              OMP_NESTED.            (line 6)
* Environment Variable <7>:              OMP_NUM_THREADS.       (line 6)
* Environment Variable <8>:              OMP_PROC_BIND.         (line 6)
* Environment Variable <9>:              OMP_PLACES.            (line 6)
* Environment Variable <10>:             OMP_STACKSIZE.         (line 6)
* Environment Variable <11>:             OMP_SCHEDULE.          (line 6)
* Environment Variable <12>:             OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <13>:             OMP_WAIT_POLICY.       (line 6)
* Environment Variable <14>:             GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <15>:             GOMP_DEBUG.            (line 6)
* Environment Variable <16>:             GOMP_STACKSIZE.        (line 6)
* Environment Variable <17>:             GOMP_SPINCOUNT.        (line 6)
* Environment Variable <18>:             GOMP_RTEMS_THREAD_POOLS.
d4430 1
a4430 1
* FDL, GNU Free Documentation License:   GNU Free Documentation License.
d4432 4
a4436 6
* Implementation specific setting <1>:   OMP_NUM_THREADS.       (line 6)
* Implementation specific setting <2>:   OMP_SCHEDULE.          (line 6)
* Implementation specific setting <3>:   GOMP_STACKSIZE.        (line 6)
* Implementation specific setting <4>:   GOMP_SPINCOUNT.        (line 6)
* Implementation specific setting <5>:   GOMP_RTEMS_THREAD_POOLS.
                                                                (line 6)
d4442 131
a4572 131
Node: Top2083
Node: Enabling OpenMP4489
Node: Runtime Library Routines5276
Node: omp_get_active_level8339
Node: omp_get_ancestor_thread_num9039
Node: omp_get_cancellation9969
Node: omp_get_default_device10783
Node: omp_get_dynamic11459
Node: omp_get_level12334
Node: omp_get_max_active_levels12954
Node: omp_get_max_task_priority13659
Node: omp_get_max_threads14279
Node: omp_get_nested15036
Node: omp_get_num_devices15950
Node: omp_get_num_procs16471
Node: omp_get_num_teams17010
Node: omp_get_num_threads17526
Node: omp_get_proc_bind18615
Node: omp_get_schedule19536
Node: omp_get_team_num20490
Node: omp_get_team_size20989
Node: omp_get_thread_limit21949
Node: omp_get_thread_num22568
Node: omp_in_parallel23439
Node: omp_in_final24088
Node: omp_is_initial_device24762
Node: omp_set_default_device25455
Node: omp_set_dynamic26246
Node: omp_set_max_active_levels27132
Node: omp_set_nested27909
Node: omp_set_num_threads28801
Node: omp_set_schedule29669
Node: omp_init_lock30750
Node: omp_set_lock31403
Node: omp_test_lock32258
Node: omp_unset_lock33234
Node: omp_destroy_lock34165
Node: omp_init_nest_lock34842
Node: omp_set_nest_lock35577
Node: omp_test_nest_lock36492
Node: omp_unset_nest_lock37519
Node: omp_destroy_nest_lock38534
Node: omp_get_wtick39285
Node: omp_get_wtime39877
Node: Environment Variables40653
Node: OMP_CANCELLATION42208
Node: OMP_DISPLAY_ENV42741
Node: OMP_DEFAULT_DEVICE43444
Node: OMP_DYNAMIC44224
Node: OMP_MAX_ACTIVE_LEVELS44820
Node: OMP_MAX_TASK_PRIORITY45470
Node: OMP_NESTED46128
Node: OMP_NUM_THREADS46733
Node: OMP_PROC_BIND47421
Node: OMP_PLACES48613
Node: OMP_STACKSIZE50790
Node: OMP_SCHEDULE51614
Node: OMP_THREAD_LIMIT52312
Node: OMP_WAIT_POLICY52912
Node: GOMP_CPU_AFFINITY53604
Node: GOMP_DEBUG55334
Node: GOMP_STACKSIZE55841
Node: GOMP_SPINCOUNT56670
Node: GOMP_RTEMS_THREAD_POOLS57874
Node: Enabling OpenACC60052
Node: OpenACC Runtime Library Routines61045
Node: acc_get_num_devices64839
Node: acc_set_device_type65565
Node: acc_get_device_type66329
Node: acc_set_device_num67044
Node: acc_get_device_num67828
Node: acc_async_test68625
Node: acc_async_test_all69617
Node: acc_wait70517
Node: acc_wait_all71152
Node: acc_wait_all_async71731
Node: acc_wait_async72483
Node: acc_init73190
Node: acc_shutdown73836
Node: acc_on_device74504
Node: acc_malloc75508
Node: acc_free76007
Node: acc_copyin76434
Node: acc_present_or_copyin77544
Node: acc_create79170
Node: acc_present_or_create80325
Node: acc_copyout81959
Node: acc_delete82982
Node: acc_update_device83957
Node: acc_update_self85069
Node: acc_map_data86173
Node: acc_unmap_data86858
Node: acc_deviceptr87379
Node: acc_hostptr87949
Node: acc_is_present88513
Node: acc_memcpy_to_device90040
Node: acc_memcpy_from_device90703
Node: acc_get_current_cuda_device91387
Node: acc_get_current_cuda_context91984
Node: acc_get_cuda_stream92578
Node: acc_set_cuda_stream93134
Node: OpenACC Environment Variables93666
Node: ACC_DEVICE_TYPE94125
Node: ACC_DEVICE_NUM94361
Node: GCC_ACC_NOTIFY94618
Node: CUDA Streams Usage94841
Ref: CUDA Streams Usage-Footnote-196741
Node: OpenACC Library Interoperability96850
Ref: OpenACC Library Interoperability-Footnote-1103206
Ref: OpenACC Library Interoperability-Footnote-2103458
Node: The libgomp ABI103666
Node: Implementing MASTER construct104522
Node: Implementing CRITICAL construct104936
Node: Implementing ATOMIC construct105675
Node: Implementing FLUSH construct106156
Node: Implementing BARRIER construct106427
Node: Implementing THREADPRIVATE construct106696
Node: Implementing PRIVATE clause107349
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses107930
Node: Implementing REDUCTION clause109254
Node: Implementing PARALLEL construct109811
Node: Implementing FOR construct111068
Node: Implementing ORDERED construct113066
Node: Implementing SECTIONS construct113372
Node: Implementing SINGLE construct114138
Node: Implementing OpenACC's PARALLEL construct114850
Node: Reporting Bugs115108
Node: Copying115470
Node: GNU Free Documentation License153017
Node: Funding178140
Node: Library Index180666
@


1.8
log
@merge GCC 6.4.0.  sanitizer stuff is probably busted, but most
other changes merged easily.

docs need to be regenerated with modern versions still.
@
text
@d1 2
a2 2
This is libgomp.info, produced by makeinfo version 4.13 from
/space/rguenther/gcc-6.4.0/gcc-6.4.0/libgomp/libgomp.texi.
d21 2
a22 3
software.  Copies published by the Free Software Foundation raise
funds for GNU development.

d53 2
a54 2
software.  Copies published by the Free Software Foundation raise
funds for GNU development.
d62 5
a66 5
This manual documents the usage of libgomp, the GNU Offloading and
Multi Processing Runtime Library.  This includes the GNU implementation
of the OpenMP (http://www.openmp.org) Application Programming Interface
(API) for multi-platform shared-memory parallel programming in C/C++
and Fortran, and the GNU implementation of the OpenACC
d110 10
a119 11
compile-time flag `-fopenmp' must be specified.  This enables the
OpenMP directive `#pragma omp' in C/C++ and `!$omp' directives in free
form, `c$omp', `*$omp' and `!$omp' directives in fixed form, `!$'
conditional compilation sentinels in free form and `c$', `*$' and `!$'
sentinels in fixed form, for Fortran.  The flag also arranges for
automatic linking of the OpenMP runtime library (*note Runtime Library
Routines::).

   A complete description of all OpenMP directives accepted may be
found in the OpenMP Application Program Interface
(http://www.openmp.org) manual, version 4.5.
d187 1
a187 1
2.1 `omp_get_active_level' - Number of parallel regions
d195 1
a195 1
     _Prototype_:  `int omp_get_active_level(void);'
d198 1
a198 1
     _Interface_:  `integer function omp_get_active_level()'
d210 1
a210 1
2.2 `omp_get_ancestor_thread_num' - Ancestor thread ID
d216 2
a217 2
     outside zero to `omp_get_level' -1 is returned; if LEVEL is
     `omp_get_level' the result is identical to `omp_get_thread_num'.
d220 1
a220 1
     _Prototype_:  `int omp_get_ancestor_thread_num(int level);'
d223 2
a224 2
     _Interface_:  `integer function omp_get_ancestor_thread_num(level)'
                   `integer level'
d236 1
a236 1
2.3 `omp_get_cancellation' - Whether cancellation support is enabled
d240 3
a242 3
     This function returns `true' if cancellation is activated, `false'
     otherwise.  Here, `true' and `false' represent their
     language-specific counterparts.  Unless `OMP_CANCELLATION' is set
d246 1
a246 1
     _Prototype_:  `int omp_get_cancellation(void);'
d249 1
a249 1
     _Interface_:  `logical function omp_get_cancellation()'
d260 1
a260 1
2.4 `omp_get_default_device' - Get the default device for target regions
d267 1
a267 1
     _Prototype_:  `int omp_get_default_device(void);'
d270 1
a270 1
     _Interface_:  `integer function omp_get_default_device()'
d281 1
a281 1
2.5 `omp_get_dynamic' - Dynamic teams setting
d285 2
a286 2
     This function returns `true' if enabled, `false' otherwise.  Here,
     `true' and `false' represent their language-specific counterparts.
d289 3
a291 3
     `OMP_DYNAMIC' environment variable or at runtime using
     `omp_set_dynamic'.  If undefined, dynamic adjustment is disabled
     by default.
d294 1
a294 1
     _Prototype_:  `int omp_get_dynamic(void);'
d297 1
a297 1
     _Interface_:  `logical function omp_get_dynamic()'
d308 1
a308 1
2.6 `omp_get_level' - Obtain the current nesting level
d316 1
a316 1
     _Prototype_:  `int omp_get_level(void);'
d319 1
a319 1
     _Interface_:  `integer function omp_level()'
d330 1
a330 1
2.7 `omp_get_max_active_levels' - Maximum number of active regions
d338 1
a338 1
     _Prototype_:  `int omp_get_max_active_levels(void);'
d341 1
a341 1
     _Interface_:  `integer function omp_get_max_active_levels()'
d352 1
a352 1
2.8 `omp_get_max_task_priority' - Maximum priority value
d361 1
a361 1
     _Prototype_:  `int omp_get_max_task_priority(void);'
d364 1
a364 1
     _Interface_:  `integer function omp_get_max_task_priority()'
d372 1
a372 1
2.9 `omp_get_max_threads' - Maximum number of threads of parallel region
d377 1
a377 1
     region that does not use the clause `num_threads'.
d380 1
a380 1
     _Prototype_:  `int omp_get_max_threads(void);'
d383 1
a383 1
     _Interface_:  `integer function omp_get_max_threads()'
d395 1
a395 1
2.10 `omp_get_nested' - Nested parallel regions
d399 2
a400 2
     This function returns `true' if nested parallel regions are
     enabled, `false' otherwise.  Here, `true' and `false' represent
d404 2
a405 2
     `OMP_NESTED' environment variable or at runtime using
     `omp_set_nested'.  If undefined, nested parallel regions are
d409 1
a409 1
     _Prototype_:  `int omp_get_nested(void);'
d412 1
a412 1
     _Interface_:  `logical function omp_get_nested()'
d423 1
a423 1
2.11 `omp_get_num_devices' - Number of target devices
d430 1
a430 1
     _Prototype_:  `int omp_get_num_devices(void);'
d433 1
a433 1
     _Interface_:  `integer function omp_get_num_devices()'
d441 1
a441 1
2.12 `omp_get_num_procs' - Number of processors online
d448 1
a448 1
     _Prototype_:  `int omp_get_num_procs(void);'
d451 1
a451 1
     _Interface_:  `integer function omp_get_num_procs()'
d459 1
a459 1
2.13 `omp_get_num_teams' - Number of teams
d466 1
a466 1
     _Prototype_:  `int omp_get_num_teams(void);'
d469 1
a469 1
     _Interface_:  `integer function omp_get_num_teams()'
d477 1
a477 1
2.14 `omp_get_num_threads' - Size of the active team
d481 2
a482 2
     Returns the number of threads in the current team.  In a
     sequential section of the program `omp_get_num_threads' returns 1.
d485 5
a489 5
     `OMP_NUM_THREADS' environment variable.  At runtime, the size of
     the current team may be set either by the `NUM_THREADS' clause or
     by `omp_set_num_threads'.  If none of the above were used to
     define a specific value and `OMP_DYNAMIC' is disabled, one thread
     per CPU online is used.
d492 1
a492 1
     _Prototype_:  `int omp_get_num_threads(void);'
d495 1
a495 1
     _Interface_:  `integer function omp_get_num_threads()'
d507 1
a507 1
2.15 `omp_get_proc_bind' - Whether theads may be moved between CPUs
d511 5
a515 5
     This functions returns the currently active thread affinity
     policy, which is set via `OMP_PROC_BIND'.  Possible values are
     `omp_proc_bind_false', `omp_proc_bind_true',
     `omp_proc_bind_master', `omp_proc_bind_close' and
     `omp_proc_bind_spread'.
d518 1
a518 1
     _Prototype_:  `omp_proc_bind_t omp_get_proc_bind(void);'
d521 2
a522 2
     _Interface_:  `integer(kind=omp_proc_bind_kind) function
                   omp_get_proc_bind()'
d534 1
a534 1
2.16 `omp_get_schedule' - Obtain the runtime scheduling method
d539 2
a540 2
     set to the value `omp_sched_static', `omp_sched_dynamic',
     `omp_sched_guided' or `omp_sched_auto'.  The second argument,
d544 2
a545 2
     _Prototype_:  `void omp_get_schedule(omp_sched_t *kind, int
                   *chunk_size);'
d548 3
a550 3
     _Interface_:  `subroutine omp_get_schedule(kind, chunk_size)'
                   `integer(kind=omp_sched_kind) kind'
                   `integer chunk_size'
d561 1
a561 1
2.17 `omp_get_team_num' - Get team number
d568 1
a568 1
     _Prototype_:  `int omp_get_team_num(void);'
d571 1
a571 1
     _Interface_:  `integer function omp_get_team_num()'
d579 1
a579 1
2.18 `omp_get_team_size' - Number of threads in a team
d585 3
a587 3
     values of LEVEL outside zero to `omp_get_level', -1 is returned;
     if LEVEL is zero, 1 is returned, and for `omp_get_level', the
     result is identical to `omp_get_num_threads'.
d590 1
a590 1
     _Prototype_:  `int omp_get_team_size(int level);'
d593 2
a594 2
     _Interface_:  `integer function omp_get_team_size(level)'
                   `integer level'
d606 1
a606 1
2.19 `omp_get_thread_limit' - Maximum number of threads
d613 1
a613 1
     _Prototype_:  `int omp_get_thread_limit(void);'
d616 1
a616 1
     _Interface_:  `integer function omp_get_thread_limit()'
d627 1
a627 1
2.20 `omp_get_thread_num' - Current thread ID
d632 4
a635 4
     team.  In a sequential parts of the program, `omp_get_thread_num'
     always returns 0.  In parallel regions the return value varies
     from 0 to `omp_get_num_threads'-1 inclusive.  The return value of
     the master thread of a team is always 0.
d638 1
a638 1
     _Prototype_:  `int omp_get_thread_num(void);'
d641 1
a641 1
     _Interface_:  `integer function omp_get_thread_num()'
d652 1
a652 1
2.21 `omp_in_parallel' - Whether a parallel region is active
d656 2
a657 2
     This function returns `true' if currently running in parallel,
     `false' otherwise.  Here, `true' and `false' represent their
d661 1
a661 1
     _Prototype_:  `int omp_in_parallel(void);'
d664 1
a664 1
     _Interface_:  `logical function omp_in_parallel()'
d672 1
a672 1
2.22 `omp_in_final' - Whether in final or included task region
d676 2
a677 2
     This function returns `true' if currently running in a final or
     included task region, `false' otherwise.  Here, `true' and `false'
d681 1
a681 1
     _Prototype_:  `int omp_in_final(void);'
d684 1
a684 1
     _Interface_:  `logical function omp_in_final()'
d692 1
a692 1
2.23 `omp_is_initial_device' - Whether executing on the host device
d696 2
a697 2
     This function returns `true' if currently running on the host
     device, `false' otherwise.  Here, `true' and `false' represent
d701 1
a701 1
     _Prototype_:  `int omp_is_initial_device(void);'
d704 1
a704 1
     _Interface_:  `logical function omp_is_initial_device()'
d712 1
a712 1
2.24 `omp_set_default_device' - Set the default device for target regions
d720 1
a720 1
     _Prototype_:  `void omp_set_default_device(int device_num);'
d723 2
a724 2
     _Interface_:  `subroutine omp_set_default_device(device_num)'
                   `integer device_num'
d735 1
a735 1
2.25 `omp_set_dynamic' - Enable/disable dynamic teams
d741 2
a742 2
     of `true' and `false', where `true' enables dynamic adjustment of
     team sizes and `false' disables it.
d745 1
a745 1
     _Prototype_:  `void omp_set_dynamic(int dynamic_threads);'
d748 2
a749 2
     _Interface_:  `subroutine omp_set_dynamic(dynamic_threads)'
                   `logical, intent(in) :: dynamic_threads'
d760 1
a760 1
2.26 `omp_set_max_active_levels' - Limits the number of active parallel regions
d768 1
a768 1
     _Prototype_:  `void omp_set_max_active_levels(int max_levels);'
d771 2
a772 2
     _Interface_:  `subroutine omp_set_max_active_levels(max_levels)'
                   `integer max_levels'
d783 1
a783 1
2.27 `omp_set_nested' - Enable/disable nested parallel regions
d789 2
a790 2
     language-specific equivalent of `true' and `false', where `true'
     enables dynamic adjustment of team sizes and `false' disables it.
d793 1
a793 1
     _Prototype_:  `void omp_set_nested(int nested);'
d796 2
a797 2
     _Interface_:  `subroutine omp_set_nested(nested)'
                   `logical, intent(in) :: nested'
d808 1
a808 1
2.28 `omp_set_num_threads' - Set upper team size limit
d813 2
a814 2
     parallel sections, if those do not specify a `num_threads' clause.
     The argument of `omp_set_num_threads' shall be a positive integer.
d817 1
a817 1
     _Prototype_:  `void omp_set_num_threads(int num_threads);'
d820 2
a821 2
     _Interface_:  `subroutine omp_set_num_threads(num_threads)'
                   `integer, intent(in) :: num_threads'
d833 1
a833 1
2.29 `omp_set_schedule' - Set the runtime scheduling method
d838 2
a839 2
     value `omp_sched_static', `omp_sched_dynamic', `omp_sched_guided'
     or `omp_sched_auto'.  Except for `omp_sched_auto', the chunk size
d841 1
a841 1
     value if zero or negative.  For `omp_sched_auto' the CHUNK_SIZE
d845 2
a846 2
     _Prototype_:  `void omp_set_schedule(omp_sched_t kind, int
                   chunk_size);'
d849 3
a851 3
     _Interface_:  `subroutine omp_set_schedule(kind, chunk_size)'
                   `integer(kind=omp_sched_kind) kind'
                   `integer chunk_size'
d862 1
a862 1
2.30 `omp_init_lock' - Initialize simple lock
d870 1
a870 1
     _Prototype_:  `void omp_init_lock(omp_lock_t *lock);'
d873 2
a874 2
     _Interface_:  `subroutine omp_init_lock(svar)'
                   `integer(omp_lock_kind), intent(out) :: svar'
d885 1
a885 1
2.31 `omp_set_lock' - Wait for and set simple lock
d889 4
a892 4
     Before setting a simple lock, the lock variable must be
     initialized by `omp_init_lock'.  The calling thread is blocked
     until the lock is available.  If the lock is already held by the
     current thread, a deadlock occurs.
d895 1
a895 1
     _Prototype_:  `void omp_set_lock(omp_lock_t *lock);'
d898 2
a899 2
     _Interface_:  `subroutine omp_set_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d911 1
a911 1
2.32 `omp_test_lock' - Test and set simple lock if available
d915 5
a919 5
     Before setting a simple lock, the lock variable must be
     initialized by `omp_init_lock'.  Contrary to `omp_set_lock',
     `omp_test_lock' does not block if the lock is not available.  This
     function returns `true' upon success, `false' otherwise.  Here,
     `true' and `false' represent their language-specific counterparts.
d922 1
a922 1
     _Prototype_:  `int omp_test_lock(omp_lock_t *lock);'
d925 2
a926 2
     _Interface_:  `logical function omp_test_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d937 1
a937 1
2.33 `omp_unset_lock' - Unset simple lock
d942 4
a945 4
     `omp_set_lock' or `omp_test_lock' before.  In addition, the lock
     must be held by the thread calling `omp_unset_lock'.  Then, the
     lock becomes unlocked.  If one or more threads attempted to set
     the lock before, one of them is chosen to, again, set the lock to
d949 1
a949 1
     _Prototype_:  `void omp_unset_lock(omp_lock_t *lock);'
d952 2
a953 2
     _Interface_:  `subroutine omp_unset_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d964 1
a964 1
2.34 `omp_destroy_lock' - Destroy simple lock
d972 1
a972 1
     _Prototype_:  `void omp_destroy_lock(omp_lock_t *lock);'
d975 2
a976 2
     _Interface_:  `subroutine omp_destroy_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d987 1
a987 1
2.35 `omp_init_nest_lock' - Initialize nested lock
d995 1
a995 1
     _Prototype_:  `void omp_init_nest_lock(omp_nest_lock_t *lock);'
d998 2
a999 2
     _Interface_:  `subroutine omp_init_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(out) :: nvar'
d1010 1
a1010 1
2.36 `omp_set_nest_lock' - Wait for and set nested lock
d1014 4
a1017 5
     Before setting a nested lock, the lock variable must be
     initialized by `omp_init_nest_lock'.  The calling thread is
     blocked until the lock is available.  If the lock is already held
     by the current thread, the nesting count for the lock is
     incremented.
d1020 1
a1020 1
     _Prototype_:  `void omp_set_nest_lock(omp_nest_lock_t *lock);'
d1023 2
a1024 2
     _Interface_:  `subroutine omp_set_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1035 1
a1035 1
2.37 `omp_test_nest_lock' - Test and set nested lock if available
d1039 5
a1043 6
     Before setting a nested lock, the lock variable must be
     initialized by `omp_init_nest_lock'.  Contrary to
     `omp_set_nest_lock', `omp_test_nest_lock' does not block if the
     lock is not available.  If the lock is already held by the current
     thread, the new nesting count is returned.  Otherwise, the return
     value equals zero.
d1046 1
a1046 1
     _Prototype_:  `int omp_test_nest_lock(omp_nest_lock_t *lock);'
d1049 2
a1050 2
     _Interface_:  `logical function omp_test_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1061 1
a1061 1
2.38 `omp_unset_nest_lock' - Unset nested lock
d1066 1
a1066 1
     `omp_set_nested_lock' or `omp_test_nested_lock' before.  In
d1068 1
a1068 1
     `omp_unset_nested_lock'.  If the nesting count drops to zero, the
d1074 1
a1074 1
     _Prototype_:  `void omp_unset_nest_lock(omp_nest_lock_t *lock);'
d1077 2
a1078 2
     _Interface_:  `subroutine omp_unset_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1089 1
a1089 1
2.39 `omp_destroy_nest_lock' - Destroy nested lock
d1098 1
a1098 1
     _Prototype_:  `void omp_destroy_nest_lock(omp_nest_lock_t *);'
d1101 2
a1102 2
     _Interface_:  `subroutine omp_destroy_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1113 1
a1113 1
2.40 `omp_get_wtick' - Get timer precision
d1121 1
a1121 1
     _Prototype_:  `double omp_get_wtick(void);'
d1124 1
a1124 1
     _Interface_:  `double precision function omp_get_wtick()'
d1135 1
a1135 1
2.41 `omp_get_wtime' - Elapsed wall clock time
d1146 1
a1146 1
     _Prototype_:  `double omp_get_wtime(void);'
d1149 1
a1149 1
     _Interface_:  `double precision function omp_get_wtime()'
d1163 1
a1163 1
The environment variables which beginning with `OMP_' are defined by
d1165 1
a1165 1
beginning with `GOMP_' are GNU extensions.
d1192 1
a1192 1
3.1 `OMP_CANCELLATION' - Set whether cancellation is activated
d1196 3
a1198 3
     If set to `TRUE', the cancellation is activated.  If set to
     `FALSE' or if unset, cancellation is disabled and the `cancel'
     construct is ignored.
d1209 1
a1209 1
3.2 `OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
d1213 1
a1213 1
     If set to `TRUE', the OpenMP version number and the values
d1215 1
a1215 1
     `stderr'.  If set to `VERBOSE', it additionally shows the value of
d1217 1
a1217 1
     or set to `FALSE', this information will not be shown.
d1225 1
a1225 1
3.3 `OMP_DEFAULT_DEVICE' - Set the device used in target regions
d1229 5
a1233 5
     Set to choose the device which is used in a `target' region,
     unless the value is overridden by `omp_set_default_device' or by a
     `device' clause.  The value shall be the nonnegative device
     number. If no device with the given device number exists, the code
     is executed on the host.  If unset, device number 0 will be used.
d1244 1
a1244 1
3.4 `OMP_DYNAMIC' - Dynamic adjustment of threads
d1250 2
a1251 2
     `TRUE' or `FALSE'.  If undefined, dynamic adjustment is disabled
     by default.
d1262 1
a1262 1
3.5 `OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1279 1
a1279 1
3.6 `OMP_MAX_TASK_PRIORITY' - Set the maximum priority
d1282 1
a1282 1
number that can be set for a task.  
d1284 2
a1285 2
     Specifies the initial value for the maximum priority value that
     can be set for a task.  The value of this variable shall be a
d1298 1
a1298 1
3.7 `OMP_NESTED' - Nested parallel regions
d1304 1
a1304 1
     environment variable shall be `TRUE' or `FALSE'.  If undefined,
d1316 1
a1316 1
3.8 `OMP_NUM_THREADS' - Specifies the number of threads to use
d1320 5
a1324 5
     Specifies the default number of threads to use in parallel
     regions.  The value of this variable shall be a comma-separated
     list of positive integers; the value specified the number of
     threads to use for the corresponding nested level.  If undefined
     one thread per CPU is used.
d1335 1
a1335 1
3.9 `OMP_PROC_BIND' - Whether theads may be moved between CPUs
d1340 1
a1340 1
     to `TRUE', OpenMP theads should not be moved; if set to `FALSE'
d1342 1
a1342 1
     values `MASTER', `CLOSE' and `SPREAD' can be used to specify the
d1344 3
a1346 3
     `MASTER' the worker threads are in the same place partition as the
     master thread.  With `CLOSE' those are kept close to the master
     thread in contiguous place partitions.  And with `SPREAD' a sparse
d1349 2
a1350 2
     When undefined, `OMP_PROC_BIND' defaults to `TRUE' when
     `OMP_PLACES' or `GOMP_CPU_AFFINITY' is set and `FALSE' otherwise.
d1362 1
a1362 1
3.10 `OMP_PLACES' - Specifies on which CPUs the theads should be placed
d1366 3
a1368 3
     The thread placement can be either specified using an abstract
     name or by an explicit list of the places.  The abstract names
     `threads', `cores' and `sockets' can be optionally followed by a
d1370 3
a1372 3
     shall be created.  With `threads' each place corresponds to a
     single hardware thread; `cores' to a single core with the
     corresponding number of hardware threads; and with `sockets' the
d1374 1
a1374 1
     be shown by setting the `OMP_DISPLAY_ENV' environment variable.
d1387 2
a1388 2
     specifies the same places list: `"{0,1,2}, {3,4,6}, {7,8,9},
     {10,11,12}"'; `"{0:3}, {3:3}, {7:3}, {10:3}"'; and `"{0:2}:4:3"'.
d1390 2
a1391 2
     If `OMP_PLACES' and `GOMP_CPU_AFFINITY' are unset and
     `OMP_PROC_BIND' is either unset or `false', threads may be moved
d1404 1
a1404 1
3.11 `OMP_STACKSIZE' - Set default thread stack size
d1409 7
a1415 7
     is suffixed by `B', `K', `M' or `G', in which case the size is,
     respectively, in bytes, kilobytes, megabytes or gigabytes.  This
     is different from `pthread_attr_setstacksize' which gets the
     number of bytes as an argument.  If the stack size cannot be set
     due to system constraints, an error is reported and the initial
     stack size is left unchanged.  If undefined, the stack size is
     system dependent.
d1423 1
a1423 1
3.12 `OMP_SCHEDULE' - How threads are scheduled
d1427 5
a1431 5
     Allows to specify `schedule type' and `chunk size'.  The value of
     the variable shall have the form: `type[,chunk]' where `type' is
     one of `static', `dynamic', `guided' or `auto' The optional
     `chunk' size shall be a positive integer.  If undefined, dynamic
     scheduling and a chunk size of 1 is used.
d1443 1
a1443 1
3.13 `OMP_THREAD_LIMIT' - Set the maximum number of threads
d1460 1
a1460 1
3.14 `OMP_WAIT_POLICY' - How waiting threads are handled
d1465 2
a1466 2
     the value is `PASSIVE', waiting threads should not consume CPU
     power while waiting; while the value is `ACTIVE' specifies that
d1479 1
a1479 1
3.15 `GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d1487 2
a1488 2
     (M-N:S).  CPU numbers are zero based.  For example,
     `GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
d1492 1
a1492 1
     beginning of the list.  `GOMP_CPU_AFFINITY=0' binds all threads to
d1497 10
a1506 10
     language-specific library functions, e.g., `getenv' in C or
     `GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
     setting of the `GOMP_CPU_AFFINITY' environment variable.  A
     defined CPU affinity on startup cannot be changed or disabled
     during the runtime of the application.

     If both `GOMP_CPU_AFFINITY' and `OMP_PROC_BIND' are set,
     `OMP_PROC_BIND' has a higher precedence.  If neither has been set
     and `OMP_PROC_BIND' is unset, or when `OMP_PROC_BIND' is set to
     `FALSE', the host system will handle the assignment of threads to
d1515 1
a1515 1
3.16 `GOMP_DEBUG' - Enable debugging output
d1519 2
a1520 2
     Enable debugging output.  The variable should be set to `0'
     (disabled, also the default if not set), or `1' (enabled).
d1529 1
a1529 1
3.17 `GOMP_STACKSIZE' - Set default thread stack size
d1534 1
a1534 1
     from `pthread_attr_setstacksize' which gets the number of bytes as
d1551 1
a1551 1
3.18 `GOMP_SPINCOUNT' - Set the busy-wait spin count
d1557 1
a1557 1
     value may be either `INFINITE', `INFINITY' to always wait actively
d1560 8
a1567 9
     suffixes acting as multiplication factors: `k' (kilo, thousand),
     `M' (mega, million), `G' (giga, billion), or `T' (tera, trillion).
     If undefined, 0 is used when `OMP_WAIT_POLICY' is `PASSIVE',
     300,000 is used when `OMP_WAIT_POLICY' is undefined and 30 billion
     is used when `OMP_WAIT_POLICY' is `ACTIVE'.  If there are more
     OpenMP threads than available CPUs, 1000 and 100 spins are used
     for `OMP_WAIT_POLICY' being `ACTIVE' or undefined, respectively;
     unless the `GOMP_SPINCOUNT' is lower or `OMP_WAIT_POLICY' is
     `PASSIVE'.
d1575 1
a1575 1
3.19 `GOMP_RTEMS_THREAD_POOLS' - Set the RTEMS specific thread pools
d1581 4
a1584 4
     thread pools.  The format for `GOMP_RTEMS_THREAD_POOLS' is a list
     of optional `<thread-pool-count>[$<priority>]@@<scheduler-name>'
     configurations separated by `:' where:
        * `<thread-pool-count>' is the thread pool count for this
d1586 2
a1587 3

        * `$<priority>' is an optional priority for the worker threads
          of a thread pool according to `pthread_setschedparam'.  In
d1593 1
a1593 2

        * `@@<scheduler-name>' is the scheduler instance name according
d1596 4
a1599 5
     instance, then each OpenMP master thread of this scheduler
     instance will use its own dynamically allocated thread pool.  To
     limit the worker thread count of the thread pools, each OpenMP
     master thread must call `omp_set_num_threads'.

d1601 2
a1602 2
     Lets suppose we have three scheduler instances `IO', `WRK0', and
     `WRK1' with `GOMP_RTEMS_THREAD_POOLS' set to `"1@@WRK0:3$4@@WRK1"'.
d1604 1
a1604 1
     `IO'.  In the scheduler instance `WRK0' there is one thread pool
d1607 3
a1609 3
     master thread that created it.  In the scheduler instance `WRK1'
     there are three thread pools available and their worker threads
     run at priority four.
d1618 4
a1621 4
compile-time flag `-fopenacc' must be specified.  This enables the
OpenACC directive `#pragma acc' in C/C++ and `!$accp' directives in
free form, `c$acc', `*$acc' and `!$acc' directives in fixed form, `!$'
conditional compilation sentinels in free form and `c$', `*$' and `!$'
d1631 2
a1632 2
future versions of GCC.  See `https://gcc.gnu.org/wiki/OpenACC' for
more information.
d1642 3
a1644 3
throw exceptions.  Generally, they are available only for the host,
with the exception of `acc_on_device', which is available for both the
host and the acceleration device.
d1707 1
a1707 1
5.1 `acc_get_num_devices' - Get number of devices for given device type
d1715 1
a1715 1
     _Prototype_:  `int acc_get_num_devices(acc_device_t devicetype);'
d1718 2
a1719 2
     _Interface_:  `integer function acc_get_num_devices(devicetype)'
                   `integer(kind=acc_device_kind) devicetype'
d1728 1
a1728 1
5.2 `acc_set_device_type' - Set type of device accelerator to use.
d1737 1
a1737 1
     _Prototype_:  `acc_set_device_type(acc_device_t devicetype);'
d1740 2
a1741 2
     _Interface_:  `subroutine acc_set_device_type(devicetype)'
                   `integer(kind=acc_device_kind) devicetype'
d1750 1
a1750 1
5.3 `acc_get_device_type' - Get type of device accelerator to be used.
d1758 1
a1758 1
     _Prototype_:  `acc_device_t acc_get_device_type(void);'
d1761 2
a1762 2
     _Interface_:  `function acc_get_device_type(void)'
                   `integer(kind=acc_device_kind) acc_get_device_type'
d1771 1
a1771 1
5.4 `acc_set_device_num' - Set device number to use.
d1780 1
a1780 2
     _Prototype_:  `acc_set_device_num(int num, acc_device_t
                   devicetype);'
d1783 3
a1785 3
     _Interface_:  `subroutine acc_set_device_num(devicenum, devicetype)'
                   `integer devicenum'
                   `integer(kind=acc_device_kind) devicetype'
d1794 1
a1794 1
5.5 `acc_get_device_num' - Get device number to be used.
d1803 1
a1803 1
     _Prototype_:  `int acc_get_device_num(acc_device_t devicetype);'
d1806 3
a1808 3
     _Interface_:  `function acc_get_device_num(devicetype)'
                   `integer(kind=acc_device_kind) devicetype'
                   `integer acc_get_device_num'
d1817 1
a1817 1
5.6 `acc_async_test' - Test for completion of a specific asynchronous operation.
d1822 4
a1825 4
     specified in ARG. In C/C++, a non-zero value will be returned to
     indicate the specified asynchronous operation has completed. While
     Fortran will return a `true'. If the asynchrounous operation has
     not completed, C/C++ returns a zero and Fortran returns a `false'.
d1828 1
a1828 1
     _Prototype_:  `int acc_async_test(int arg);'
d1831 3
a1833 3
     _Interface_:  `function acc_async_test(arg)'
                   `integer(kind=acc_handle_kind) arg'
                   `logical acc_async_test'
d1842 1
a1842 1
5.7 `acc_async_test_all' - Tests for completion of all asynchronous operations.
d1848 3
a1850 3
     asynchronous operations have completed. While Fortran will return
     a `true'. If any asynchronous operation has not completed, C/C++
     returns a zero and Fortran returns a `false'.
d1853 1
a1853 1
     _Prototype_:  `int acc_async_test_all(void);'
d1856 2
a1857 2
     _Interface_:  `function acc_async_test()'
                   `logical acc_get_device_num'
d1866 1
a1866 1
5.8 `acc_wait' - Wait for completion of a specific asynchronous operation.
d1874 1
a1874 1
     _Prototype_:  `acc_wait(arg);'
d1877 2
a1878 2
     _Interface_:  `subroutine acc_wait(arg)'
                   `integer(acc_handle_kind) arg'
d1887 1
a1887 1
5.9 `acc_wait_all' - Waits for completion of all asynchronous operations.
d1895 1
a1895 1
     _Prototype_:  `acc_wait_all(void);'
d1898 1
a1898 1
     _Interface_:  `subroutine acc_wait_async()'
d1907 1
a1907 1
5.10 `acc_wait_all_async' - Wait for completion of all asynchronous operations.
d1916 1
a1916 1
     _Prototype_:  `acc_wait_all_async(int async);'
d1919 2
a1920 2
     _Interface_:  `subroutine acc_wait_all_async(async)'
                   `integer(acc_handle_kind) async'
d1929 1
a1929 1
5.11 `acc_wait_async' - Wait for completion of asynchronous operations.
d1937 1
a1937 1
     _Prototype_:  `acc_wait_async(int arg, int async);'
d1940 2
a1941 2
     _Interface_:  `subroutine acc_wait_async(arg, async)'
                   `integer(acc_handle_kind) arg, async'
d1950 1
a1950 1
5.12 `acc_init' - Initialize runtime for a specific device type.
d1954 2
a1955 2
     This function initializes the runtime for the device type
     specified in DEVICETYPE.
d1958 1
a1958 1
     _Prototype_:  `acc_init(acc_device_t devicetype);'
d1961 2
a1962 2
     _Interface_:  `subroutine acc_init(devicetype)'
                   `integer(acc_device_kind) devicetype'
d1971 1
a1971 1
5.13 `acc_shutdown' - Shuts down the runtime for a specific device type.
d1979 1
a1979 1
     _Prototype_:  `acc_shutdown(acc_device_t devicetype);'
d1982 2
a1983 2
     _Interface_:  `subroutine acc_shutdown(devicetype)'
                   `integer(acc_device_kind) devicetype'
d1992 1
a1992 1
5.14 `acc_on_device' - Whether executing on a particular device
d1997 1
a1997 1
     particular device specified in DEVICETYPE. In C/C++ a non-zero
d1999 1
a1999 1
     specified device type.  In Fortran, `true' will be returned. If
d2001 1
a2001 1
     will return a zero, while Fortran will return `false'.
d2004 1
a2004 1
     _Prototype_:  `acc_on_device(acc_device_t devicetype);'
d2007 3
a2009 3
     _Interface_:  `function acc_on_device(devicetype)'
                   `integer(acc_device_kind) devicetype'
                   `logical acc_on_device'
d2018 1
a2018 1
5.15 `acc_malloc' - Allocate device memory.
d2022 1
a2022 1
     This function allocates LEN bytes of device memory. It returns the
d2026 1
a2026 1
     _Prototype_:  `d_void* acc_malloc(size_t len);'
d2035 1
a2035 1
5.16 `acc_free' - Free device memory.
d2039 1
a2039 1
     Free previously allocated device memory at the device address `a'.
d2042 1
a2042 1
     _Prototype_:  `acc_free(d_void *a);'
d2051 1
a2051 1
5.17 `acc_copyin' - Allocate device memory and copy host memory to it.
d2056 1
a2056 1
     maps it to the specified host address in A. The device address of
d2059 3
a2061 3
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies a
     variable or array element and LEN specifies the length in bytes.
d2064 1
a2064 1
     _Prototype_:  `void *acc_copyin(h_void *a, size_t len);'
d2067 5
a2071 5
     _Interface_:  `subroutine acc_copyin(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_copyin(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2080 1
a2080 1
5.18 `acc_present_or_copyin' - If the data is not present on the device, allocate device memory and copy from host memory.
d2085 3
a2087 3
     LEN is present or not. If it is not present, then device memory
     will be allocated and the host memory copied. The device address of
     the newly allocated device memory is returned.
d2089 2
a2090 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2094 2
a2095 2
     _Prototype_:  `void *acc_present_or_copyin(h_void *a, size_t len);'
     _Prototype_:  `void *acc_pcopyin(h_void *a, size_t len);'
d2098 10
a2107 10
     _Interface_:  `subroutine acc_present_or_copyin(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_present_or_copyin(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
     _Interface_:  `subroutine acc_pcopyin(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_pcopyin(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2116 1
a2116 1
5.19 `acc_create' - Allocate device memory and map it to host memory.
d2121 1
a2121 1
     specified by the host address A with a length of LEN bytes. In
d2125 2
a2126 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2130 1
a2130 1
     _Prototype_:  `void *acc_create(h_void *a, size_t len);'
d2133 5
a2137 5
     _Interface_:  `subroutine acc_create(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_create(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2146 1
a2146 1
5.20 `acc_present_or_create' - If the data is not present on the device, allocate device memory and map it to host memory.
d2151 2
a2152 2
     LEN is present or not. If it is not present, then device memory
     will be allocated and mapped to host memory. In C/C++, the device
d2155 2
a2156 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2160 2
a2161 2
     _Prototype_:  `void *acc_present_or_create(h_void *a, size_t len)'
     _Prototype_:  `void *acc_pcreate(h_void *a, size_t len)'
d2164 10
a2173 10
     _Interface_:  `subroutine acc_present_or_create(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_present_or_create(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
     _Interface_:  `subroutine acc_pcreate(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_pcreate(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2182 1
a2182 1
5.21 `acc_copyout' - Copy device memory to host memory.
d2189 2
a2190 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2194 1
a2194 1
     _Prototype_:  `acc_copyout(h_void *a, size_t len);'
d2197 5
a2201 5
     _Interface_:  `subroutine acc_copyout(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_copyout(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2210 1
a2210 1
5.22 `acc_delete' - Free device memory.
d2217 2
a2218 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2222 1
a2222 1
     _Prototype_:  `acc_delete(h_void *a, size_t len);'
d2225 5
a2229 5
     _Interface_:  `subroutine acc_delete(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_delete(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2238 1
a2238 1
5.23 `acc_update_device' - Update device memory from mapped host memory.
d2246 2
a2247 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2251 1
a2251 1
     _Prototype_:  `acc_update_device(h_void *a, size_t len);'
d2254 5
a2258 5
     _Interface_:  `subroutine acc_update_device(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_update_device(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2267 1
a2267 1
5.24 `acc_update_self' - Update host memory from mapped device memory.
d2275 2
a2276 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2280 1
a2280 1
     _Prototype_:  `acc_update_self(h_void *a, size_t len);'
d2283 5
a2287 5
     _Interface_:  `subroutine acc_update_self(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_update_self(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2296 1
a2296 1
5.25 `acc_map_data' - Map previously allocated device memory to host memory.
d2301 1
a2301 1
     The device memory is specified with the device address D. The host
d2305 1
a2305 1
     _Prototype_:  `acc_map_data(h_void *h, d_void *d, size_t len);'
d2314 1
a2314 1
5.26 `acc_unmap_data' - Unmap device memory from host memory.
d2318 1
a2318 1
     This function unmaps previously mapped device and host memory. The
d2322 1
a2322 1
     _Prototype_:  `acc_unmap_data(h_void *h);'
d2331 1
a2331 1
5.27 `acc_deviceptr' - Get device pointer associated with specific host address.
d2339 1
a2339 1
     _Prototype_:  `void *acc_deviceptr(h_void *h);'
d2348 1
a2348 1
5.28 `acc_hostptr' - Get host pointer associated with specific device address.
d2356 1
a2356 1
     _Prototype_:  `void *acc_hostptr(d_void *d);'
d2365 1
a2365 1
5.29 `acc_is_present' - Indicate whether host variable / array is present on device.
d2369 2
a2370 2
     This function indicates whether the specified host address in A
     and a length of LEN bytes is present on the device. In C/C++, a
d2372 1
a2372 1
     memory on the device. A zero is returned to indicate the memory is
d2375 2
a2376 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2378 2
a2379 2
     If the host memory is mapped to device memory, then a `true' is
     returned. Otherwise, a `false' is return to indicate the mapped
d2383 1
a2383 1
     _Prototype_:  `int acc_is_present(h_void *a, size_t len);'
d2386 7
a2392 7
     _Interface_:  `function acc_is_present(a)'
                   `type, dimension(:[,:]...) :: a'
                   `logical acc_is_present'
     _Interface_:  `function acc_is_present(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
                   `logical acc_is_present'
d2401 1
a2401 1
5.30 `acc_memcpy_to_device' - Copy host memory to device memory.
d2410 2
a2411 2
     _Prototype_:  `acc_memcpy_to_device(d_void *dest, h_void *src,
                   size_t bytes);'
d2420 1
a2420 1
5.31 `acc_memcpy_from_device' - Copy device memory to host memory.
d2429 2
a2430 2
     _Prototype_:  `acc_memcpy_from_device(d_void *dest, h_void *src,
                   size_t bytes);'
d2439 1
a2439 1
5.32 `acc_get_current_cuda_device' - Get CUDA device handle.
d2443 1
a2443 1
     This function returns the CUDA device handle. This handle is the
d2447 1
a2447 1
     _Prototype_:  `void *acc_get_current_cuda_device(void);'
d2456 1
a2456 1
5.33 `acc_get_current_cuda_context' - Get CUDA context handle.
d2460 1
a2460 1
     This function returns the CUDA context handle. This handle is the
d2464 1
a2464 1
     _Prototype_:  `acc_get_current_cuda_context(void);'
d2473 1
a2473 1
5.34 `acc_get_cuda_stream' - Get CUDA stream handle.
d2477 1
a2477 1
     This function returns the CUDA stream handle. This handle is the
d2481 1
a2481 1
     _Prototype_:  `acc_get_cuda_stream(void);'
d2490 1
a2490 1
5.35 `acc_set_cuda_stream' - Set CUDA stream handle.
d2498 1
a2498 1
     _Prototype_:  `acc_set_cuda_stream(int async void *stream);'
d2510 1
a2510 1
The variables `ACC_DEVICE_TYPE' and `ACC_DEVICE_NUM' are defined by
d2512 1
a2512 1
`GCC_ACC_NOTIFY' is used for diagnostic purposes.
d2523 1
a2523 1
6.1 `ACC_DEVICE_TYPE'
d2532 1
a2532 1
6.2 `ACC_DEVICE_NUM'
d2541 1
a2541 1
6.3 `GCC_ACC_NOTIFY'
d2553 1
a2553 1
This applies to the `nvptx' plugin only.
d2562 4
a2565 4
`async' and `wait' clauses.  When the `async' clause is first used with
a directive, it creates a CUDA stream.  If an `async-argument' is used
with the `async' clause, then the stream is associated with the
specified `async-argument'.
d2568 2
a2569 2
the `async-argument' of an `async' clause, both the `wait' clause and
the `wait' directive can be used.  When either the clause or directive
d2572 1
a2572 1
`async-argument', that is, stream, have completed.
d2575 2
a2576 2
of using the `async' clause, is done without any intervention by the
caller.  This implies the association between the `async-argument' and
d2579 5
a2583 5
function `acc_set_cuda_stream'.  When the function
`acc_set_cuda_stream' is called, the CUDA stream that was originally
associated with the `async' clause will be destroyed.  Caution should
be taken when changing the association as subsequent references to the
`async-argument' refer to a different CUDA stream.
d2600 4
a2603 4
programs that use the Runtime library directly, or another library
based on the Runtime library, e.g., CUBLAS(1).  This chapter describes
the use cases and what changes are required in order to use both the
OpenACC library and the CUBLAS and Runtime libraries within a program.
d2609 2
a2610 2
called prior to any of the functions in the OpenACC library. More
specifically, the function `cublasCreate()'.
d2615 5
a2619 5
returned to the caller. The OpenACC library also requires
initialization and allocation of hardware resources. Since the CUBLAS
library has already allocated the hardware resources for the device,
all that is left to do is to initialize the OpenACC library and acquire
the hardware resources on the host.
d2622 10
a2631 10
and allocate the host hardware resources, you need to acquire the
device number that was allocated during the call to `cublasCreate()'.
The invoking of the runtime library function `cudaGetDevice()'
accomplishes this. Once acquired, the device number is passed along
with the device type as parameters to the OpenACC library function
`acc_set_device_num()'.

   Once the call to `acc_set_device_num()' has completed, the OpenACC
library uses the  context that was created during the call to
`cublasCreate()'. In other words, both libraries will be sharing the
d2652 2
a2653 1
                                 Use Case 1
d2659 2
a2660 2
is called prior to any of the functions in the CUBLAS library. More
specificially, the function `acc_set_device_num()'.
d2662 1
a2662 1
   In the use case presented here, the function `acc_set_device_num()'
d2664 3
a2666 3
resources on the host and the device. In the call to the function, the
call parameters specify which device to use and what device type to
use, i.e., `acc_device_nvidia'. It should be noted that this is but one
d2668 1
a2668 1
hardware resources. Other methods are available through the use of
d2671 1
a2671 1
   Once the call to `acc_set_device_num()' has completed, other OpenACC
d2673 4
a2676 4
`acc_copyin()'. In addition, calls can be made to functions in the
CUBLAS library. In the use case a call to `cublasCreate()' is made
subsequent to the calls to `acc_copyin()'.  As seen in the previous use
case, a call to `cublasCreate()' initializes the CUBLAS library and
d2678 1
a2678 1
since the device has already been allocated, `cublasCreate()' will only
d2680 1
a2680 1
resources on the host. The context that was created as part of the
d2722 2
a2723 1
                                 Use Case 2
d2730 1
a2730 1
`ACC_DEVICE_TYPE' and `ACC_DEVICE_NUM', respecively. These two
d2732 2
a2733 2
`acc_set_device_num()'. As seen in the second use case, the device type
and device number were specified using `acc_set_device_num()'.  If
d2735 1
a2735 1
call to `acc_set_device_num()' would not be required.
d2737 4
a2740 4
   The use of the environment variables is only relevant when an
OpenACC function is called prior to a call to `cudaCreate()'. If
`cudaCreate()' is called prior to a call to an OpenACC function, then
you must call `acc_set_device_num()'(2)
d2746 2
a2747 2
Interoperability", in "CUDA Driver API", TRM-06703-001, Version 5.5,
for additional information on library interoperability.
d2749 2
a2750 2
   (2) More complete information about `ACC_DEVICE_TYPE' and
`ACC_DEVICE_NUM' can be found in sections 4.1 and 4.2 of the OpenACC
d2760 2
a2761 2
The following sections present notes on the external ABI as presented
by libgomp.  Only maintainers should need them.
d2822 1
a2822 1
The target should implement the `__sync' builtins.
d2838 1
a2838 1
Expands to the `__sync_synchronize' builtin.
d2854 4
a2857 4
In _most_ cases we can map this directly to `__thread'.  Except that
OMP allows constructors for C++ objects.  We can either refuse to
support this (how often is it used?) or we can implement something akin
to .ctors.
d2889 2
a2890 2
   It is not clear what to do with bare FOR or SECTION blocks.  The
only thing I can figure is that we do something like:
d2908 2
a2909 2
for the two variables, i.e. not something you could write directly in
C.  Presumably this only makes sense if the "outer" x and y are global
d2922 4
a2925 4
pointer to an array of the type of the variable, indexed by the
thread's TEAM_ID.  The thread stores its final value into the array,
and after the barrier, the master thread iterates over the array to
collect the values.
d2962 3
a2964 3
   The function needs to create the appropriate number of threads
and/or launch them from the dock.  It needs to create the team
structure and assign team ids.
d2969 1
a2969 1
`omp_in_parallel()' state.
d3021 2
a3022 2
also pull it into a local variable if we like, but since its supposed
to remain unchanged, we can also not if we like.
d3024 5
a3028 5
   If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be
able to get away with no work-sharing context at all, since we can
simply perform the arithmetic directly in each thread to divide up the
iterations.  Which would mean that we wouldn't need to call any of
these routines.
d3130 2
a3131 2
"openacc", or "openmp", or both to the keywords field in the bug
report, as appropriate.
d3141 1
a3141 1
     Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/'
d3169 3
a3171 3
these rights or asking you to surrender the rights.  Therefore, you
have certain responsibilities if you distribute copies of the software,
or if you modify it: responsibilities to respect the freedom of others.
d3190 9
a3198 10
modified versions of the software inside them, although the
manufacturer can do so.  This is fundamentally incompatible with the
aim of protecting users' freedom to change the software.  The
systematic pattern of such abuse occurs in the area of products for
individuals to use, which is precisely where it is most unacceptable.
Therefore, we have designed this version of the GPL to prohibit the
practice for those products.  If such problems arise substantially in
other domains, we stand ready to extend this provision to those domains
in future versions of the GPL, as needed to protect the freedom of
users.
d3235 2
a3236 2
     infringement under applicable copyright law, except executing it
     on a computer or modifying a private copy.  Propagation includes
d3250 2
a3251 2
     the extent that warranties are provided), that licensees may
     convey the work under this License, and how to view a copy of this
d3259 2
a3260 2
     for making modifications to it.  "Object code" means any
     non-source form of a work.
d3271 4
a3274 4
     Major Component, and (b) serves only to enable use of the work
     with that Major Component, or to implement a Standard Interface
     for which an implementation is available to the public in source
     code form.  A "Major Component", in this context, means a major
d3282 3
a3284 3
     work) run the object code and to modify the work, including
     scripts to control those activities.  However, it does not include
     the work's System Libraries, or general-purpose tools or generally
d3287 4
a3290 4
     Corresponding Source includes interface definition files
     associated with source files for the work, and the source code for
     shared libraries and dynamically linked subprograms that the work
     is specifically designed to require, such as by intimate data
d3307 4
a3310 4
     a covered work is covered by this License only if the output,
     given its content, constitutes a covered work.  This License
     acknowledges your rights of fair use or other equivalent, as
     provided by copyright law.
d3315 8
a3322 8
     sole purpose of having them make modifications exclusively for
     you, or provide you with facilities for running those works,
     provided that you comply with the terms of this License in
     conveying all material for which you do not control copyright.
     Those thus making or running the covered works for you must do so
     exclusively on your behalf, under your direction and control, on
     terms that prohibit them from making any copies of your
     copyrighted material outside their relationship with you.
d3339 2
a3340 2
     with respect to the covered work, and you disclaim any intention
     to limit operation or modification of the work as a means of
d3410 2
a3411 2
          written offer, valid for at least three years and valid for
          as long as you offer spare parts or customer support for that
d3421 2
a3422 2
       c. Convey individual copies of the object code with a copy of
          the written offer to provide the Corresponding Source.  This
d3428 2
a3429 2
          place (gratis or for a charge), and offer equivalent access
          to the Corresponding Source in the same way through the same
d3433 4
a3436 4
          Corresponding Source may be on a different server (operated
          by you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to
          the object code saying where to find the Corresponding Source.
d3438 2
a3439 2
          remain obligated to ensure that it is available for as long
          as needed to satisfy these requirements.
a3445 1

d3453 2
a3454 2
     incorporation into a dwelling.  In determining whether a product
     is a consumer product, doubtful cases shall be resolved in favor of
d3485 5
a3489 5
     warranty, or updates for a work that has been modified or
     installed by the recipient, or for the User Product in which it
     has been modified or installed.  Access to a network may be denied
     when the modification itself materially and adversely affects the
     operation of the network or violates the rules and protocols for
d3519 2
a3520 2
     holders of that material) supplement the terms of this License
     with terms:
d3530 2
a3531 3
          or requiring that modified versions of such material be
          marked in reasonable ways as different from the original
          version; or
d3550 4
a3553 5
     contains a further restriction but permits relicensing or
     conveying under this License, you may add to a covered work
     material governed by the terms of that license document, provided
     that the further restriction does not survive such relicensing or
     conveying.
d3569 2
a3570 2
     under this License (including any patent licenses granted under
     the third paragraph of section 11).
d3574 2
a3575 2
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
d3587 4
a3590 4
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, you do not qualify to receive new
     licenses for the same material under section 10.
d3604 1
a3604 1
 10. Automatic Licensing of Downstream Recipients.
d3618 4
a3621 4
     could give under the previous paragraph, plus a right to
     possession of the Corresponding Source of the work from the
     predecessor in interest, if the predecessor has it or can get it
     with reasonable efforts.
d3625 6
a3630 6
     may not impose a license fee, royalty, or other charge for
     exercise of rights granted under this License, and you may not
     initiate litigation (including a cross-claim or counterclaim in a
     lawsuit) alleging that any patent claim is infringed by making,
     using, selling, offering for sale, or importing the Program or any
     portion of it.
d3632 1
a3632 1
 11. Patents.
d3652 2
a3653 2
     otherwise run, modify and propagate the contents of its
     contributor version.
d3658 3
a3660 3
     patent or covenant not to sue for patent infringement).  To
     "grant" such a patent license to a party means to make such an
     agreement or commitment not to enforce a patent against the party.
d3690 10
a3699 10
     party that is in the business of distributing software, under
     which you make payment to the third party based on the extent of
     your activity of conveying the work, and under which the third
     party grants, to any of the parties who would receive the covered
     work from you, a discriminatory patent license (a) in connection
     with copies of the covered work conveyed by you (or copies made
     from those copies), or (b) primarily for and in connection with
     specific products or compilations that contain the covered work,
     unless you entered into that arrangement, or that patent license
     was granted, prior to 28 March 2007.
d3705 1
a3705 1
 12. No Surrender of Others' Freedom.
d3707 10
a3716 11
     If conditions are imposed on you (whether by court order,
     agreement or otherwise) that contradict the conditions of this
     License, they do not excuse you from the conditions of this
     License.  If you cannot convey a covered work so as to satisfy
     simultaneously your obligations under this License and any other
     pertinent obligations, then as a consequence you may not convey it
     at all.  For example, if you agree to terms that obligate you to
     collect a royalty for further conveying from those to whom you
     convey the Program, the only way you could satisfy both those
     terms and this License would be to refrain entirely from conveying
     the Program.
d3718 1
a3718 1
 13. Use with the GNU Affero General Public License.
d3729 1
a3729 1
 14. Revised Versions of this License.
d3732 3
a3734 4
     versions of the GNU General Public License from time to time.
     Such new versions will be similar in spirit to the present
     version, but may differ in detail to address new problems or
     concerns.
d3740 4
a3743 4
     that numbered version or of any later version published by the
     Free Software Foundation.  If the Program does not specify a
     version number of the GNU General Public License, you may choose
     any version ever published by the Free Software Foundation.
d3755 1
a3755 1
 15. Disclaimer of Warranty.
d3758 1
a3758 1
     APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE
d3762 1
a3762 1
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE
d3767 1
a3767 1
 16. Limitation of Liability.
d3771 2
a3772 2
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
     FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
d3780 1
a3780 1
 17. Interpretation of Sections 15 and 16.
a3788 1

d3819 1
a3819 1
     along with this program.  If not, see `http://www.gnu.org/licenses/'.
d3828 1
a3828 1
     This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
d3830 1
a3830 1
     under certain conditions; type `show c' for details.
d3832 1
a3832 1
   The hypothetical commands `show w' and `show c' should show the
d3840 1
a3840 1
the GNU GPL, see `http://www.gnu.org/licenses/'.
d3847 1
a3847 1
please read `http://www.gnu.org/philosophy/why-not-lgpl.html'.
d3858 1
a3858 1
     `http://fsf.org/'
d3883 2
a3884 2
     of subject matter or whether it is published as a printed book.
     We recommend this License principally for works whose purpose is
d3890 2
a3891 2
     that contains a notice placed by the copyright holder saying it
     can be distributed under the terms of this License.  Such a notice
d3895 3
a3897 3
     of the public is a licensee, and is addressed as "you".  You
     accept the license if you copy, modify or distribute the work in a
     way requiring permission under copyright law.
d3915 6
a3920 6
     titles are designated, as being those of Invariant Sections, in
     the notice that says that the Document is released under this
     License.  If a section does not fit the above definition of
     Secondary then it is not allowed to be designated as Invariant.
     The Document may contain zero Invariant Sections.  If the Document
     does not identify any Invariant Sections then there are none.
d3931 10
a3940 10
     straightforwardly with generic text editors or (for images
     composed of pixels) generic paint programs or (for drawings) some
     widely available drawing editor, and that is suitable for input to
     text formatters or for automatic translation to a variety of
     formats suitable for input to text formatters.  A copy made in an
     otherwise Transparent file format whose markup, or absence of
     markup, has been arranged to thwart or discourage subsequent
     modification by readers is not Transparent.  An image format is
     not Transparent if used for any substantial amount of text.  A
     copy that is not "Transparent" is called "Opaque".
d3944 8
a3951 8
     SGML or XML using a publicly available DTD, and
     standard-conforming simple HTML, PostScript or PDF designed for
     human modification.  Examples of transparent image formats include
     PNG, XCF and JPG.  Opaque formats include proprietary formats that
     can be read and edited only by proprietary word processors, SGML or
     XML for which the DTD and/or processing tools are not generally
     available, and the machine-generated HTML, PostScript or PDF
     produced by some word processors for output purposes only.
d3989 2
a3990 2
     distribute a large enough number of copies you must also follow
     the conditions in section 3.
d4004 5
a4008 6
     front cover must present the full title with all words of the
     title equally prominent and visible.  You may add other material
     on the covers in addition.  Copying with changes limited to the
     covers, as long as they preserve the title of the Document and
     satisfy these conditions, can be treated as verbatim copying in
     other respects.
d4016 11
a4026 12
     numbering more than 100, you must either include a
     machine-readable Transparent copy along with each Opaque copy, or
     state in or with each Opaque copy a computer-network location from
     which the general network-using public has access to download
     using public-standard network protocols a complete Transparent
     copy of the Document, free of added material.  If you use the
     latter option, you must take reasonably prudent steps, when you
     begin distribution of Opaque copies in quantity, to ensure that
     this Transparent copy will remain thus accessible at the stated
     location until at least one year after the last time you
     distribute an Opaque copy (directly or through your agents or
     retailers) of that edition to the public.
d4029 3
a4031 3
     the Document well before redistributing any large number of
     copies, to give them a chance to provide you with an updated
     version of the Document.
d4037 5
a4041 5
     release the Modified Version under precisely this License, with
     the Modified Version filling the role of the Document, thus
     licensing distribution and modification of the Modified Version to
     whoever possesses a copy of it.  In addition, you must do these
     things in the Modified Version:
d4044 5
a4048 5
          distinct from that of the Document, and from those of
          previous versions (which should, if there were any, be listed
          in the History section of the Document).  You may use the
          same title as a previous version if the original publisher of
          that version gives permission.
d4078 6
a4083 6
          authors, and publisher of the Modified Version as given on
          the Title Page.  If there is no section Entitled "History" in
          the Document, create one stating the title, year, authors,
          and publisher of the Document as given on its Title Page,
          then add an item describing the Modified Version as stated in
          the previous sentence.
d4088 5
a4092 5
          previous versions it was based on.  These may be placed in
          the "History" section.  You may omit a network location for a
          work that was published at least four years before the
          Document itself, or if the original publisher of the version
          it refers to gives permission.
d4095 2
a4096 2
          Preserve the Title of the section, and preserve in the
          section all the substance and tone of each of the contributor
d4099 3
a4101 4
       L. Preserve all the Invariant Sections of the Document,
          unaltered in their text and in their titles.  Section numbers
          or the equivalent are not considered part of the section
          titles.
d4114 5
a4118 5
     material copied from the Document, you may at your option
     designate some or all of these sections as invariant.  To do this,
     add their titles to the list of Invariant Sections in the Modified
     Version's license notice.  These titles must be distinct from any
     other section titles.
d4127 9
a4135 9
     and a passage of up to 25 words as a Back-Cover Text, to the end
     of the list of Cover Texts in the Modified Version.  Only one
     passage of Front-Cover Text and one of Back-Cover Text may be
     added by (or through arrangements made by) any one entity.  If the
     Document already includes a cover text for the same cover,
     previously added by you or by arrangement made by the same entity
     you are acting on behalf of, you may not add another; but you may
     replace the old one, on explicit permission from the previous
     publisher that added the old one.
d4145 2
a4146 2
     modified versions, provided that you include in the combination
     all of the Invariant Sections of all of the original documents,
d4173 2
a4174 2
     rules of this License for verbatim copying of each of the
     documents in all other respects.
d4178 3
a4180 3
     a copy of this License into the extracted document, and follow
     this License in all other respects regarding verbatim copying of
     that document.
d4185 2
a4186 2
     separate and independent documents or works, in or on a volume of
     a storage or distribution medium, is called an "aggregate" if the
d4231 2
a4232 2
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
d4244 4
a4247 4
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, receipt of a copy of some or all of
     the same material does not give you any rights to use it.
d4249 1
a4249 1
 10. FUTURE REVISIONS OF THIS LICENSE
d4255 1
a4255 1
     `http://www.gnu.org/copyleft/'.
d4262 5
a4266 5
     published (not as a draft) by the Free Software Foundation.  If
     the Document does not specify a version number of this License,
     you may choose any version ever published (not as a draft) by the
     Free Software Foundation.  If the Document specifies that a proxy
     can decide which future versions of this License can be used, that
d4270 1
a4270 1
 11. RELICENSING
a4299 1

d4316 1
a4316 1
Texts, replace the "with...Texts." line with this:
d4327 3
a4329 3
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License, to
permit their use in free software.
d4359 2
a4360 2
can greatly alter what fraction of the sales price counts as profit.
If the price you pay is $50, ten percent of the profit is probably less
d4370 2
a4371 2
ports such as adding a new CPU to the GNU Compiler Collection
contribute more; major new features or packages contribute the most.
d4390 19
a4408 1
* Environment Variable <1>:              GOMP_RTEMS_THREAD_POOLS.
a4409 18
* Environment Variable <2>:              GOMP_SPINCOUNT.        (line 6)
* Environment Variable <3>:              GOMP_STACKSIZE.        (line 6)
* Environment Variable <4>:              GOMP_DEBUG.            (line 6)
* Environment Variable <5>:              GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <6>:              OMP_WAIT_POLICY.       (line 6)
* Environment Variable <7>:              OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <8>:              OMP_SCHEDULE.          (line 6)
* Environment Variable <9>:              OMP_STACKSIZE.         (line 6)
* Environment Variable <10>:             OMP_PLACES.            (line 6)
* Environment Variable <11>:             OMP_PROC_BIND.         (line 6)
* Environment Variable <12>:             OMP_NUM_THREADS.       (line 6)
* Environment Variable <13>:             OMP_NESTED.            (line 6)
* Environment Variable <14>:             OMP_MAX_TASK_PRIORITY. (line 6)
* Environment Variable <15>:             OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable <16>:             OMP_DYNAMIC.           (line 6)
* Environment Variable <17>:             OMP_DEFAULT_DEVICE.    (line 6)
* Environment Variable <18>:             OMP_DISPLAY_ENV.       (line 6)
* Environment Variable:                  OMP_CANCELLATION.      (line 6)
d4412 6
a4417 1
* Implementation specific setting <1>:   GOMP_RTEMS_THREAD_POOLS.
a4418 5
* Implementation specific setting <2>:   GOMP_SPINCOUNT.        (line 6)
* Implementation specific setting <3>:   GOMP_STACKSIZE.        (line 6)
* Implementation specific setting <4>:   OMP_SCHEDULE.          (line 6)
* Implementation specific setting <5>:   OMP_NUM_THREADS.       (line 6)
* Implementation specific setting:       OMP_NESTED.            (line 6)
d4424 131
a4554 131
Node: Top2130
Node: Enabling OpenMP4536
Node: Runtime Library Routines5323
Node: omp_get_active_level8386
Node: omp_get_ancestor_thread_num9084
Node: omp_get_cancellation10011
Node: omp_get_default_device10823
Node: omp_get_dynamic11497
Node: omp_get_level12370
Node: omp_get_max_active_levels12988
Node: omp_get_max_task_priority13691
Node: omp_get_max_threads14309
Node: omp_get_nested15064
Node: omp_get_num_devices15976
Node: omp_get_num_procs16495
Node: omp_get_num_teams17032
Node: omp_get_num_threads17546
Node: omp_get_proc_bind18633
Node: omp_get_schedule19551
Node: omp_get_team_num20500
Node: omp_get_team_size20997
Node: omp_get_thread_limit21954
Node: omp_get_thread_num22571
Node: omp_in_parallel23440
Node: omp_in_final24087
Node: omp_is_initial_device24759
Node: omp_set_default_device25450
Node: omp_set_dynamic26238
Node: omp_set_max_active_levels27121
Node: omp_set_nested27895
Node: omp_set_num_threads28784
Node: omp_set_schedule29649
Node: omp_init_lock30725
Node: omp_set_lock31375
Node: omp_test_lock32227
Node: omp_unset_lock33200
Node: omp_destroy_lock34128
Node: omp_init_nest_lock34802
Node: omp_set_nest_lock35534
Node: omp_test_nest_lock36451
Node: omp_unset_nest_lock37481
Node: omp_destroy_nest_lock38493
Node: omp_get_wtick39241
Node: omp_get_wtime39831
Node: Environment Variables40605
Node: OMP_CANCELLATION42160
Node: OMP_DISPLAY_ENV42693
Node: OMP_DEFAULT_DEVICE43396
Node: OMP_DYNAMIC44176
Node: OMP_MAX_ACTIVE_LEVELS44772
Node: OMP_MAX_TASK_PRIORITY45422
Node: OMP_NESTED46082
Node: OMP_NUM_THREADS46687
Node: OMP_PROC_BIND47376
Node: OMP_PLACES48568
Node: OMP_STACKSIZE50745
Node: OMP_SCHEDULE51569
Node: OMP_THREAD_LIMIT52267
Node: OMP_WAIT_POLICY52867
Node: GOMP_CPU_AFFINITY53559
Node: GOMP_DEBUG55290
Node: GOMP_STACKSIZE55797
Node: GOMP_SPINCOUNT56626
Node: GOMP_RTEMS_THREAD_POOLS57835
Node: Enabling OpenACC60016
Node: OpenACC Runtime Library Routines61010
Node: acc_get_num_devices64804
Node: acc_set_device_type65527
Node: acc_get_device_type66288
Node: acc_set_device_num67000
Node: acc_get_device_num67799
Node: acc_async_test68592
Node: acc_async_test_all69577
Node: acc_wait70472
Node: acc_wait_all71104
Node: acc_wait_all_async71681
Node: acc_wait_async72430
Node: acc_init73134
Node: acc_shutdown73777
Node: acc_on_device74442
Node: acc_malloc75440
Node: acc_free75937
Node: acc_copyin76363
Node: acc_present_or_copyin77464
Node: acc_create79074
Node: acc_present_or_create80220
Node: acc_copyout81838
Node: acc_delete82853
Node: acc_update_device83820
Node: acc_update_self84924
Node: acc_map_data86020
Node: acc_unmap_data86703
Node: acc_deviceptr87222
Node: acc_hostptr87791
Node: acc_is_present88354
Node: acc_memcpy_to_device89868
Node: acc_memcpy_from_device90529
Node: acc_get_current_cuda_device91211
Node: acc_get_current_cuda_context91806
Node: acc_get_cuda_stream92398
Node: acc_set_cuda_stream92952
Node: OpenACC Environment Variables93483
Node: ACC_DEVICE_TYPE93942
Node: ACC_DEVICE_NUM94178
Node: GCC_ACC_NOTIFY94435
Node: CUDA Streams Usage94658
Ref: CUDA Streams Usage-Footnote-196558
Node: OpenACC Library Interoperability96667
Ref: OpenACC Library Interoperability-Footnote-1103013
Ref: OpenACC Library Interoperability-Footnote-2103265
Node: The libgomp ABI103473
Node: Implementing MASTER construct104329
Node: Implementing CRITICAL construct104743
Node: Implementing ATOMIC construct105482
Node: Implementing FLUSH construct105963
Node: Implementing BARRIER construct106234
Node: Implementing THREADPRIVATE construct106503
Node: Implementing PRIVATE clause107155
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses107736
Node: Implementing REDUCTION clause109060
Node: Implementing PARALLEL construct109617
Node: Implementing FOR construct110874
Node: Implementing ORDERED construct112872
Node: Implementing SECTIONS construct113178
Node: Implementing SINGLE construct113944
Node: Implementing OpenACC's PARALLEL construct114656
Node: Reporting Bugs114914
Node: Copying115276
Node: GNU Free Documentation License152841
Node: Funding177983
Node: Library Index180508
@


1.8.4.1
log
@Sync with HEAD
@
text
@d2 1
a2 1
/space/rguenther/gcc-7.4.0/gcc-7.4.0/libgomp/libgomp.texi.
d4 1
a4 1
Copyright (C) 2006-2017 Free Software Foundation, Inc.
d37 1
a37 1
   Copyright (C) 2006-2017 Free Software Foundation, Inc.
@


1.8.4.2
log
@Mostly merge changes from HEAD upto 20200411
@
text
@d1 2
a2 2
This is libgomp.info, produced by makeinfo version 6.5 from
libgomp.texi.
d4 1
a4 1
Copyright (C) 2006-2018 Free Software Foundation, Inc.
d21 3
a23 2
software.  Copies published by the Free Software Foundation raise funds
for GNU development.
d37 1
a37 1
   Copyright (C) 2006-2018 Free Software Foundation, Inc.
d54 2
a55 2
software.  Copies published by the Free Software Foundation raise funds
for GNU development.
d63 6
a68 6
This manual documents the usage of libgomp, the GNU Offloading and Multi
Processing Runtime Library.  This includes the GNU implementation of the
OpenMP (http://www.openmp.org) Application Programming Interface (API)
for multi-platform shared-memory parallel programming in C/C++ and
Fortran, and the GNU implementation of the OpenACC
(https://www.openacc.org) Application Programming Interface (API) for
d111 11
a121 10
compile-time flag '-fopenmp' must be specified.  This enables the OpenMP
directive '#pragma omp' in C/C++ and '!$omp' directives in free form,
'c$omp', '*$omp' and '!$omp' directives in fixed form, '!$' conditional
compilation sentinels in free form and 'c$', '*$' and '!$' sentinels in
fixed form, for Fortran.  The flag also arranges for automatic linking
of the OpenMP runtime library (*note Runtime Library Routines::).

   A complete description of all OpenMP directives accepted may be found
in the OpenMP Application Program Interface (http://www.openmp.org)
manual, version 4.5.
d189 1
a189 1
2.1 'omp_get_active_level' - Number of parallel regions
d197 1
a197 1
     _Prototype_:   'int omp_get_active_level(void);'
d200 1
a200 1
     _Interface_:   'integer function omp_get_active_level()'
d212 1
a212 1
2.2 'omp_get_ancestor_thread_num' - Ancestor thread ID
d218 2
a219 2
     outside zero to 'omp_get_level' -1 is returned; if LEVEL is
     'omp_get_level' the result is identical to 'omp_get_thread_num'.
d222 1
a222 1
     _Prototype_:   'int omp_get_ancestor_thread_num(int level);'
d225 2
a226 2
     _Interface_:   'integer function omp_get_ancestor_thread_num(level)'
                    'integer level'
d238 1
a238 1
2.3 'omp_get_cancellation' - Whether cancellation support is enabled
d242 3
a244 3
     This function returns 'true' if cancellation is activated, 'false'
     otherwise.  Here, 'true' and 'false' represent their
     language-specific counterparts.  Unless 'OMP_CANCELLATION' is set
d248 1
a248 1
     _Prototype_:   'int omp_get_cancellation(void);'
d251 1
a251 1
     _Interface_:   'logical function omp_get_cancellation()'
d262 1
a262 1
2.4 'omp_get_default_device' - Get the default device for target regions
d269 1
a269 1
     _Prototype_:   'int omp_get_default_device(void);'
d272 1
a272 1
     _Interface_:   'integer function omp_get_default_device()'
d283 1
a283 1
2.5 'omp_get_dynamic' - Dynamic teams setting
d287 2
a288 2
     This function returns 'true' if enabled, 'false' otherwise.  Here,
     'true' and 'false' represent their language-specific counterparts.
d291 3
a293 3
     'OMP_DYNAMIC' environment variable or at runtime using
     'omp_set_dynamic'.  If undefined, dynamic adjustment is disabled by
     default.
d296 1
a296 1
     _Prototype_:   'int omp_get_dynamic(void);'
d299 1
a299 1
     _Interface_:   'logical function omp_get_dynamic()'
d310 1
a310 1
2.6 'omp_get_level' - Obtain the current nesting level
d318 1
a318 1
     _Prototype_:   'int omp_get_level(void);'
d321 1
a321 1
     _Interface_:   'integer function omp_level()'
d332 1
a332 1
2.7 'omp_get_max_active_levels' - Maximum number of active regions
d340 1
a340 1
     _Prototype_:   'int omp_get_max_active_levels(void);'
d343 1
a343 1
     _Interface_:   'integer function omp_get_max_active_levels()'
d354 1
a354 1
2.8 'omp_get_max_task_priority' - Maximum priority value
d363 1
a363 1
     _Prototype_:   'int omp_get_max_task_priority(void);'
d366 1
a366 1
     _Interface_:   'integer function omp_get_max_task_priority()'
d374 1
a374 1
2.9 'omp_get_max_threads' - Maximum number of threads of parallel region
d379 1
a379 1
     region that does not use the clause 'num_threads'.
d382 1
a382 1
     _Prototype_:   'int omp_get_max_threads(void);'
d385 1
a385 1
     _Interface_:   'integer function omp_get_max_threads()'
d397 1
a397 1
2.10 'omp_get_nested' - Nested parallel regions
d401 2
a402 2
     This function returns 'true' if nested parallel regions are
     enabled, 'false' otherwise.  Here, 'true' and 'false' represent
d406 2
a407 2
     'OMP_NESTED' environment variable or at runtime using
     'omp_set_nested'.  If undefined, nested parallel regions are
d411 1
a411 1
     _Prototype_:   'int omp_get_nested(void);'
d414 1
a414 1
     _Interface_:   'logical function omp_get_nested()'
d425 1
a425 1
2.11 'omp_get_num_devices' - Number of target devices
d432 1
a432 1
     _Prototype_:   'int omp_get_num_devices(void);'
d435 1
a435 1
     _Interface_:   'integer function omp_get_num_devices()'
d443 1
a443 1
2.12 'omp_get_num_procs' - Number of processors online
d450 1
a450 1
     _Prototype_:   'int omp_get_num_procs(void);'
d453 1
a453 1
     _Interface_:   'integer function omp_get_num_procs()'
d461 1
a461 1
2.13 'omp_get_num_teams' - Number of teams
d468 1
a468 1
     _Prototype_:   'int omp_get_num_teams(void);'
d471 1
a471 1
     _Interface_:   'integer function omp_get_num_teams()'
d479 1
a479 1
2.14 'omp_get_num_threads' - Size of the active team
d483 2
a484 2
     Returns the number of threads in the current team.  In a sequential
     section of the program 'omp_get_num_threads' returns 1.
d487 5
a491 5
     'OMP_NUM_THREADS' environment variable.  At runtime, the size of
     the current team may be set either by the 'NUM_THREADS' clause or
     by 'omp_set_num_threads'.  If none of the above were used to define
     a specific value and 'OMP_DYNAMIC' is disabled, one thread per CPU
     online is used.
d494 1
a494 1
     _Prototype_:   'int omp_get_num_threads(void);'
d497 1
a497 1
     _Interface_:   'integer function omp_get_num_threads()'
d509 1
a509 1
2.15 'omp_get_proc_bind' - Whether theads may be moved between CPUs
d513 5
a517 5
     This functions returns the currently active thread affinity policy,
     which is set via 'OMP_PROC_BIND'.  Possible values are
     'omp_proc_bind_false', 'omp_proc_bind_true',
     'omp_proc_bind_master', 'omp_proc_bind_close' and
     'omp_proc_bind_spread'.
d520 1
a520 1
     _Prototype_:   'omp_proc_bind_t omp_get_proc_bind(void);'
d523 2
a524 2
     _Interface_:   'integer(kind=omp_proc_bind_kind) function
                    omp_get_proc_bind()'
d536 1
a536 1
2.16 'omp_get_schedule' - Obtain the runtime scheduling method
d541 2
a542 2
     set to the value 'omp_sched_static', 'omp_sched_dynamic',
     'omp_sched_guided' or 'omp_sched_auto'.  The second argument,
d546 2
a547 2
     _Prototype_:   'void omp_get_schedule(omp_sched_t *kind, int
                    *chunk_size);'
d550 3
a552 3
     _Interface_:   'subroutine omp_get_schedule(kind, chunk_size)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer chunk_size'
d563 1
a563 1
2.17 'omp_get_team_num' - Get team number
d570 1
a570 1
     _Prototype_:   'int omp_get_team_num(void);'
d573 1
a573 1
     _Interface_:   'integer function omp_get_team_num()'
d581 1
a581 1
2.18 'omp_get_team_size' - Number of threads in a team
d587 3
a589 3
     values of LEVEL outside zero to 'omp_get_level', -1 is returned; if
     LEVEL is zero, 1 is returned, and for 'omp_get_level', the result
     is identical to 'omp_get_num_threads'.
d592 1
a592 1
     _Prototype_:   'int omp_get_team_size(int level);'
d595 2
a596 2
     _Interface_:   'integer function omp_get_team_size(level)'
                    'integer level'
d608 1
a608 1
2.19 'omp_get_thread_limit' - Maximum number of threads
d615 1
a615 1
     _Prototype_:   'int omp_get_thread_limit(void);'
d618 1
a618 1
     _Interface_:   'integer function omp_get_thread_limit()'
d629 1
a629 1
2.20 'omp_get_thread_num' - Current thread ID
d634 4
a637 4
     team.  In a sequential parts of the program, 'omp_get_thread_num'
     always returns 0.  In parallel regions the return value varies from
     0 to 'omp_get_num_threads'-1 inclusive.  The return value of the
     master thread of a team is always 0.
d640 1
a640 1
     _Prototype_:   'int omp_get_thread_num(void);'
d643 1
a643 1
     _Interface_:   'integer function omp_get_thread_num()'
d654 1
a654 1
2.21 'omp_in_parallel' - Whether a parallel region is active
d658 2
a659 2
     This function returns 'true' if currently running in parallel,
     'false' otherwise.  Here, 'true' and 'false' represent their
d663 1
a663 1
     _Prototype_:   'int omp_in_parallel(void);'
d666 1
a666 1
     _Interface_:   'logical function omp_in_parallel()'
d674 1
a674 1
2.22 'omp_in_final' - Whether in final or included task region
d678 2
a679 2
     This function returns 'true' if currently running in a final or
     included task region, 'false' otherwise.  Here, 'true' and 'false'
d683 1
a683 1
     _Prototype_:   'int omp_in_final(void);'
d686 1
a686 1
     _Interface_:   'logical function omp_in_final()'
d694 1
a694 1
2.23 'omp_is_initial_device' - Whether executing on the host device
d698 2
a699 2
     This function returns 'true' if currently running on the host
     device, 'false' otherwise.  Here, 'true' and 'false' represent
d703 1
a703 1
     _Prototype_:   'int omp_is_initial_device(void);'
d706 1
a706 1
     _Interface_:   'logical function omp_is_initial_device()'
d714 1
a714 1
2.24 'omp_set_default_device' - Set the default device for target regions
d722 1
a722 1
     _Prototype_:   'void omp_set_default_device(int device_num);'
d725 2
a726 2
     _Interface_:   'subroutine omp_set_default_device(device_num)'
                    'integer device_num'
d737 1
a737 1
2.25 'omp_set_dynamic' - Enable/disable dynamic teams
d743 2
a744 2
     of 'true' and 'false', where 'true' enables dynamic adjustment of
     team sizes and 'false' disables it.
d747 1
a747 1
     _Prototype_:   'void omp_set_dynamic(int dynamic_threads);'
d750 2
a751 2
     _Interface_:   'subroutine omp_set_dynamic(dynamic_threads)'
                    'logical, intent(in) :: dynamic_threads'
d762 1
a762 1
2.26 'omp_set_max_active_levels' - Limits the number of active parallel regions
d770 1
a770 1
     _Prototype_:   'void omp_set_max_active_levels(int max_levels);'
d773 2
a774 2
     _Interface_:   'subroutine omp_set_max_active_levels(max_levels)'
                    'integer max_levels'
d785 1
a785 1
2.27 'omp_set_nested' - Enable/disable nested parallel regions
d791 2
a792 2
     language-specific equivalent of 'true' and 'false', where 'true'
     enables dynamic adjustment of team sizes and 'false' disables it.
d795 1
a795 1
     _Prototype_:   'void omp_set_nested(int nested);'
d798 2
a799 2
     _Interface_:   'subroutine omp_set_nested(nested)'
                    'logical, intent(in) :: nested'
d810 1
a810 1
2.28 'omp_set_num_threads' - Set upper team size limit
d815 2
a816 2
     parallel sections, if those do not specify a 'num_threads' clause.
     The argument of 'omp_set_num_threads' shall be a positive integer.
d819 1
a819 1
     _Prototype_:   'void omp_set_num_threads(int num_threads);'
d822 2
a823 2
     _Interface_:   'subroutine omp_set_num_threads(num_threads)'
                    'integer, intent(in) :: num_threads'
d835 1
a835 1
2.29 'omp_set_schedule' - Set the runtime scheduling method
d840 2
a841 2
     value 'omp_sched_static', 'omp_sched_dynamic', 'omp_sched_guided'
     or 'omp_sched_auto'.  Except for 'omp_sched_auto', the chunk size
d843 1
a843 1
     value if zero or negative.  For 'omp_sched_auto' the CHUNK_SIZE
d847 2
a848 2
     _Prototype_:   'void omp_set_schedule(omp_sched_t kind, int
                    chunk_size);'
d851 3
a853 3
     _Interface_:   'subroutine omp_set_schedule(kind, chunk_size)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer chunk_size'
d864 1
a864 1
2.30 'omp_init_lock' - Initialize simple lock
d872 1
a872 1
     _Prototype_:   'void omp_init_lock(omp_lock_t *lock);'
d875 2
a876 2
     _Interface_:   'subroutine omp_init_lock(svar)'
                    'integer(omp_lock_kind), intent(out) :: svar'
d887 1
a887 1
2.31 'omp_set_lock' - Wait for and set simple lock
d891 4
a894 4
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  The calling thread is blocked until the lock
     is available.  If the lock is already held by the current thread, a
     deadlock occurs.
d897 1
a897 1
     _Prototype_:   'void omp_set_lock(omp_lock_t *lock);'
d900 2
a901 2
     _Interface_:   'subroutine omp_set_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d913 1
a913 1
2.32 'omp_test_lock' - Test and set simple lock if available
d917 5
a921 5
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  Contrary to 'omp_set_lock', 'omp_test_lock'
     does not block if the lock is not available.  This function returns
     'true' upon success, 'false' otherwise.  Here, 'true' and 'false'
     represent their language-specific counterparts.
d924 1
a924 1
     _Prototype_:   'int omp_test_lock(omp_lock_t *lock);'
d927 2
a928 2
     _Interface_:   'logical function omp_test_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d939 1
a939 1
2.33 'omp_unset_lock' - Unset simple lock
d944 4
a947 4
     'omp_set_lock' or 'omp_test_lock' before.  In addition, the lock
     must be held by the thread calling 'omp_unset_lock'.  Then, the
     lock becomes unlocked.  If one or more threads attempted to set the
     lock before, one of them is chosen to, again, set the lock to
d951 1
a951 1
     _Prototype_:   'void omp_unset_lock(omp_lock_t *lock);'
d954 2
a955 2
     _Interface_:   'subroutine omp_unset_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d966 1
a966 1
2.34 'omp_destroy_lock' - Destroy simple lock
d974 1
a974 1
     _Prototype_:   'void omp_destroy_lock(omp_lock_t *lock);'
d977 2
a978 2
     _Interface_:   'subroutine omp_destroy_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d989 1
a989 1
2.35 'omp_init_nest_lock' - Initialize nested lock
d997 1
a997 1
     _Prototype_:   'void omp_init_nest_lock(omp_nest_lock_t *lock);'
d1000 2
a1001 2
     _Interface_:   'subroutine omp_init_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(out) :: nvar'
d1012 1
a1012 1
2.36 'omp_set_nest_lock' - Wait for and set nested lock
d1016 5
a1020 4
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  The calling thread is blocked until the
     lock is available.  If the lock is already held by the current
     thread, the nesting count for the lock is incremented.
d1023 1
a1023 1
     _Prototype_:   'void omp_set_nest_lock(omp_nest_lock_t *lock);'
d1026 2
a1027 2
     _Interface_:   'subroutine omp_set_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1038 1
a1038 1
2.37 'omp_test_nest_lock' - Test and set nested lock if available
d1042 6
a1047 5
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  Contrary to 'omp_set_nest_lock',
     'omp_test_nest_lock' does not block if the lock is not available.
     If the lock is already held by the current thread, the new nesting
     count is returned.  Otherwise, the return value equals zero.
d1050 1
a1050 1
     _Prototype_:   'int omp_test_nest_lock(omp_nest_lock_t *lock);'
d1053 2
a1054 2
     _Interface_:   'logical function omp_test_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1065 1
a1065 1
2.38 'omp_unset_nest_lock' - Unset nested lock
d1070 1
a1070 1
     'omp_set_nested_lock' or 'omp_test_nested_lock' before.  In
d1072 1
a1072 1
     'omp_unset_nested_lock'.  If the nesting count drops to zero, the
d1078 1
a1078 1
     _Prototype_:   'void omp_unset_nest_lock(omp_nest_lock_t *lock);'
d1081 2
a1082 2
     _Interface_:   'subroutine omp_unset_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1093 1
a1093 1
2.39 'omp_destroy_nest_lock' - Destroy nested lock
d1102 1
a1102 1
     _Prototype_:   'void omp_destroy_nest_lock(omp_nest_lock_t *);'
d1105 2
a1106 2
     _Interface_:   'subroutine omp_destroy_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1117 1
a1117 1
2.40 'omp_get_wtick' - Get timer precision
d1125 1
a1125 1
     _Prototype_:   'double omp_get_wtick(void);'
d1128 1
a1128 1
     _Interface_:   'double precision function omp_get_wtick()'
d1139 1
a1139 1
2.41 'omp_get_wtime' - Elapsed wall clock time
d1150 1
a1150 1
     _Prototype_:   'double omp_get_wtime(void);'
d1153 1
a1153 1
     _Interface_:   'double precision function omp_get_wtime()'
d1167 1
a1167 1
The environment variables which beginning with 'OMP_' are defined by
d1169 1
a1169 1
beginning with 'GOMP_' are GNU extensions.
d1196 1
a1196 1
3.1 'OMP_CANCELLATION' - Set whether cancellation is activated
d1200 3
a1202 3
     If set to 'TRUE', the cancellation is activated.  If set to 'FALSE'
     or if unset, cancellation is disabled and the 'cancel' construct is
     ignored.
d1213 1
a1213 1
3.2 'OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
d1217 1
a1217 1
     If set to 'TRUE', the OpenMP version number and the values
d1219 1
a1219 1
     'stderr'.  If set to 'VERBOSE', it additionally shows the value of
d1221 1
a1221 1
     or set to 'FALSE', this information will not be shown.
d1229 1
a1229 1
3.3 'OMP_DEFAULT_DEVICE' - Set the device used in target regions
d1233 5
a1237 5
     Set to choose the device which is used in a 'target' region, unless
     the value is overridden by 'omp_set_default_device' or by a
     'device' clause.  The value shall be the nonnegative device number.
     If no device with the given device number exists, the code is
     executed on the host.  If unset, device number 0 will be used.
d1248 1
a1248 1
3.4 'OMP_DYNAMIC' - Dynamic adjustment of threads
d1254 2
a1255 2
     'TRUE' or 'FALSE'.  If undefined, dynamic adjustment is disabled by
     default.
d1266 1
a1266 1
3.5 'OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1283 1
a1283 1
3.6 'OMP_MAX_TASK_PRIORITY' - Set the maximum priority
d1286 1
a1286 1
number that can be set for a task.
d1288 2
a1289 2
     Specifies the initial value for the maximum priority value that can
     be set for a task.  The value of this variable shall be a
d1302 1
a1302 1
3.7 'OMP_NESTED' - Nested parallel regions
d1308 1
a1308 1
     environment variable shall be 'TRUE' or 'FALSE'.  If undefined,
d1320 1
a1320 1
3.8 'OMP_NUM_THREADS' - Specifies the number of threads to use
d1324 5
a1328 5
     Specifies the default number of threads to use in parallel regions.
     The value of this variable shall be a comma-separated list of
     positive integers; the value specified the number of threads to use
     for the corresponding nested level.  If undefined one thread per
     CPU is used.
d1339 1
a1339 1
3.9 'OMP_PROC_BIND' - Whether theads may be moved between CPUs
d1344 1
a1344 1
     to 'TRUE', OpenMP theads should not be moved; if set to 'FALSE'
d1346 1
a1346 1
     values 'MASTER', 'CLOSE' and 'SPREAD' can be used to specify the
d1348 3
a1350 3
     'MASTER' the worker threads are in the same place partition as the
     master thread.  With 'CLOSE' those are kept close to the master
     thread in contiguous place partitions.  And with 'SPREAD' a sparse
d1353 2
a1354 2
     When undefined, 'OMP_PROC_BIND' defaults to 'TRUE' when
     'OMP_PLACES' or 'GOMP_CPU_AFFINITY' is set and 'FALSE' otherwise.
d1366 1
a1366 1
3.10 'OMP_PLACES' - Specifies on which CPUs the theads should be placed
d1370 3
a1372 3
     The thread placement can be either specified using an abstract name
     or by an explicit list of the places.  The abstract names
     'threads', 'cores' and 'sockets' can be optionally followed by a
d1374 3
a1376 3
     shall be created.  With 'threads' each place corresponds to a
     single hardware thread; 'cores' to a single core with the
     corresponding number of hardware threads; and with 'sockets' the
d1378 1
a1378 1
     be shown by setting the 'OMP_DISPLAY_ENV' environment variable.
d1391 2
a1392 2
     specifies the same places list: '"{0,1,2}, {3,4,6}, {7,8,9},
     {10,11,12}"'; '"{0:3}, {3:3}, {7:3}, {10:3}"'; and '"{0:2}:4:3"'.
d1394 2
a1395 2
     If 'OMP_PLACES' and 'GOMP_CPU_AFFINITY' are unset and
     'OMP_PROC_BIND' is either unset or 'false', threads may be moved
d1408 1
a1408 1
3.11 'OMP_STACKSIZE' - Set default thread stack size
d1413 7
a1419 7
     is suffixed by 'B', 'K', 'M' or 'G', in which case the size is,
     respectively, in bytes, kilobytes, megabytes or gigabytes.  This is
     different from 'pthread_attr_setstacksize' which gets the number of
     bytes as an argument.  If the stack size cannot be set due to
     system constraints, an error is reported and the initial stack size
     is left unchanged.  If undefined, the stack size is system
     dependent.
d1427 1
a1427 1
3.12 'OMP_SCHEDULE' - How threads are scheduled
d1431 5
a1435 5
     Allows to specify 'schedule type' and 'chunk size'.  The value of
     the variable shall have the form: 'type[,chunk]' where 'type' is
     one of 'static', 'dynamic', 'guided' or 'auto' The optional 'chunk'
     size shall be a positive integer.  If undefined, dynamic scheduling
     and a chunk size of 1 is used.
d1447 1
a1447 1
3.13 'OMP_THREAD_LIMIT' - Set the maximum number of threads
d1464 1
a1464 1
3.14 'OMP_WAIT_POLICY' - How waiting threads are handled
d1469 2
a1470 2
     the value is 'PASSIVE', waiting threads should not consume CPU
     power while waiting; while the value is 'ACTIVE' specifies that
d1483 1
a1483 1
3.15 'GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d1491 2
a1492 2
     (M-N:S). CPU numbers are zero based.  For example,
     'GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
d1496 1
a1496 1
     beginning of the list.  'GOMP_CPU_AFFINITY=0' binds all threads to
d1501 10
a1510 10
     language-specific library functions, e.g., 'getenv' in C or
     'GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
     setting of the 'GOMP_CPU_AFFINITY' environment variable.  A defined
     CPU affinity on startup cannot be changed or disabled during the
     runtime of the application.

     If both 'GOMP_CPU_AFFINITY' and 'OMP_PROC_BIND' are set,
     'OMP_PROC_BIND' has a higher precedence.  If neither has been set
     and 'OMP_PROC_BIND' is unset, or when 'OMP_PROC_BIND' is set to
     'FALSE', the host system will handle the assignment of threads to
d1519 1
a1519 1
3.16 'GOMP_DEBUG' - Enable debugging output
d1523 2
a1524 2
     Enable debugging output.  The variable should be set to '0'
     (disabled, also the default if not set), or '1' (enabled).
d1533 1
a1533 1
3.17 'GOMP_STACKSIZE' - Set default thread stack size
d1538 1
a1538 1
     from 'pthread_attr_setstacksize' which gets the number of bytes as
d1555 1
a1555 1
3.18 'GOMP_SPINCOUNT' - Set the busy-wait spin count
d1561 1
a1561 1
     value may be either 'INFINITE', 'INFINITY' to always wait actively
d1564 9
a1572 8
     suffixes acting as multiplication factors: 'k' (kilo, thousand),
     'M' (mega, million), 'G' (giga, billion), or 'T' (tera, trillion).
     If undefined, 0 is used when 'OMP_WAIT_POLICY' is 'PASSIVE',
     300,000 is used when 'OMP_WAIT_POLICY' is undefined and 30 billion
     is used when 'OMP_WAIT_POLICY' is 'ACTIVE'.  If there are more
     OpenMP threads than available CPUs, 1000 and 100 spins are used for
     'OMP_WAIT_POLICY' being 'ACTIVE' or undefined, respectively; unless
     the 'GOMP_SPINCOUNT' is lower or 'OMP_WAIT_POLICY' is 'PASSIVE'.
d1580 1
a1580 1
3.19 'GOMP_RTEMS_THREAD_POOLS' - Set the RTEMS specific thread pools
d1586 4
a1589 4
     thread pools.  The format for 'GOMP_RTEMS_THREAD_POOLS' is a list
     of optional '<thread-pool-count>[$<priority>]@@<scheduler-name>'
     configurations separated by ':' where:
        * '<thread-pool-count>' is the thread pool count for this
d1591 3
a1593 2
        * '$<priority>' is an optional priority for the worker threads
          of a thread pool according to 'pthread_setschedparam'.  In
d1599 2
a1600 1
        * '@@<scheduler-name>' is the scheduler instance name according
d1603 5
a1607 4
     instance, then each OpenMP master thread of this scheduler instance
     will use its own dynamically allocated thread pool.  To limit the
     worker thread count of the thread pools, each OpenMP master thread
     must call 'omp_set_num_threads'.
d1609 2
a1610 2
     Lets suppose we have three scheduler instances 'IO', 'WRK0', and
     'WRK1' with 'GOMP_RTEMS_THREAD_POOLS' set to '"1@@WRK0:3$4@@WRK1"'.
d1612 1
a1612 1
     'IO'.  In the scheduler instance 'WRK0' there is one thread pool
d1615 3
a1617 3
     master thread that created it.  In the scheduler instance 'WRK1'
     there are three thread pools available and their worker threads run
     at priority four.
d1626 4
a1629 4
compile-time flag '-fopenacc' must be specified.  This enables the
OpenACC directive '#pragma acc' in C/C++ and '!$accp' directives in free
form, 'c$acc', '*$acc' and '!$acc' directives in fixed form, '!$'
conditional compilation sentinels in free form and 'c$', '*$' and '!$'
d1635 1
a1635 1
found in the OpenACC (https://www.openacc.org) Application Programming
d1639 2
a1640 2
future versions of GCC. See <https://gcc.gnu.org/wiki/OpenACC> for more
information.
d1650 3
a1652 3
throw exceptions.  Generally, they are available only for the host, with
the exception of 'acc_on_device', which is available for both the host
and the acceleration device.
d1715 1
a1715 1
5.1 'acc_get_num_devices' - Get number of devices for given device type
d1723 1
a1723 1
     _Prototype_:   'int acc_get_num_devices(acc_device_t devicetype);'
d1726 2
a1727 2
     _Interface_:   'integer function acc_get_num_devices(devicetype)'
                    'integer(kind=acc_device_kind) devicetype'
d1730 1
a1730 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1736 1
a1736 1
5.2 'acc_set_device_type' - Set type of device accelerator to use.
d1745 1
a1745 1
     _Prototype_:   'acc_set_device_type(acc_device_t devicetype);'
d1748 2
a1749 2
     _Interface_:   'subroutine acc_set_device_type(devicetype)'
                    'integer(kind=acc_device_kind) devicetype'
d1752 1
a1752 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1758 1
a1758 1
5.3 'acc_get_device_type' - Get type of device accelerator to be used.
d1766 1
a1766 1
     _Prototype_:   'acc_device_t acc_get_device_type(void);'
d1769 2
a1770 2
     _Interface_:   'function acc_get_device_type(void)'
                    'integer(kind=acc_device_kind) acc_get_device_type'
d1773 1
a1773 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1779 1
a1779 1
5.4 'acc_set_device_num' - Set device number to use.
d1788 2
a1789 1
     _Prototype_:   'acc_set_device_num(int num, acc_device_t devicetype);'
d1792 3
a1794 3
     _Interface_:   'subroutine acc_set_device_num(devicenum, devicetype)'
                    'integer devicenum'
                    'integer(kind=acc_device_kind) devicetype'
d1797 1
a1797 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1803 1
a1803 1
5.5 'acc_get_device_num' - Get device number to be used.
d1812 1
a1812 1
     _Prototype_:   'int acc_get_device_num(acc_device_t devicetype);'
d1815 3
a1817 3
     _Interface_:   'function acc_get_device_num(devicetype)'
                    'integer(kind=acc_device_kind) devicetype'
                    'integer acc_get_device_num'
d1820 1
a1820 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1826 1
a1826 1
5.6 'acc_async_test' - Test for completion of a specific asynchronous operation.
d1831 4
a1834 4
     specified in ARG.  In C/C++, a non-zero value will be returned to
     indicate the specified asynchronous operation has completed.  While
     Fortran will return a 'true'.  If the asynchrounous operation has
     not completed, C/C++ returns a zero and Fortran returns a 'false'.
d1837 1
a1837 1
     _Prototype_:   'int acc_async_test(int arg);'
d1840 3
a1842 3
     _Interface_:   'function acc_async_test(arg)'
                    'integer(kind=acc_handle_kind) arg'
                    'logical acc_async_test'
d1845 1
a1845 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1851 1
a1851 1
5.7 'acc_async_test_all' - Tests for completion of all asynchronous operations.
d1857 3
a1859 3
     asynchronous operations have completed.  While Fortran will return
     a 'true'.  If any asynchronous operation has not completed, C/C++
     returns a zero and Fortran returns a 'false'.
d1862 1
a1862 1
     _Prototype_:   'int acc_async_test_all(void);'
d1865 2
a1866 2
     _Interface_:   'function acc_async_test()'
                    'logical acc_get_device_num'
d1869 1
a1869 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1875 1
a1875 1
5.8 'acc_wait' - Wait for completion of a specific asynchronous operation.
d1883 1
a1883 4
     _Prototype_:   'acc_wait(arg);'
     _Prototype     'acc_async_wait(arg);'
     (OpenACC 1.0
     compatibility)_:
d1886 2
a1887 6
     _Interface_:   'subroutine acc_wait(arg)'
                    'integer(acc_handle_kind) arg'
     _Interface     'subroutine acc_async_wait(arg)'
     (OpenACC 1.0
     compatibility)_:
                    'integer(acc_handle_kind) arg'
d1890 1
a1890 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1896 1
a1896 1
5.9 'acc_wait_all' - Waits for completion of all asynchronous operations.
d1904 1
a1904 4
     _Prototype_:   'acc_wait_all(void);'
     _Prototype     'acc_async_wait_all(void);'
     (OpenACC 1.0
     compatibility)_:
d1907 1
a1907 4
     _Interface_:   'subroutine acc_wait_all()'
     _Interface     'subroutine acc_async_wait_all()'
     (OpenACC 1.0
     compatibility)_:
d1910 1
a1910 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1916 1
a1916 1
5.10 'acc_wait_all_async' - Wait for completion of all asynchronous operations.
d1925 1
a1925 1
     _Prototype_:   'acc_wait_all_async(int async);'
d1928 2
a1929 2
     _Interface_:   'subroutine acc_wait_all_async(async)'
                    'integer(acc_handle_kind) async'
d1932 1
a1932 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1938 1
a1938 1
5.11 'acc_wait_async' - Wait for completion of asynchronous operations.
d1946 1
a1946 1
     _Prototype_:   'acc_wait_async(int arg, int async);'
d1949 2
a1950 2
     _Interface_:   'subroutine acc_wait_async(arg, async)'
                    'integer(acc_handle_kind) arg, async'
d1953 1
a1953 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1959 1
a1959 1
5.12 'acc_init' - Initialize runtime for a specific device type.
d1963 2
a1964 2
     This function initializes the runtime for the device type specified
     in DEVICETYPE.
d1967 1
a1967 1
     _Prototype_:   'acc_init(acc_device_t devicetype);'
d1970 2
a1971 2
     _Interface_:   'subroutine acc_init(devicetype)'
                    'integer(acc_device_kind) devicetype'
d1974 1
a1974 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1980 1
a1980 1
5.13 'acc_shutdown' - Shuts down the runtime for a specific device type.
d1988 1
a1988 1
     _Prototype_:   'acc_shutdown(acc_device_t devicetype);'
d1991 2
a1992 2
     _Interface_:   'subroutine acc_shutdown(devicetype)'
                    'integer(acc_device_kind) devicetype'
d1995 1
a1995 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2001 1
a2001 1
5.14 'acc_on_device' - Whether executing on a particular device
d2006 1
a2006 1
     particular device specified in DEVICETYPE.  In C/C++ a non-zero
d2008 1
a2008 1
     specified device type.  In Fortran, 'true' will be returned.  If
d2010 1
a2010 1
     will return a zero, while Fortran will return 'false'.
d2013 1
a2013 1
     _Prototype_:   'acc_on_device(acc_device_t devicetype);'
d2016 3
a2018 3
     _Interface_:   'function acc_on_device(devicetype)'
                    'integer(acc_device_kind) devicetype'
                    'logical acc_on_device'
d2021 1
a2021 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2027 1
a2027 1
5.15 'acc_malloc' - Allocate device memory.
d2031 1
a2031 1
     This function allocates LEN bytes of device memory.  It returns the
d2035 1
a2035 1
     _Prototype_:   'd_void* acc_malloc(size_t len);'
d2038 1
a2038 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2044 1
a2044 1
5.16 'acc_free' - Free device memory.
d2048 1
a2048 1
     Free previously allocated device memory at the device address 'a'.
d2051 1
a2051 1
     _Prototype_:   'acc_free(d_void *a);'
d2054 1
a2054 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2060 1
a2060 1
5.17 'acc_copyin' - Allocate device memory and copy host memory to it.
d2065 1
a2065 1
     maps it to the specified host address in A.  The device address of
d2068 3
a2070 3
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
     a variable or array element and LEN specifies the length in bytes.
d2073 1
a2073 1
     _Prototype_:   'void *acc_copyin(h_void *a, size_t len);'
d2076 5
a2080 5
     _Interface_:   'subroutine acc_copyin(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_copyin(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2083 1
a2083 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2089 1
a2089 1
5.18 'acc_present_or_copyin' - If the data is not present on the device, allocate device memory and copy from host memory.
d2094 3
a2096 3
     LEN is present or not.  If it is not present, then device memory
     will be allocated and the host memory copied.  The device address
     of the newly allocated device memory is returned.
d2098 2
a2099 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2103 2
a2104 2
     _Prototype_:   'void *acc_present_or_copyin(h_void *a, size_t len);'
     _Prototype_:   'void *acc_pcopyin(h_void *a, size_t len);'
d2107 10
a2116 10
     _Interface_:   'subroutine acc_present_or_copyin(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_present_or_copyin(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_pcopyin(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_pcopyin(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2119 1
a2119 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2125 1
a2125 1
5.19 'acc_create' - Allocate device memory and map it to host memory.
d2130 1
a2130 1
     specified by the host address A with a length of LEN bytes.  In
d2134 2
a2135 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2139 1
a2139 1
     _Prototype_:   'void *acc_create(h_void *a, size_t len);'
d2142 5
a2146 5
     _Interface_:   'subroutine acc_create(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_create(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2149 1
a2149 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2155 1
a2155 1
5.20 'acc_present_or_create' - If the data is not present on the device, allocate device memory and map it to host memory.
d2160 2
a2161 2
     LEN is present or not.  If it is not present, then device memory
     will be allocated and mapped to host memory.  In C/C++, the device
d2164 2
a2165 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2169 2
a2170 2
     _Prototype_:   'void *acc_present_or_create(h_void *a, size_t len)'
     _Prototype_:   'void *acc_pcreate(h_void *a, size_t len)'
d2173 10
a2182 10
     _Interface_:   'subroutine acc_present_or_create(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_present_or_create(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_pcreate(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_pcreate(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2185 1
a2185 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2191 1
a2191 1
5.21 'acc_copyout' - Copy device memory to host memory.
d2198 2
a2199 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2203 1
a2203 1
     _Prototype_:   'acc_copyout(h_void *a, size_t len);'
d2206 5
a2210 5
     _Interface_:   'subroutine acc_copyout(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_copyout(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2213 1
a2213 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2219 1
a2219 1
5.22 'acc_delete' - Free device memory.
d2226 2
a2227 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2231 1
a2231 1
     _Prototype_:   'acc_delete(h_void *a, size_t len);'
d2234 5
a2238 5
     _Interface_:   'subroutine acc_delete(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_delete(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2241 1
a2241 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2247 1
a2247 1
5.23 'acc_update_device' - Update device memory from mapped host memory.
d2255 2
a2256 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2260 1
a2260 1
     _Prototype_:   'acc_update_device(h_void *a, size_t len);'
d2263 5
a2267 5
     _Interface_:   'subroutine acc_update_device(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_update_device(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2270 1
a2270 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2276 1
a2276 1
5.24 'acc_update_self' - Update host memory from mapped device memory.
d2284 2
a2285 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2289 1
a2289 1
     _Prototype_:   'acc_update_self(h_void *a, size_t len);'
d2292 5
a2296 5
     _Interface_:   'subroutine acc_update_self(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_update_self(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2299 1
a2299 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2305 1
a2305 1
5.25 'acc_map_data' - Map previously allocated device memory to host memory.
d2310 1
a2310 1
     The device memory is specified with the device address D.  The host
d2314 1
a2314 1
     _Prototype_:   'acc_map_data(h_void *h, d_void *d, size_t len);'
d2317 1
a2317 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2323 1
a2323 1
5.26 'acc_unmap_data' - Unmap device memory from host memory.
d2327 1
a2327 1
     This function unmaps previously mapped device and host memory.  The
d2331 1
a2331 1
     _Prototype_:   'acc_unmap_data(h_void *h);'
d2334 1
a2334 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2340 1
a2340 1
5.27 'acc_deviceptr' - Get device pointer associated with specific host address.
d2348 1
a2348 1
     _Prototype_:   'void *acc_deviceptr(h_void *h);'
d2351 1
a2351 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2357 1
a2357 1
5.28 'acc_hostptr' - Get host pointer associated with specific device address.
d2365 1
a2365 1
     _Prototype_:   'void *acc_hostptr(d_void *d);'
d2368 1
a2368 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2374 1
a2374 1
5.29 'acc_is_present' - Indicate whether host variable / array is present on device.
d2378 2
a2379 2
     This function indicates whether the specified host address in A and
     a length of LEN bytes is present on the device.  In C/C++, a
d2381 1
a2381 1
     memory on the device.  A zero is returned to indicate the memory is
d2384 2
a2385 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2387 2
a2388 2
     If the host memory is mapped to device memory, then a 'true' is
     returned.  Otherwise, a 'false' is return to indicate the mapped
d2392 1
a2392 1
     _Prototype_:   'int acc_is_present(h_void *a, size_t len);'
d2395 7
a2401 7
     _Interface_:   'function acc_is_present(a)'
                    'type, dimension(:[,:]...) :: a'
                    'logical acc_is_present'
     _Interface_:   'function acc_is_present(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'logical acc_is_present'
d2404 1
a2404 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2410 1
a2410 1
5.30 'acc_memcpy_to_device' - Copy host memory to device memory.
d2419 2
a2420 2
     _Prototype_:   'acc_memcpy_to_device(d_void *dest, h_void *src, size_t
                    bytes);'
d2423 1
a2423 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2429 1
a2429 1
5.31 'acc_memcpy_from_device' - Copy device memory to host memory.
d2438 2
a2439 2
     _Prototype_:   'acc_memcpy_from_device(d_void *dest, h_void *src,
                    size_t bytes);'
d2442 1
a2442 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2448 1
a2448 1
5.32 'acc_get_current_cuda_device' - Get CUDA device handle.
d2452 1
a2452 1
     This function returns the CUDA device handle.  This handle is the
d2456 1
a2456 1
     _Prototype_:   'void *acc_get_current_cuda_device(void);'
d2459 1
a2459 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2465 1
a2465 1
5.33 'acc_get_current_cuda_context' - Get CUDA context handle.
d2469 1
a2469 1
     This function returns the CUDA context handle.  This handle is the
d2473 1
a2473 1
     _Prototype_:   'acc_get_current_cuda_context(void);'
d2476 1
a2476 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2482 1
a2482 1
5.34 'acc_get_cuda_stream' - Get CUDA stream handle.
d2486 1
a2486 1
     This function returns the CUDA stream handle.  This handle is the
d2490 1
a2490 1
     _Prototype_:   'acc_get_cuda_stream(void);'
d2493 1
a2493 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2499 1
a2499 1
5.35 'acc_set_cuda_stream' - Set CUDA stream handle.
d2507 1
a2507 1
     _Prototype_:   'acc_set_cuda_stream(int async void *stream);'
d2510 1
a2510 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2519 1
a2519 1
The variables 'ACC_DEVICE_TYPE' and 'ACC_DEVICE_NUM' are defined by
d2521 1
a2521 1
'GCC_ACC_NOTIFY' is used for diagnostic purposes.
d2532 1
a2532 1
6.1 'ACC_DEVICE_TYPE'
d2536 1
a2536 1
     OpenACC specification v2.0 (https://www.openacc.org), section 4.1.
d2541 1
a2541 1
6.2 'ACC_DEVICE_NUM'
d2545 1
a2545 1
     OpenACC specification v2.0 (https://www.openacc.org), section 4.2.
d2550 1
a2550 1
6.3 'GCC_ACC_NOTIFY'
d2562 1
a2562 1
This applies to the 'nvptx' plugin only.
d2571 4
a2574 4
'async' and 'wait' clauses.  When the 'async' clause is first used with
a directive, it creates a CUDA stream.  If an 'async-argument' is used
with the 'async' clause, then the stream is associated with the
specified 'async-argument'.
d2577 2
a2578 2
the 'async-argument' of an 'async' clause, both the 'wait' clause and
the 'wait' directive can be used.  When either the clause or directive
d2581 1
a2581 1
'async-argument', that is, stream, have completed.
d2584 2
a2585 2
of using the 'async' clause, is done without any intervention by the
caller.  This implies the association between the 'async-argument' and
d2588 5
a2592 5
function 'acc_set_cuda_stream'.  When the function 'acc_set_cuda_stream'
is called, the CUDA stream that was originally associated with the
'async' clause will be destroyed.  Caution should be taken when changing
the association as subsequent references to the 'async-argument' refer
to a different CUDA stream.
d2609 4
a2612 4
programs that use the Runtime library directly, or another library based
on the Runtime library, e.g., CUBLAS(1). This chapter describes the use
cases and what changes are required in order to use both the OpenACC
library and the CUBLAS and Runtime libraries within a program.
d2618 2
a2619 2
called prior to any of the functions in the OpenACC library.  More
specifically, the function 'cublasCreate()'.
d2624 5
a2628 5
returned to the caller.  The OpenACC library also requires
initialization and allocation of hardware resources.  Since the CUBLAS
library has already allocated the hardware resources for the device, all
that is left to do is to initialize the OpenACC library and acquire the
hardware resources on the host.
d2631 10
a2640 10
and allocate the host hardware resources, you need to acquire the device
number that was allocated during the call to 'cublasCreate()'.  The
invoking of the runtime library function 'cudaGetDevice()' accomplishes
this.  Once acquired, the device number is passed along with the device
type as parameters to the OpenACC library function
'acc_set_device_num()'.

   Once the call to 'acc_set_device_num()' has completed, the OpenACC
library uses the context that was created during the call to
'cublasCreate()'.  In other words, both libraries will be sharing the
d2661 1
a2661 2

                              Use Case 1
d2667 2
a2668 2
is called prior to any of the functions in the CUBLAS library.  More
specificially, the function 'acc_set_device_num()'.
d2670 1
a2670 1
   In the use case presented here, the function 'acc_set_device_num()'
d2672 3
a2674 3
resources on the host and the device.  In the call to the function, the
call parameters specify which device to use and what device type to use,
i.e., 'acc_device_nvidia'.  It should be noted that this is but one
d2676 1
a2676 1
hardware resources.  Other methods are available through the use of
d2679 1
a2679 1
   Once the call to 'acc_set_device_num()' has completed, other OpenACC
d2681 4
a2684 4
'acc_copyin()'.  In addition, calls can be made to functions in the
CUBLAS library.  In the use case a call to 'cublasCreate()' is made
subsequent to the calls to 'acc_copyin()'.  As seen in the previous use
case, a call to 'cublasCreate()' initializes the CUBLAS library and
d2686 1
a2686 1
since the device has already been allocated, 'cublasCreate()' will only
d2688 1
a2688 1
resources on the host.  The context that was created as part of the
d2730 1
a2730 2

                              Use Case 2
d2737 1
a2737 1
'ACC_DEVICE_TYPE' and 'ACC_DEVICE_NUM', respecively.  These two
d2739 2
a2740 2
'acc_set_device_num()'.  As seen in the second use case, the device type
and device number were specified using 'acc_set_device_num()'.  If
d2742 1
a2742 1
call to 'acc_set_device_num()' would not be required.
d2744 4
a2747 4
   The use of the environment variables is only relevant when an OpenACC
function is called prior to a call to 'cudaCreate()'.  If 'cudaCreate()'
is called prior to a call to an OpenACC function, then you must call
'acc_set_device_num()'(2)
d2753 2
a2754 2
Interoperability", in "CUDA Driver API", TRM-06703-001, Version 5.5, for
additional information on library interoperability.
d2756 3
a2758 3
   (2) More complete information about 'ACC_DEVICE_TYPE' and
'ACC_DEVICE_NUM' can be found in sections 4.1 and 4.2 of the OpenACC
(https://www.openacc.org) Application Programming Interface”, Version
d2767 2
a2768 2
The following sections present notes on the external ABI as presented by
libgomp.  Only maintainers should need them.
d2829 1
a2829 1
The target should implement the '__sync' builtins.
d2845 1
a2845 1
Expands to the '__sync_synchronize' builtin.
d2861 4
a2864 4
In _most_ cases we can map this directly to '__thread'.  Except that OMP
allows constructors for C++ objects.  We can either refuse to support
this (how often is it used?)  or we can implement something akin to
.ctors.
d2896 2
a2897 2
   It is not clear what to do with bare FOR or SECTION blocks.  The only
thing I can figure is that we do something like:
d2915 2
a2916 2
for the two variables, i.e.  not something you could write directly in
C. Presumably this only makes sense if the "outer" x and y are global
d2929 4
a2932 4
pointer to an array of the type of the variable, indexed by the thread's
TEAM_ID.  The thread stores its final value into the array, and after
the barrier, the master thread iterates over the array to collect the
values.
d2969 3
a2971 3
   The function needs to create the appropriate number of threads and/or
launch them from the dock.  It needs to create the team structure and
assign team ids.
d2976 1
a2976 1
'omp_in_parallel()' state.
d3028 2
a3029 2
also pull it into a local variable if we like, but since its supposed to
remain unchanged, we can also not if we like.
d3031 5
a3035 5
   If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be able
to get away with no work-sharing context at all, since we can simply
perform the arithmetic directly in each thread to divide up the
iterations.  Which would mean that we wouldn't need to call any of these
routines.
d3137 2
a3138 2
"openacc", or "openmp", or both to the keywords field in the bug report,
as appropriate.
d3148 1
a3148 1
     Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
d3176 3
a3178 3
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
d3197 10
a3206 9
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
d3243 2
a3244 2
     infringement under applicable copyright law, except executing it on
     a computer or modifying a private copy.  Propagation includes
d3258 2
a3259 2
     the extent that warranties are provided), that licensees may convey
     the work under this License, and how to view a copy of this
d3267 2
a3268 2
     for making modifications to it.  "Object code" means any non-source
     form of a work.
d3279 4
a3282 4
     Major Component, and (b) serves only to enable use of the work with
     that Major Component, or to implement a Standard Interface for
     which an implementation is available to the public in source code
     form.  A "Major Component", in this context, means a major
d3290 3
a3292 3
     work) run the object code and to modify the work, including scripts
     to control those activities.  However, it does not include the
     work's System Libraries, or general-purpose tools or generally
d3295 4
a3298 4
     Corresponding Source includes interface definition files associated
     with source files for the work, and the source code for shared
     libraries and dynamically linked subprograms that the work is
     specifically designed to require, such as by intimate data
d3315 4
a3318 4
     a covered work is covered by this License only if the output, given
     its content, constitutes a covered work.  This License acknowledges
     your rights of fair use or other equivalent, as provided by
     copyright law.
d3323 8
a3330 8
     sole purpose of having them make modifications exclusively for you,
     or provide you with facilities for running those works, provided
     that you comply with the terms of this License in conveying all
     material for which you do not control copyright.  Those thus making
     or running the covered works for you must do so exclusively on your
     behalf, under your direction and control, on terms that prohibit
     them from making any copies of your copyrighted material outside
     their relationship with you.
d3347 2
a3348 2
     with respect to the covered work, and you disclaim any intention to
     limit operation or modification of the work as a means of
d3418 2
a3419 2
          written offer, valid for at least three years and valid for as
          long as you offer spare parts or customer support for that
d3429 2
a3430 2
       c. Convey individual copies of the object code with a copy of the
          written offer to provide the Corresponding Source.  This
d3436 2
a3437 2
          place (gratis or for a charge), and offer equivalent access to
          the Corresponding Source in the same way through the same
d3441 4
a3444 4
          Corresponding Source may be on a different server (operated by
          you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to the
          object code saying where to find the Corresponding Source.
d3446 2
a3447 2
          remain obligated to ensure that it is available for as long as
          needed to satisfy these requirements.
d3454 1
d3462 2
a3463 2
     incorporation into a dwelling.  In determining whether a product is
     a consumer product, doubtful cases shall be resolved in favor of
d3494 5
a3498 5
     warranty, or updates for a work that has been modified or installed
     by the recipient, or for the User Product in which it has been
     modified or installed.  Access to a network may be denied when the
     modification itself materially and adversely affects the operation
     of the network or violates the rules and protocols for
d3528 2
a3529 2
     holders of that material) supplement the terms of this License with
     terms:
d3539 3
a3541 2
          or requiring that modified versions of such material be marked
          in reasonable ways as different from the original version; or
d3560 5
a3564 4
     contains a further restriction but permits relicensing or conveying
     under this License, you may add to a covered work material governed
     by the terms of that license document, provided that the further
     restriction does not survive such relicensing or conveying.
d3580 2
a3581 2
     under this License (including any patent licenses granted under the
     third paragraph of section 11).
d3585 2
a3586 2
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
d3598 4
a3601 4
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, you do not qualify to receive new licenses
     for the same material under section 10.
d3615 1
a3615 1
  10. Automatic Licensing of Downstream Recipients.
d3629 4
a3632 4
     could give under the previous paragraph, plus a right to possession
     of the Corresponding Source of the work from the predecessor in
     interest, if the predecessor has it or can get it with reasonable
     efforts.
d3636 6
a3641 6
     may not impose a license fee, royalty, or other charge for exercise
     of rights granted under this License, and you may not initiate
     litigation (including a cross-claim or counterclaim in a lawsuit)
     alleging that any patent claim is infringed by making, using,
     selling, offering for sale, or importing the Program or any portion
     of it.
d3643 1
a3643 1
  11. Patents.
d3663 2
a3664 2
     otherwise run, modify and propagate the contents of its contributor
     version.
d3669 3
a3671 3
     patent or covenant not to sue for patent infringement).  To "grant"
     such a patent license to a party means to make such an agreement or
     commitment not to enforce a patent against the party.
d3701 10
a3710 10
     party that is in the business of distributing software, under which
     you make payment to the third party based on the extent of your
     activity of conveying the work, and under which the third party
     grants, to any of the parties who would receive the covered work
     from you, a discriminatory patent license (a) in connection with
     copies of the covered work conveyed by you (or copies made from
     those copies), or (b) primarily for and in connection with specific
     products or compilations that contain the covered work, unless you
     entered into that arrangement, or that patent license was granted,
     prior to 28 March 2007.
d3716 1
a3716 1
  12. No Surrender of Others' Freedom.
d3718 11
a3728 10
     If conditions are imposed on you (whether by court order, agreement
     or otherwise) that contradict the conditions of this License, they
     do not excuse you from the conditions of this License.  If you
     cannot convey a covered work so as to satisfy simultaneously your
     obligations under this License and any other pertinent obligations,
     then as a consequence you may not convey it at all.  For example,
     if you agree to terms that obligate you to collect a royalty for
     further conveying from those to whom you convey the Program, the
     only way you could satisfy both those terms and this License would
     be to refrain entirely from conveying the Program.
d3730 1
a3730 1
  13. Use with the GNU Affero General Public License.
d3741 1
a3741 1
  14. Revised Versions of this License.
d3744 4
a3747 3
     versions of the GNU General Public License from time to time.  Such
     new versions will be similar in spirit to the present version, but
     may differ in detail to address new problems or concerns.
d3753 4
a3756 4
     that numbered version or of any later version published by the Free
     Software Foundation.  If the Program does not specify a version
     number of the GNU General Public License, you may choose any
     version ever published by the Free Software Foundation.
d3768 1
a3768 1
  15. Disclaimer of Warranty.
d3771 1
a3771 1
     APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
d3775 1
a3775 1
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
d3780 1
a3780 1
  16. Limitation of Liability.
d3784 2
a3785 2
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
     DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
d3793 1
a3793 1
  17. Interpretation of Sections 15 and 16.
d3802 1
d3833 1
a3833 1
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
d3842 1
a3842 1
     This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
d3844 1
a3844 1
     under certain conditions; type 'show c' for details.
d3846 1
a3846 1
   The hypothetical commands 'show w' and 'show c' should show the
d3854 1
a3854 1
the GNU GPL, see <http://www.gnu.org/licenses/>.
d3861 1
a3861 1
please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
d3872 1
a3872 1
     <http://fsf.org/>
d3897 2
a3898 2
     of subject matter or whether it is published as a printed book.  We
     recommend this License principally for works whose purpose is
d3904 2
a3905 2
     that contains a notice placed by the copyright holder saying it can
     be distributed under the terms of this License.  Such a notice
d3909 3
a3911 3
     of the public is a licensee, and is addressed as "you".  You accept
     the license if you copy, modify or distribute the work in a way
     requiring permission under copyright law.
d3929 6
a3934 6
     titles are designated, as being those of Invariant Sections, in the
     notice that says that the Document is released under this License.
     If a section does not fit the above definition of Secondary then it
     is not allowed to be designated as Invariant.  The Document may
     contain zero Invariant Sections.  If the Document does not identify
     any Invariant Sections then there are none.
d3945 10
a3954 10
     straightforwardly with generic text editors or (for images composed
     of pixels) generic paint programs or (for drawings) some widely
     available drawing editor, and that is suitable for input to text
     formatters or for automatic translation to a variety of formats
     suitable for input to text formatters.  A copy made in an otherwise
     Transparent file format whose markup, or absence of markup, has
     been arranged to thwart or discourage subsequent modification by
     readers is not Transparent.  An image format is not Transparent if
     used for any substantial amount of text.  A copy that is not
     "Transparent" is called "Opaque".
d3958 8
a3965 8
     SGML or XML using a publicly available DTD, and standard-conforming
     simple HTML, PostScript or PDF designed for human modification.
     Examples of transparent image formats include PNG, XCF and JPG.
     Opaque formats include proprietary formats that can be read and
     edited only by proprietary word processors, SGML or XML for which
     the DTD and/or processing tools are not generally available, and
     the machine-generated HTML, PostScript or PDF produced by some word
     processors for output purposes only.
d4003 2
a4004 2
     distribute a large enough number of copies you must also follow the
     conditions in section 3.
d4018 6
a4023 5
     front cover must present the full title with all words of the title
     equally prominent and visible.  You may add other material on the
     covers in addition.  Copying with changes limited to the covers, as
     long as they preserve the title of the Document and satisfy these
     conditions, can be treated as verbatim copying in other respects.
d4031 12
a4042 11
     numbering more than 100, you must either include a machine-readable
     Transparent copy along with each Opaque copy, or state in or with
     each Opaque copy a computer-network location from which the general
     network-using public has access to download using public-standard
     network protocols a complete Transparent copy of the Document, free
     of added material.  If you use the latter option, you must take
     reasonably prudent steps, when you begin distribution of Opaque
     copies in quantity, to ensure that this Transparent copy will
     remain thus accessible at the stated location until at least one
     year after the last time you distribute an Opaque copy (directly or
     through your agents or retailers) of that edition to the public.
d4045 3
a4047 3
     the Document well before redistributing any large number of copies,
     to give them a chance to provide you with an updated version of the
     Document.
d4053 5
a4057 5
     release the Modified Version under precisely this License, with the
     Modified Version filling the role of the Document, thus licensing
     distribution and modification of the Modified Version to whoever
     possesses a copy of it.  In addition, you must do these things in
     the Modified Version:
d4060 5
a4064 5
          distinct from that of the Document, and from those of previous
          versions (which should, if there were any, be listed in the
          History section of the Document).  You may use the same title
          as a previous version if the original publisher of that
          version gives permission.
d4094 6
a4099 6
          authors, and publisher of the Modified Version as given on the
          Title Page.  If there is no section Entitled "History" in the
          Document, create one stating the title, year, authors, and
          publisher of the Document as given on its Title Page, then add
          an item describing the Modified Version as stated in the
          previous sentence.
d4104 5
a4108 5
          previous versions it was based on.  These may be placed in the
          "History" section.  You may omit a network location for a work
          that was published at least four years before the Document
          itself, or if the original publisher of the version it refers
          to gives permission.
d4111 2
a4112 2
          Preserve the Title of the section, and preserve in the section
          all the substance and tone of each of the contributor
d4115 4
a4118 3
       L. Preserve all the Invariant Sections of the Document, unaltered
          in their text and in their titles.  Section numbers or the
          equivalent are not considered part of the section titles.
d4131 5
a4135 5
     material copied from the Document, you may at your option designate
     some or all of these sections as invariant.  To do this, add their
     titles to the list of Invariant Sections in the Modified Version's
     license notice.  These titles must be distinct from any other
     section titles.
d4144 9
a4152 9
     and a passage of up to 25 words as a Back-Cover Text, to the end of
     the list of Cover Texts in the Modified Version.  Only one passage
     of Front-Cover Text and one of Back-Cover Text may be added by (or
     through arrangements made by) any one entity.  If the Document
     already includes a cover text for the same cover, previously added
     by you or by arrangement made by the same entity you are acting on
     behalf of, you may not add another; but you may replace the old
     one, on explicit permission from the previous publisher that added
     the old one.
d4162 2
a4163 2
     modified versions, provided that you include in the combination all
     of the Invariant Sections of all of the original documents,
d4190 2
a4191 2
     rules of this License for verbatim copying of each of the documents
     in all other respects.
d4195 3
a4197 3
     a copy of this License into the extracted document, and follow this
     License in all other respects regarding verbatim copying of that
     document.
d4202 2
a4203 2
     separate and independent documents or works, in or on a volume of a
     storage or distribution medium, is called an "aggregate" if the
d4248 2
a4249 2
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
d4261 4
a4264 4
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, receipt of a copy of some or all of the
     same material does not give you any rights to use it.
d4266 1
a4266 1
  10. FUTURE REVISIONS OF THIS LICENSE
d4272 1
a4272 1
     <http://www.gnu.org/copyleft/>.
d4279 5
a4283 5
     published (not as a draft) by the Free Software Foundation.  If the
     Document does not specify a version number of this License, you may
     choose any version ever published (not as a draft) by the Free
     Software Foundation.  If the Document specifies that a proxy can
     decide which future versions of this License can be used, that
d4287 1
a4287 1
  11. RELICENSING
d4317 1
d4334 1
a4334 1
Texts, replace the "with...Texts."  line with this:
d4345 3
a4347 3
recommend releasing these examples in parallel under your choice of free
software license, such as the GNU General Public License, to permit
their use in free software.
d4377 2
a4378 2
can greatly alter what fraction of the sales price counts as profit.  If
the price you pay is $50, ten percent of the profit is probably less
d4388 2
a4389 2
ports such as adding a new CPU to the GNU Compiler Collection contribute
more; major new features or packages contribute the most.
d4408 19
d4428 1
a4428 18
* Environment Variable <1>:              OMP_DISPLAY_ENV.       (line 6)
* Environment Variable <2>:              OMP_DEFAULT_DEVICE.    (line 6)
* Environment Variable <3>:              OMP_DYNAMIC.           (line 6)
* Environment Variable <4>:              OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable <5>:              OMP_MAX_TASK_PRIORITY. (line 6)
* Environment Variable <6>:              OMP_NESTED.            (line 6)
* Environment Variable <7>:              OMP_NUM_THREADS.       (line 6)
* Environment Variable <8>:              OMP_PROC_BIND.         (line 6)
* Environment Variable <9>:              OMP_PLACES.            (line 6)
* Environment Variable <10>:             OMP_STACKSIZE.         (line 6)
* Environment Variable <11>:             OMP_SCHEDULE.          (line 6)
* Environment Variable <12>:             OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <13>:             OMP_WAIT_POLICY.       (line 6)
* Environment Variable <14>:             GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <15>:             GOMP_DEBUG.            (line 6)
* Environment Variable <16>:             GOMP_STACKSIZE.        (line 6)
* Environment Variable <17>:             GOMP_SPINCOUNT.        (line 6)
* Environment Variable <18>:             GOMP_RTEMS_THREAD_POOLS.
d4430 1
a4430 1
* FDL, GNU Free Documentation License:   GNU Free Documentation License.
d4432 4
a4436 6
* Implementation specific setting <1>:   OMP_NUM_THREADS.       (line 6)
* Implementation specific setting <2>:   OMP_SCHEDULE.          (line 6)
* Implementation specific setting <3>:   GOMP_STACKSIZE.        (line 6)
* Implementation specific setting <4>:   GOMP_SPINCOUNT.        (line 6)
* Implementation specific setting <5>:   GOMP_RTEMS_THREAD_POOLS.
                                                                (line 6)
d4442 131
a4572 131
Node: Top2083
Node: Enabling OpenMP4489
Node: Runtime Library Routines5276
Node: omp_get_active_level8339
Node: omp_get_ancestor_thread_num9039
Node: omp_get_cancellation9969
Node: omp_get_default_device10783
Node: omp_get_dynamic11459
Node: omp_get_level12334
Node: omp_get_max_active_levels12954
Node: omp_get_max_task_priority13659
Node: omp_get_max_threads14279
Node: omp_get_nested15036
Node: omp_get_num_devices15950
Node: omp_get_num_procs16471
Node: omp_get_num_teams17010
Node: omp_get_num_threads17526
Node: omp_get_proc_bind18615
Node: omp_get_schedule19536
Node: omp_get_team_num20490
Node: omp_get_team_size20989
Node: omp_get_thread_limit21949
Node: omp_get_thread_num22568
Node: omp_in_parallel23439
Node: omp_in_final24088
Node: omp_is_initial_device24762
Node: omp_set_default_device25455
Node: omp_set_dynamic26246
Node: omp_set_max_active_levels27132
Node: omp_set_nested27909
Node: omp_set_num_threads28801
Node: omp_set_schedule29669
Node: omp_init_lock30750
Node: omp_set_lock31403
Node: omp_test_lock32258
Node: omp_unset_lock33234
Node: omp_destroy_lock34165
Node: omp_init_nest_lock34842
Node: omp_set_nest_lock35577
Node: omp_test_nest_lock36492
Node: omp_unset_nest_lock37519
Node: omp_destroy_nest_lock38534
Node: omp_get_wtick39285
Node: omp_get_wtime39877
Node: Environment Variables40653
Node: OMP_CANCELLATION42208
Node: OMP_DISPLAY_ENV42741
Node: OMP_DEFAULT_DEVICE43444
Node: OMP_DYNAMIC44224
Node: OMP_MAX_ACTIVE_LEVELS44820
Node: OMP_MAX_TASK_PRIORITY45470
Node: OMP_NESTED46128
Node: OMP_NUM_THREADS46733
Node: OMP_PROC_BIND47421
Node: OMP_PLACES48613
Node: OMP_STACKSIZE50790
Node: OMP_SCHEDULE51614
Node: OMP_THREAD_LIMIT52312
Node: OMP_WAIT_POLICY52912
Node: GOMP_CPU_AFFINITY53604
Node: GOMP_DEBUG55334
Node: GOMP_STACKSIZE55841
Node: GOMP_SPINCOUNT56670
Node: GOMP_RTEMS_THREAD_POOLS57874
Node: Enabling OpenACC60052
Node: OpenACC Runtime Library Routines61045
Node: acc_get_num_devices64839
Node: acc_set_device_type65565
Node: acc_get_device_type66329
Node: acc_set_device_num67044
Node: acc_get_device_num67828
Node: acc_async_test68625
Node: acc_async_test_all69617
Node: acc_wait70517
Node: acc_wait_all71379
Node: acc_wait_all_async72138
Node: acc_wait_async72890
Node: acc_init73597
Node: acc_shutdown74243
Node: acc_on_device74911
Node: acc_malloc75915
Node: acc_free76414
Node: acc_copyin76841
Node: acc_present_or_copyin77951
Node: acc_create79577
Node: acc_present_or_create80732
Node: acc_copyout82366
Node: acc_delete83389
Node: acc_update_device84364
Node: acc_update_self85476
Node: acc_map_data86580
Node: acc_unmap_data87265
Node: acc_deviceptr87786
Node: acc_hostptr88356
Node: acc_is_present88920
Node: acc_memcpy_to_device90447
Node: acc_memcpy_from_device91110
Node: acc_get_current_cuda_device91794
Node: acc_get_current_cuda_context92391
Node: acc_get_cuda_stream92985
Node: acc_set_cuda_stream93541
Node: OpenACC Environment Variables94073
Node: ACC_DEVICE_TYPE94532
Node: ACC_DEVICE_NUM94768
Node: GCC_ACC_NOTIFY95025
Node: CUDA Streams Usage95248
Ref: CUDA Streams Usage-Footnote-197148
Node: OpenACC Library Interoperability97257
Ref: OpenACC Library Interoperability-Footnote-1103613
Ref: OpenACC Library Interoperability-Footnote-2103865
Node: The libgomp ABI104073
Node: Implementing MASTER construct104929
Node: Implementing CRITICAL construct105343
Node: Implementing ATOMIC construct106082
Node: Implementing FLUSH construct106563
Node: Implementing BARRIER construct106834
Node: Implementing THREADPRIVATE construct107103
Node: Implementing PRIVATE clause107756
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses108337
Node: Implementing REDUCTION clause109661
Node: Implementing PARALLEL construct110218
Node: Implementing FOR construct111475
Node: Implementing ORDERED construct113473
Node: Implementing SECTIONS construct113779
Node: Implementing SINGLE construct114545
Node: Implementing OpenACC's PARALLEL construct115257
Node: Reporting Bugs115515
Node: Copying115877
Node: GNU Free Documentation License153424
Node: Funding178547
Node: Library Index181073
@


1.8.2.1
log
@Sync with HEAD, resolve a couple of conflicts
@
text
@d1 2
a2 2
This is libgomp.info, produced by makeinfo version 6.4 from
libgomp.texi.
d21 3
a23 2
software.  Copies published by the Free Software Foundation raise funds
for GNU development.
d54 2
a55 2
software.  Copies published by the Free Software Foundation raise funds
for GNU development.
d63 5
a67 5
This manual documents the usage of libgomp, the GNU Offloading and Multi
Processing Runtime Library.  This includes the GNU implementation of the
OpenMP (http://www.openmp.org) Application Programming Interface (API)
for multi-platform shared-memory parallel programming in C/C++ and
Fortran, and the GNU implementation of the OpenACC
d111 11
a121 10
compile-time flag '-fopenmp' must be specified.  This enables the OpenMP
directive '#pragma omp' in C/C++ and '!$omp' directives in free form,
'c$omp', '*$omp' and '!$omp' directives in fixed form, '!$' conditional
compilation sentinels in free form and 'c$', '*$' and '!$' sentinels in
fixed form, for Fortran.  The flag also arranges for automatic linking
of the OpenMP runtime library (*note Runtime Library Routines::).

   A complete description of all OpenMP directives accepted may be found
in the OpenMP Application Program Interface (http://www.openmp.org)
manual, version 4.5.
d189 1
a189 1
2.1 'omp_get_active_level' - Number of parallel regions
d197 1
a197 1
     _Prototype_:   'int omp_get_active_level(void);'
d200 1
a200 1
     _Interface_:   'integer function omp_get_active_level()'
d212 1
a212 1
2.2 'omp_get_ancestor_thread_num' - Ancestor thread ID
d218 2
a219 2
     outside zero to 'omp_get_level' -1 is returned; if LEVEL is
     'omp_get_level' the result is identical to 'omp_get_thread_num'.
d222 1
a222 1
     _Prototype_:   'int omp_get_ancestor_thread_num(int level);'
d225 2
a226 2
     _Interface_:   'integer function omp_get_ancestor_thread_num(level)'
                    'integer level'
d238 1
a238 1
2.3 'omp_get_cancellation' - Whether cancellation support is enabled
d242 3
a244 3
     This function returns 'true' if cancellation is activated, 'false'
     otherwise.  Here, 'true' and 'false' represent their
     language-specific counterparts.  Unless 'OMP_CANCELLATION' is set
d248 1
a248 1
     _Prototype_:   'int omp_get_cancellation(void);'
d251 1
a251 1
     _Interface_:   'logical function omp_get_cancellation()'
d262 1
a262 1
2.4 'omp_get_default_device' - Get the default device for target regions
d269 1
a269 1
     _Prototype_:   'int omp_get_default_device(void);'
d272 1
a272 1
     _Interface_:   'integer function omp_get_default_device()'
d283 1
a283 1
2.5 'omp_get_dynamic' - Dynamic teams setting
d287 2
a288 2
     This function returns 'true' if enabled, 'false' otherwise.  Here,
     'true' and 'false' represent their language-specific counterparts.
d291 3
a293 3
     'OMP_DYNAMIC' environment variable or at runtime using
     'omp_set_dynamic'.  If undefined, dynamic adjustment is disabled by
     default.
d296 1
a296 1
     _Prototype_:   'int omp_get_dynamic(void);'
d299 1
a299 1
     _Interface_:   'logical function omp_get_dynamic()'
d310 1
a310 1
2.6 'omp_get_level' - Obtain the current nesting level
d318 1
a318 1
     _Prototype_:   'int omp_get_level(void);'
d321 1
a321 1
     _Interface_:   'integer function omp_level()'
d332 1
a332 1
2.7 'omp_get_max_active_levels' - Maximum number of active regions
d340 1
a340 1
     _Prototype_:   'int omp_get_max_active_levels(void);'
d343 1
a343 1
     _Interface_:   'integer function omp_get_max_active_levels()'
d354 1
a354 1
2.8 'omp_get_max_task_priority' - Maximum priority value
d363 1
a363 1
     _Prototype_:   'int omp_get_max_task_priority(void);'
d366 1
a366 1
     _Interface_:   'integer function omp_get_max_task_priority()'
d374 1
a374 1
2.9 'omp_get_max_threads' - Maximum number of threads of parallel region
d379 1
a379 1
     region that does not use the clause 'num_threads'.
d382 1
a382 1
     _Prototype_:   'int omp_get_max_threads(void);'
d385 1
a385 1
     _Interface_:   'integer function omp_get_max_threads()'
d397 1
a397 1
2.10 'omp_get_nested' - Nested parallel regions
d401 2
a402 2
     This function returns 'true' if nested parallel regions are
     enabled, 'false' otherwise.  Here, 'true' and 'false' represent
d406 2
a407 2
     'OMP_NESTED' environment variable or at runtime using
     'omp_set_nested'.  If undefined, nested parallel regions are
d411 1
a411 1
     _Prototype_:   'int omp_get_nested(void);'
d414 1
a414 1
     _Interface_:   'logical function omp_get_nested()'
d425 1
a425 1
2.11 'omp_get_num_devices' - Number of target devices
d432 1
a432 1
     _Prototype_:   'int omp_get_num_devices(void);'
d435 1
a435 1
     _Interface_:   'integer function omp_get_num_devices()'
d443 1
a443 1
2.12 'omp_get_num_procs' - Number of processors online
d450 1
a450 1
     _Prototype_:   'int omp_get_num_procs(void);'
d453 1
a453 1
     _Interface_:   'integer function omp_get_num_procs()'
d461 1
a461 1
2.13 'omp_get_num_teams' - Number of teams
d468 1
a468 1
     _Prototype_:   'int omp_get_num_teams(void);'
d471 1
a471 1
     _Interface_:   'integer function omp_get_num_teams()'
d479 1
a479 1
2.14 'omp_get_num_threads' - Size of the active team
d483 2
a484 2
     Returns the number of threads in the current team.  In a sequential
     section of the program 'omp_get_num_threads' returns 1.
d487 5
a491 5
     'OMP_NUM_THREADS' environment variable.  At runtime, the size of
     the current team may be set either by the 'NUM_THREADS' clause or
     by 'omp_set_num_threads'.  If none of the above were used to define
     a specific value and 'OMP_DYNAMIC' is disabled, one thread per CPU
     online is used.
d494 1
a494 1
     _Prototype_:   'int omp_get_num_threads(void);'
d497 1
a497 1
     _Interface_:   'integer function omp_get_num_threads()'
d509 1
a509 1
2.15 'omp_get_proc_bind' - Whether theads may be moved between CPUs
d513 5
a517 5
     This functions returns the currently active thread affinity policy,
     which is set via 'OMP_PROC_BIND'.  Possible values are
     'omp_proc_bind_false', 'omp_proc_bind_true',
     'omp_proc_bind_master', 'omp_proc_bind_close' and
     'omp_proc_bind_spread'.
d520 1
a520 1
     _Prototype_:   'omp_proc_bind_t omp_get_proc_bind(void);'
d523 2
a524 2
     _Interface_:   'integer(kind=omp_proc_bind_kind) function
                    omp_get_proc_bind()'
d536 1
a536 1
2.16 'omp_get_schedule' - Obtain the runtime scheduling method
d541 2
a542 2
     set to the value 'omp_sched_static', 'omp_sched_dynamic',
     'omp_sched_guided' or 'omp_sched_auto'.  The second argument,
d546 2
a547 2
     _Prototype_:   'void omp_get_schedule(omp_sched_t *kind, int
                    *chunk_size);'
d550 3
a552 3
     _Interface_:   'subroutine omp_get_schedule(kind, chunk_size)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer chunk_size'
d563 1
a563 1
2.17 'omp_get_team_num' - Get team number
d570 1
a570 1
     _Prototype_:   'int omp_get_team_num(void);'
d573 1
a573 1
     _Interface_:   'integer function omp_get_team_num()'
d581 1
a581 1
2.18 'omp_get_team_size' - Number of threads in a team
d587 3
a589 3
     values of LEVEL outside zero to 'omp_get_level', -1 is returned; if
     LEVEL is zero, 1 is returned, and for 'omp_get_level', the result
     is identical to 'omp_get_num_threads'.
d592 1
a592 1
     _Prototype_:   'int omp_get_team_size(int level);'
d595 2
a596 2
     _Interface_:   'integer function omp_get_team_size(level)'
                    'integer level'
d608 1
a608 1
2.19 'omp_get_thread_limit' - Maximum number of threads
d615 1
a615 1
     _Prototype_:   'int omp_get_thread_limit(void);'
d618 1
a618 1
     _Interface_:   'integer function omp_get_thread_limit()'
d629 1
a629 1
2.20 'omp_get_thread_num' - Current thread ID
d634 4
a637 4
     team.  In a sequential parts of the program, 'omp_get_thread_num'
     always returns 0.  In parallel regions the return value varies from
     0 to 'omp_get_num_threads'-1 inclusive.  The return value of the
     master thread of a team is always 0.
d640 1
a640 1
     _Prototype_:   'int omp_get_thread_num(void);'
d643 1
a643 1
     _Interface_:   'integer function omp_get_thread_num()'
d654 1
a654 1
2.21 'omp_in_parallel' - Whether a parallel region is active
d658 2
a659 2
     This function returns 'true' if currently running in parallel,
     'false' otherwise.  Here, 'true' and 'false' represent their
d663 1
a663 1
     _Prototype_:   'int omp_in_parallel(void);'
d666 1
a666 1
     _Interface_:   'logical function omp_in_parallel()'
d674 1
a674 1
2.22 'omp_in_final' - Whether in final or included task region
d678 2
a679 2
     This function returns 'true' if currently running in a final or
     included task region, 'false' otherwise.  Here, 'true' and 'false'
d683 1
a683 1
     _Prototype_:   'int omp_in_final(void);'
d686 1
a686 1
     _Interface_:   'logical function omp_in_final()'
d694 1
a694 1
2.23 'omp_is_initial_device' - Whether executing on the host device
d698 2
a699 2
     This function returns 'true' if currently running on the host
     device, 'false' otherwise.  Here, 'true' and 'false' represent
d703 1
a703 1
     _Prototype_:   'int omp_is_initial_device(void);'
d706 1
a706 1
     _Interface_:   'logical function omp_is_initial_device()'
d714 1
a714 1
2.24 'omp_set_default_device' - Set the default device for target regions
d722 1
a722 1
     _Prototype_:   'void omp_set_default_device(int device_num);'
d725 2
a726 2
     _Interface_:   'subroutine omp_set_default_device(device_num)'
                    'integer device_num'
d737 1
a737 1
2.25 'omp_set_dynamic' - Enable/disable dynamic teams
d743 2
a744 2
     of 'true' and 'false', where 'true' enables dynamic adjustment of
     team sizes and 'false' disables it.
d747 1
a747 1
     _Prototype_:   'void omp_set_dynamic(int dynamic_threads);'
d750 2
a751 2
     _Interface_:   'subroutine omp_set_dynamic(dynamic_threads)'
                    'logical, intent(in) :: dynamic_threads'
d762 1
a762 1
2.26 'omp_set_max_active_levels' - Limits the number of active parallel regions
d770 1
a770 1
     _Prototype_:   'void omp_set_max_active_levels(int max_levels);'
d773 2
a774 2
     _Interface_:   'subroutine omp_set_max_active_levels(max_levels)'
                    'integer max_levels'
d785 1
a785 1
2.27 'omp_set_nested' - Enable/disable nested parallel regions
d791 2
a792 2
     language-specific equivalent of 'true' and 'false', where 'true'
     enables dynamic adjustment of team sizes and 'false' disables it.
d795 1
a795 1
     _Prototype_:   'void omp_set_nested(int nested);'
d798 2
a799 2
     _Interface_:   'subroutine omp_set_nested(nested)'
                    'logical, intent(in) :: nested'
d810 1
a810 1
2.28 'omp_set_num_threads' - Set upper team size limit
d815 2
a816 2
     parallel sections, if those do not specify a 'num_threads' clause.
     The argument of 'omp_set_num_threads' shall be a positive integer.
d819 1
a819 1
     _Prototype_:   'void omp_set_num_threads(int num_threads);'
d822 2
a823 2
     _Interface_:   'subroutine omp_set_num_threads(num_threads)'
                    'integer, intent(in) :: num_threads'
d835 1
a835 1
2.29 'omp_set_schedule' - Set the runtime scheduling method
d840 2
a841 2
     value 'omp_sched_static', 'omp_sched_dynamic', 'omp_sched_guided'
     or 'omp_sched_auto'.  Except for 'omp_sched_auto', the chunk size
d843 1
a843 1
     value if zero or negative.  For 'omp_sched_auto' the CHUNK_SIZE
d847 2
a848 2
     _Prototype_:   'void omp_set_schedule(omp_sched_t kind, int
                    chunk_size);'
d851 3
a853 3
     _Interface_:   'subroutine omp_set_schedule(kind, chunk_size)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer chunk_size'
d864 1
a864 1
2.30 'omp_init_lock' - Initialize simple lock
d872 1
a872 1
     _Prototype_:   'void omp_init_lock(omp_lock_t *lock);'
d875 2
a876 2
     _Interface_:   'subroutine omp_init_lock(svar)'
                    'integer(omp_lock_kind), intent(out) :: svar'
d887 1
a887 1
2.31 'omp_set_lock' - Wait for and set simple lock
d891 4
a894 4
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  The calling thread is blocked until the lock
     is available.  If the lock is already held by the current thread, a
     deadlock occurs.
d897 1
a897 1
     _Prototype_:   'void omp_set_lock(omp_lock_t *lock);'
d900 2
a901 2
     _Interface_:   'subroutine omp_set_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d913 1
a913 1
2.32 'omp_test_lock' - Test and set simple lock if available
d917 5
a921 5
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  Contrary to 'omp_set_lock', 'omp_test_lock'
     does not block if the lock is not available.  This function returns
     'true' upon success, 'false' otherwise.  Here, 'true' and 'false'
     represent their language-specific counterparts.
d924 1
a924 1
     _Prototype_:   'int omp_test_lock(omp_lock_t *lock);'
d927 2
a928 2
     _Interface_:   'logical function omp_test_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d939 1
a939 1
2.33 'omp_unset_lock' - Unset simple lock
d944 4
a947 4
     'omp_set_lock' or 'omp_test_lock' before.  In addition, the lock
     must be held by the thread calling 'omp_unset_lock'.  Then, the
     lock becomes unlocked.  If one or more threads attempted to set the
     lock before, one of them is chosen to, again, set the lock to
d951 1
a951 1
     _Prototype_:   'void omp_unset_lock(omp_lock_t *lock);'
d954 2
a955 2
     _Interface_:   'subroutine omp_unset_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d966 1
a966 1
2.34 'omp_destroy_lock' - Destroy simple lock
d974 1
a974 1
     _Prototype_:   'void omp_destroy_lock(omp_lock_t *lock);'
d977 2
a978 2
     _Interface_:   'subroutine omp_destroy_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d989 1
a989 1
2.35 'omp_init_nest_lock' - Initialize nested lock
d997 1
a997 1
     _Prototype_:   'void omp_init_nest_lock(omp_nest_lock_t *lock);'
d1000 2
a1001 2
     _Interface_:   'subroutine omp_init_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(out) :: nvar'
d1012 1
a1012 1
2.36 'omp_set_nest_lock' - Wait for and set nested lock
d1016 5
a1020 4
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  The calling thread is blocked until the
     lock is available.  If the lock is already held by the current
     thread, the nesting count for the lock is incremented.
d1023 1
a1023 1
     _Prototype_:   'void omp_set_nest_lock(omp_nest_lock_t *lock);'
d1026 2
a1027 2
     _Interface_:   'subroutine omp_set_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1038 1
a1038 1
2.37 'omp_test_nest_lock' - Test and set nested lock if available
d1042 6
a1047 5
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  Contrary to 'omp_set_nest_lock',
     'omp_test_nest_lock' does not block if the lock is not available.
     If the lock is already held by the current thread, the new nesting
     count is returned.  Otherwise, the return value equals zero.
d1050 1
a1050 1
     _Prototype_:   'int omp_test_nest_lock(omp_nest_lock_t *lock);'
d1053 2
a1054 2
     _Interface_:   'logical function omp_test_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1065 1
a1065 1
2.38 'omp_unset_nest_lock' - Unset nested lock
d1070 1
a1070 1
     'omp_set_nested_lock' or 'omp_test_nested_lock' before.  In
d1072 1
a1072 1
     'omp_unset_nested_lock'.  If the nesting count drops to zero, the
d1078 1
a1078 1
     _Prototype_:   'void omp_unset_nest_lock(omp_nest_lock_t *lock);'
d1081 2
a1082 2
     _Interface_:   'subroutine omp_unset_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1093 1
a1093 1
2.39 'omp_destroy_nest_lock' - Destroy nested lock
d1102 1
a1102 1
     _Prototype_:   'void omp_destroy_nest_lock(omp_nest_lock_t *);'
d1105 2
a1106 2
     _Interface_:   'subroutine omp_destroy_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1117 1
a1117 1
2.40 'omp_get_wtick' - Get timer precision
d1125 1
a1125 1
     _Prototype_:   'double omp_get_wtick(void);'
d1128 1
a1128 1
     _Interface_:   'double precision function omp_get_wtick()'
d1139 1
a1139 1
2.41 'omp_get_wtime' - Elapsed wall clock time
d1150 1
a1150 1
     _Prototype_:   'double omp_get_wtime(void);'
d1153 1
a1153 1
     _Interface_:   'double precision function omp_get_wtime()'
d1167 1
a1167 1
The environment variables which beginning with 'OMP_' are defined by
d1169 1
a1169 1
beginning with 'GOMP_' are GNU extensions.
d1196 1
a1196 1
3.1 'OMP_CANCELLATION' - Set whether cancellation is activated
d1200 3
a1202 3
     If set to 'TRUE', the cancellation is activated.  If set to 'FALSE'
     or if unset, cancellation is disabled and the 'cancel' construct is
     ignored.
d1213 1
a1213 1
3.2 'OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
d1217 1
a1217 1
     If set to 'TRUE', the OpenMP version number and the values
d1219 1
a1219 1
     'stderr'.  If set to 'VERBOSE', it additionally shows the value of
d1221 1
a1221 1
     or set to 'FALSE', this information will not be shown.
d1229 1
a1229 1
3.3 'OMP_DEFAULT_DEVICE' - Set the device used in target regions
d1233 5
a1237 5
     Set to choose the device which is used in a 'target' region, unless
     the value is overridden by 'omp_set_default_device' or by a
     'device' clause.  The value shall be the nonnegative device number.
     If no device with the given device number exists, the code is
     executed on the host.  If unset, device number 0 will be used.
d1248 1
a1248 1
3.4 'OMP_DYNAMIC' - Dynamic adjustment of threads
d1254 2
a1255 2
     'TRUE' or 'FALSE'.  If undefined, dynamic adjustment is disabled by
     default.
d1266 1
a1266 1
3.5 'OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1283 1
a1283 1
3.6 'OMP_MAX_TASK_PRIORITY' - Set the maximum priority
d1286 1
a1286 1
number that can be set for a task.
d1288 2
a1289 2
     Specifies the initial value for the maximum priority value that can
     be set for a task.  The value of this variable shall be a
d1302 1
a1302 1
3.7 'OMP_NESTED' - Nested parallel regions
d1308 1
a1308 1
     environment variable shall be 'TRUE' or 'FALSE'.  If undefined,
d1320 1
a1320 1
3.8 'OMP_NUM_THREADS' - Specifies the number of threads to use
d1324 5
a1328 5
     Specifies the default number of threads to use in parallel regions.
     The value of this variable shall be a comma-separated list of
     positive integers; the value specified the number of threads to use
     for the corresponding nested level.  If undefined one thread per
     CPU is used.
d1339 1
a1339 1
3.9 'OMP_PROC_BIND' - Whether theads may be moved between CPUs
d1344 1
a1344 1
     to 'TRUE', OpenMP theads should not be moved; if set to 'FALSE'
d1346 1
a1346 1
     values 'MASTER', 'CLOSE' and 'SPREAD' can be used to specify the
d1348 3
a1350 3
     'MASTER' the worker threads are in the same place partition as the
     master thread.  With 'CLOSE' those are kept close to the master
     thread in contiguous place partitions.  And with 'SPREAD' a sparse
d1353 2
a1354 2
     When undefined, 'OMP_PROC_BIND' defaults to 'TRUE' when
     'OMP_PLACES' or 'GOMP_CPU_AFFINITY' is set and 'FALSE' otherwise.
d1366 1
a1366 1
3.10 'OMP_PLACES' - Specifies on which CPUs the theads should be placed
d1370 3
a1372 3
     The thread placement can be either specified using an abstract name
     or by an explicit list of the places.  The abstract names
     'threads', 'cores' and 'sockets' can be optionally followed by a
d1374 3
a1376 3
     shall be created.  With 'threads' each place corresponds to a
     single hardware thread; 'cores' to a single core with the
     corresponding number of hardware threads; and with 'sockets' the
d1378 1
a1378 1
     be shown by setting the 'OMP_DISPLAY_ENV' environment variable.
d1391 2
a1392 2
     specifies the same places list: '"{0,1,2}, {3,4,6}, {7,8,9},
     {10,11,12}"'; '"{0:3}, {3:3}, {7:3}, {10:3}"'; and '"{0:2}:4:3"'.
d1394 2
a1395 2
     If 'OMP_PLACES' and 'GOMP_CPU_AFFINITY' are unset and
     'OMP_PROC_BIND' is either unset or 'false', threads may be moved
d1408 1
a1408 1
3.11 'OMP_STACKSIZE' - Set default thread stack size
d1413 7
a1419 7
     is suffixed by 'B', 'K', 'M' or 'G', in which case the size is,
     respectively, in bytes, kilobytes, megabytes or gigabytes.  This is
     different from 'pthread_attr_setstacksize' which gets the number of
     bytes as an argument.  If the stack size cannot be set due to
     system constraints, an error is reported and the initial stack size
     is left unchanged.  If undefined, the stack size is system
     dependent.
d1427 1
a1427 1
3.12 'OMP_SCHEDULE' - How threads are scheduled
d1431 5
a1435 5
     Allows to specify 'schedule type' and 'chunk size'.  The value of
     the variable shall have the form: 'type[,chunk]' where 'type' is
     one of 'static', 'dynamic', 'guided' or 'auto' The optional 'chunk'
     size shall be a positive integer.  If undefined, dynamic scheduling
     and a chunk size of 1 is used.
d1447 1
a1447 1
3.13 'OMP_THREAD_LIMIT' - Set the maximum number of threads
d1464 1
a1464 1
3.14 'OMP_WAIT_POLICY' - How waiting threads are handled
d1469 2
a1470 2
     the value is 'PASSIVE', waiting threads should not consume CPU
     power while waiting; while the value is 'ACTIVE' specifies that
d1483 1
a1483 1
3.15 'GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d1491 2
a1492 2
     (M-N:S). CPU numbers are zero based.  For example,
     'GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
d1496 1
a1496 1
     beginning of the list.  'GOMP_CPU_AFFINITY=0' binds all threads to
d1501 10
a1510 10
     language-specific library functions, e.g., 'getenv' in C or
     'GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
     setting of the 'GOMP_CPU_AFFINITY' environment variable.  A defined
     CPU affinity on startup cannot be changed or disabled during the
     runtime of the application.

     If both 'GOMP_CPU_AFFINITY' and 'OMP_PROC_BIND' are set,
     'OMP_PROC_BIND' has a higher precedence.  If neither has been set
     and 'OMP_PROC_BIND' is unset, or when 'OMP_PROC_BIND' is set to
     'FALSE', the host system will handle the assignment of threads to
d1519 1
a1519 1
3.16 'GOMP_DEBUG' - Enable debugging output
d1523 2
a1524 2
     Enable debugging output.  The variable should be set to '0'
     (disabled, also the default if not set), or '1' (enabled).
d1533 1
a1533 1
3.17 'GOMP_STACKSIZE' - Set default thread stack size
d1538 1
a1538 1
     from 'pthread_attr_setstacksize' which gets the number of bytes as
d1555 1
a1555 1
3.18 'GOMP_SPINCOUNT' - Set the busy-wait spin count
d1561 1
a1561 1
     value may be either 'INFINITE', 'INFINITY' to always wait actively
d1564 9
a1572 8
     suffixes acting as multiplication factors: 'k' (kilo, thousand),
     'M' (mega, million), 'G' (giga, billion), or 'T' (tera, trillion).
     If undefined, 0 is used when 'OMP_WAIT_POLICY' is 'PASSIVE',
     300,000 is used when 'OMP_WAIT_POLICY' is undefined and 30 billion
     is used when 'OMP_WAIT_POLICY' is 'ACTIVE'.  If there are more
     OpenMP threads than available CPUs, 1000 and 100 spins are used for
     'OMP_WAIT_POLICY' being 'ACTIVE' or undefined, respectively; unless
     the 'GOMP_SPINCOUNT' is lower or 'OMP_WAIT_POLICY' is 'PASSIVE'.
d1580 1
a1580 1
3.19 'GOMP_RTEMS_THREAD_POOLS' - Set the RTEMS specific thread pools
d1586 4
a1589 4
     thread pools.  The format for 'GOMP_RTEMS_THREAD_POOLS' is a list
     of optional '<thread-pool-count>[$<priority>]@@<scheduler-name>'
     configurations separated by ':' where:
        * '<thread-pool-count>' is the thread pool count for this
d1591 3
a1593 2
        * '$<priority>' is an optional priority for the worker threads
          of a thread pool according to 'pthread_setschedparam'.  In
d1599 2
a1600 1
        * '@@<scheduler-name>' is the scheduler instance name according
d1603 5
a1607 4
     instance, then each OpenMP master thread of this scheduler instance
     will use its own dynamically allocated thread pool.  To limit the
     worker thread count of the thread pools, each OpenMP master thread
     must call 'omp_set_num_threads'.
d1609 2
a1610 2
     Lets suppose we have three scheduler instances 'IO', 'WRK0', and
     'WRK1' with 'GOMP_RTEMS_THREAD_POOLS' set to '"1@@WRK0:3$4@@WRK1"'.
d1612 1
a1612 1
     'IO'.  In the scheduler instance 'WRK0' there is one thread pool
d1615 3
a1617 3
     master thread that created it.  In the scheduler instance 'WRK1'
     there are three thread pools available and their worker threads run
     at priority four.
d1626 4
a1629 4
compile-time flag '-fopenacc' must be specified.  This enables the
OpenACC directive '#pragma acc' in C/C++ and '!$accp' directives in free
form, 'c$acc', '*$acc' and '!$acc' directives in fixed form, '!$'
conditional compilation sentinels in free form and 'c$', '*$' and '!$'
d1639 2
a1640 2
future versions of GCC. See <https://gcc.gnu.org/wiki/OpenACC> for more
information.
d1650 3
a1652 3
throw exceptions.  Generally, they are available only for the host, with
the exception of 'acc_on_device', which is available for both the host
and the acceleration device.
d1715 1
a1715 1
5.1 'acc_get_num_devices' - Get number of devices for given device type
d1723 1
a1723 1
     _Prototype_:   'int acc_get_num_devices(acc_device_t devicetype);'
d1726 2
a1727 2
     _Interface_:   'integer function acc_get_num_devices(devicetype)'
                    'integer(kind=acc_device_kind) devicetype'
d1736 1
a1736 1
5.2 'acc_set_device_type' - Set type of device accelerator to use.
d1745 1
a1745 1
     _Prototype_:   'acc_set_device_type(acc_device_t devicetype);'
d1748 2
a1749 2
     _Interface_:   'subroutine acc_set_device_type(devicetype)'
                    'integer(kind=acc_device_kind) devicetype'
d1758 1
a1758 1
5.3 'acc_get_device_type' - Get type of device accelerator to be used.
d1766 1
a1766 1
     _Prototype_:   'acc_device_t acc_get_device_type(void);'
d1769 2
a1770 2
     _Interface_:   'function acc_get_device_type(void)'
                    'integer(kind=acc_device_kind) acc_get_device_type'
d1779 1
a1779 1
5.4 'acc_set_device_num' - Set device number to use.
d1788 2
a1789 1
     _Prototype_:   'acc_set_device_num(int num, acc_device_t devicetype);'
d1792 3
a1794 3
     _Interface_:   'subroutine acc_set_device_num(devicenum, devicetype)'
                    'integer devicenum'
                    'integer(kind=acc_device_kind) devicetype'
d1803 1
a1803 1
5.5 'acc_get_device_num' - Get device number to be used.
d1812 1
a1812 1
     _Prototype_:   'int acc_get_device_num(acc_device_t devicetype);'
d1815 3
a1817 3
     _Interface_:   'function acc_get_device_num(devicetype)'
                    'integer(kind=acc_device_kind) devicetype'
                    'integer acc_get_device_num'
d1826 1
a1826 1
5.6 'acc_async_test' - Test for completion of a specific asynchronous operation.
d1831 4
a1834 4
     specified in ARG.  In C/C++, a non-zero value will be returned to
     indicate the specified asynchronous operation has completed.  While
     Fortran will return a 'true'.  If the asynchrounous operation has
     not completed, C/C++ returns a zero and Fortran returns a 'false'.
d1837 1
a1837 1
     _Prototype_:   'int acc_async_test(int arg);'
d1840 3
a1842 3
     _Interface_:   'function acc_async_test(arg)'
                    'integer(kind=acc_handle_kind) arg'
                    'logical acc_async_test'
d1851 1
a1851 1
5.7 'acc_async_test_all' - Tests for completion of all asynchronous operations.
d1857 3
a1859 3
     asynchronous operations have completed.  While Fortran will return
     a 'true'.  If any asynchronous operation has not completed, C/C++
     returns a zero and Fortran returns a 'false'.
d1862 1
a1862 1
     _Prototype_:   'int acc_async_test_all(void);'
d1865 2
a1866 2
     _Interface_:   'function acc_async_test()'
                    'logical acc_get_device_num'
d1875 1
a1875 1
5.8 'acc_wait' - Wait for completion of a specific asynchronous operation.
d1883 1
a1883 1
     _Prototype_:   'acc_wait(arg);'
d1886 2
a1887 2
     _Interface_:   'subroutine acc_wait(arg)'
                    'integer(acc_handle_kind) arg'
d1896 1
a1896 1
5.9 'acc_wait_all' - Waits for completion of all asynchronous operations.
d1904 1
a1904 1
     _Prototype_:   'acc_wait_all(void);'
d1907 1
a1907 1
     _Interface_:   'subroutine acc_wait_async()'
d1916 1
a1916 1
5.10 'acc_wait_all_async' - Wait for completion of all asynchronous operations.
d1925 1
a1925 1
     _Prototype_:   'acc_wait_all_async(int async);'
d1928 2
a1929 2
     _Interface_:   'subroutine acc_wait_all_async(async)'
                    'integer(acc_handle_kind) async'
d1938 1
a1938 1
5.11 'acc_wait_async' - Wait for completion of asynchronous operations.
d1946 1
a1946 1
     _Prototype_:   'acc_wait_async(int arg, int async);'
d1949 2
a1950 2
     _Interface_:   'subroutine acc_wait_async(arg, async)'
                    'integer(acc_handle_kind) arg, async'
d1959 1
a1959 1
5.12 'acc_init' - Initialize runtime for a specific device type.
d1963 2
a1964 2
     This function initializes the runtime for the device type specified
     in DEVICETYPE.
d1967 1
a1967 1
     _Prototype_:   'acc_init(acc_device_t devicetype);'
d1970 2
a1971 2
     _Interface_:   'subroutine acc_init(devicetype)'
                    'integer(acc_device_kind) devicetype'
d1980 1
a1980 1
5.13 'acc_shutdown' - Shuts down the runtime for a specific device type.
d1988 1
a1988 1
     _Prototype_:   'acc_shutdown(acc_device_t devicetype);'
d1991 2
a1992 2
     _Interface_:   'subroutine acc_shutdown(devicetype)'
                    'integer(acc_device_kind) devicetype'
d2001 1
a2001 1
5.14 'acc_on_device' - Whether executing on a particular device
d2006 1
a2006 1
     particular device specified in DEVICETYPE.  In C/C++ a non-zero
d2008 1
a2008 1
     specified device type.  In Fortran, 'true' will be returned.  If
d2010 1
a2010 1
     will return a zero, while Fortran will return 'false'.
d2013 1
a2013 1
     _Prototype_:   'acc_on_device(acc_device_t devicetype);'
d2016 3
a2018 3
     _Interface_:   'function acc_on_device(devicetype)'
                    'integer(acc_device_kind) devicetype'
                    'logical acc_on_device'
d2027 1
a2027 1
5.15 'acc_malloc' - Allocate device memory.
d2031 1
a2031 1
     This function allocates LEN bytes of device memory.  It returns the
d2035 1
a2035 1
     _Prototype_:   'd_void* acc_malloc(size_t len);'
d2044 1
a2044 1
5.16 'acc_free' - Free device memory.
d2048 1
a2048 1
     Free previously allocated device memory at the device address 'a'.
d2051 1
a2051 1
     _Prototype_:   'acc_free(d_void *a);'
d2060 1
a2060 1
5.17 'acc_copyin' - Allocate device memory and copy host memory to it.
d2065 1
a2065 1
     maps it to the specified host address in A.  The device address of
d2068 3
a2070 3
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
     a variable or array element and LEN specifies the length in bytes.
d2073 1
a2073 1
     _Prototype_:   'void *acc_copyin(h_void *a, size_t len);'
d2076 5
a2080 5
     _Interface_:   'subroutine acc_copyin(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_copyin(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2089 1
a2089 1
5.18 'acc_present_or_copyin' - If the data is not present on the device, allocate device memory and copy from host memory.
d2094 3
a2096 3
     LEN is present or not.  If it is not present, then device memory
     will be allocated and the host memory copied.  The device address
     of the newly allocated device memory is returned.
d2098 2
a2099 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2103 2
a2104 2
     _Prototype_:   'void *acc_present_or_copyin(h_void *a, size_t len);'
     _Prototype_:   'void *acc_pcopyin(h_void *a, size_t len);'
d2107 10
a2116 10
     _Interface_:   'subroutine acc_present_or_copyin(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_present_or_copyin(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_pcopyin(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_pcopyin(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2125 1
a2125 1
5.19 'acc_create' - Allocate device memory and map it to host memory.
d2130 1
a2130 1
     specified by the host address A with a length of LEN bytes.  In
d2134 2
a2135 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2139 1
a2139 1
     _Prototype_:   'void *acc_create(h_void *a, size_t len);'
d2142 5
a2146 5
     _Interface_:   'subroutine acc_create(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_create(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2155 1
a2155 1
5.20 'acc_present_or_create' - If the data is not present on the device, allocate device memory and map it to host memory.
d2160 2
a2161 2
     LEN is present or not.  If it is not present, then device memory
     will be allocated and mapped to host memory.  In C/C++, the device
d2164 2
a2165 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2169 2
a2170 2
     _Prototype_:   'void *acc_present_or_create(h_void *a, size_t len)'
     _Prototype_:   'void *acc_pcreate(h_void *a, size_t len)'
d2173 10
a2182 10
     _Interface_:   'subroutine acc_present_or_create(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_present_or_create(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_pcreate(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_pcreate(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2191 1
a2191 1
5.21 'acc_copyout' - Copy device memory to host memory.
d2198 2
a2199 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2203 1
a2203 1
     _Prototype_:   'acc_copyout(h_void *a, size_t len);'
d2206 5
a2210 5
     _Interface_:   'subroutine acc_copyout(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_copyout(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2219 1
a2219 1
5.22 'acc_delete' - Free device memory.
d2226 2
a2227 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2231 1
a2231 1
     _Prototype_:   'acc_delete(h_void *a, size_t len);'
d2234 5
a2238 5
     _Interface_:   'subroutine acc_delete(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_delete(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2247 1
a2247 1
5.23 'acc_update_device' - Update device memory from mapped host memory.
d2255 2
a2256 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2260 1
a2260 1
     _Prototype_:   'acc_update_device(h_void *a, size_t len);'
d2263 5
a2267 5
     _Interface_:   'subroutine acc_update_device(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_update_device(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2276 1
a2276 1
5.24 'acc_update_self' - Update host memory from mapped device memory.
d2284 2
a2285 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2289 1
a2289 1
     _Prototype_:   'acc_update_self(h_void *a, size_t len);'
d2292 5
a2296 5
     _Interface_:   'subroutine acc_update_self(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_update_self(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2305 1
a2305 1
5.25 'acc_map_data' - Map previously allocated device memory to host memory.
d2310 1
a2310 1
     The device memory is specified with the device address D.  The host
d2314 1
a2314 1
     _Prototype_:   'acc_map_data(h_void *h, d_void *d, size_t len);'
d2323 1
a2323 1
5.26 'acc_unmap_data' - Unmap device memory from host memory.
d2327 1
a2327 1
     This function unmaps previously mapped device and host memory.  The
d2331 1
a2331 1
     _Prototype_:   'acc_unmap_data(h_void *h);'
d2340 1
a2340 1
5.27 'acc_deviceptr' - Get device pointer associated with specific host address.
d2348 1
a2348 1
     _Prototype_:   'void *acc_deviceptr(h_void *h);'
d2357 1
a2357 1
5.28 'acc_hostptr' - Get host pointer associated with specific device address.
d2365 1
a2365 1
     _Prototype_:   'void *acc_hostptr(d_void *d);'
d2374 1
a2374 1
5.29 'acc_is_present' - Indicate whether host variable / array is present on device.
d2378 2
a2379 2
     This function indicates whether the specified host address in A and
     a length of LEN bytes is present on the device.  In C/C++, a
d2381 1
a2381 1
     memory on the device.  A zero is returned to indicate the memory is
d2384 2
a2385 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2387 2
a2388 2
     If the host memory is mapped to device memory, then a 'true' is
     returned.  Otherwise, a 'false' is return to indicate the mapped
d2392 1
a2392 1
     _Prototype_:   'int acc_is_present(h_void *a, size_t len);'
d2395 7
a2401 7
     _Interface_:   'function acc_is_present(a)'
                    'type, dimension(:[,:]...) :: a'
                    'logical acc_is_present'
     _Interface_:   'function acc_is_present(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'logical acc_is_present'
d2410 1
a2410 1
5.30 'acc_memcpy_to_device' - Copy host memory to device memory.
d2419 2
a2420 2
     _Prototype_:   'acc_memcpy_to_device(d_void *dest, h_void *src, size_t
                    bytes);'
d2429 1
a2429 1
5.31 'acc_memcpy_from_device' - Copy device memory to host memory.
d2438 2
a2439 2
     _Prototype_:   'acc_memcpy_from_device(d_void *dest, h_void *src,
                    size_t bytes);'
d2448 1
a2448 1
5.32 'acc_get_current_cuda_device' - Get CUDA device handle.
d2452 1
a2452 1
     This function returns the CUDA device handle.  This handle is the
d2456 1
a2456 1
     _Prototype_:   'void *acc_get_current_cuda_device(void);'
d2465 1
a2465 1
5.33 'acc_get_current_cuda_context' - Get CUDA context handle.
d2469 1
a2469 1
     This function returns the CUDA context handle.  This handle is the
d2473 1
a2473 1
     _Prototype_:   'acc_get_current_cuda_context(void);'
d2482 1
a2482 1
5.34 'acc_get_cuda_stream' - Get CUDA stream handle.
d2486 1
a2486 1
     This function returns the CUDA stream handle.  This handle is the
d2490 1
a2490 1
     _Prototype_:   'acc_get_cuda_stream(void);'
d2499 1
a2499 1
5.35 'acc_set_cuda_stream' - Set CUDA stream handle.
d2507 1
a2507 1
     _Prototype_:   'acc_set_cuda_stream(int async void *stream);'
d2519 1
a2519 1
The variables 'ACC_DEVICE_TYPE' and 'ACC_DEVICE_NUM' are defined by
d2521 1
a2521 1
'GCC_ACC_NOTIFY' is used for diagnostic purposes.
d2532 1
a2532 1
6.1 'ACC_DEVICE_TYPE'
d2541 1
a2541 1
6.2 'ACC_DEVICE_NUM'
d2550 1
a2550 1
6.3 'GCC_ACC_NOTIFY'
d2562 1
a2562 1
This applies to the 'nvptx' plugin only.
d2571 4
a2574 4
'async' and 'wait' clauses.  When the 'async' clause is first used with
a directive, it creates a CUDA stream.  If an 'async-argument' is used
with the 'async' clause, then the stream is associated with the
specified 'async-argument'.
d2577 2
a2578 2
the 'async-argument' of an 'async' clause, both the 'wait' clause and
the 'wait' directive can be used.  When either the clause or directive
d2581 1
a2581 1
'async-argument', that is, stream, have completed.
d2584 2
a2585 2
of using the 'async' clause, is done without any intervention by the
caller.  This implies the association between the 'async-argument' and
d2588 5
a2592 5
function 'acc_set_cuda_stream'.  When the function 'acc_set_cuda_stream'
is called, the CUDA stream that was originally associated with the
'async' clause will be destroyed.  Caution should be taken when changing
the association as subsequent references to the 'async-argument' refer
to a different CUDA stream.
d2609 4
a2612 4
programs that use the Runtime library directly, or another library based
on the Runtime library, e.g., CUBLAS(1). This chapter describes the use
cases and what changes are required in order to use both the OpenACC
library and the CUBLAS and Runtime libraries within a program.
d2618 2
a2619 2
called prior to any of the functions in the OpenACC library.  More
specifically, the function 'cublasCreate()'.
d2624 5
a2628 5
returned to the caller.  The OpenACC library also requires
initialization and allocation of hardware resources.  Since the CUBLAS
library has already allocated the hardware resources for the device, all
that is left to do is to initialize the OpenACC library and acquire the
hardware resources on the host.
d2631 10
a2640 10
and allocate the host hardware resources, you need to acquire the device
number that was allocated during the call to 'cublasCreate()'.  The
invoking of the runtime library function 'cudaGetDevice()' accomplishes
this.  Once acquired, the device number is passed along with the device
type as parameters to the OpenACC library function
'acc_set_device_num()'.

   Once the call to 'acc_set_device_num()' has completed, the OpenACC
library uses the context that was created during the call to
'cublasCreate()'.  In other words, both libraries will be sharing the
d2661 1
a2661 2

                              Use Case 1
d2667 2
a2668 2
is called prior to any of the functions in the CUBLAS library.  More
specificially, the function 'acc_set_device_num()'.
d2670 1
a2670 1
   In the use case presented here, the function 'acc_set_device_num()'
d2672 3
a2674 3
resources on the host and the device.  In the call to the function, the
call parameters specify which device to use and what device type to use,
i.e., 'acc_device_nvidia'.  It should be noted that this is but one
d2676 1
a2676 1
hardware resources.  Other methods are available through the use of
d2679 1
a2679 1
   Once the call to 'acc_set_device_num()' has completed, other OpenACC
d2681 4
a2684 4
'acc_copyin()'.  In addition, calls can be made to functions in the
CUBLAS library.  In the use case a call to 'cublasCreate()' is made
subsequent to the calls to 'acc_copyin()'.  As seen in the previous use
case, a call to 'cublasCreate()' initializes the CUBLAS library and
d2686 1
a2686 1
since the device has already been allocated, 'cublasCreate()' will only
d2688 1
a2688 1
resources on the host.  The context that was created as part of the
d2730 1
a2730 2

                              Use Case 2
d2737 1
a2737 1
'ACC_DEVICE_TYPE' and 'ACC_DEVICE_NUM', respecively.  These two
d2739 2
a2740 2
'acc_set_device_num()'.  As seen in the second use case, the device type
and device number were specified using 'acc_set_device_num()'.  If
d2742 1
a2742 1
call to 'acc_set_device_num()' would not be required.
d2744 4
a2747 4
   The use of the environment variables is only relevant when an OpenACC
function is called prior to a call to 'cudaCreate()'.  If 'cudaCreate()'
is called prior to a call to an OpenACC function, then you must call
'acc_set_device_num()'(2)
d2753 2
a2754 2
Interoperability", in "CUDA Driver API", TRM-06703-001, Version 5.5, for
additional information on library interoperability.
d2756 2
a2757 2
   (2) More complete information about 'ACC_DEVICE_TYPE' and
'ACC_DEVICE_NUM' can be found in sections 4.1 and 4.2 of the OpenACC
d2767 2
a2768 2
The following sections present notes on the external ABI as presented by
libgomp.  Only maintainers should need them.
d2829 1
a2829 1
The target should implement the '__sync' builtins.
d2845 1
a2845 1
Expands to the '__sync_synchronize' builtin.
d2861 4
a2864 4
In _most_ cases we can map this directly to '__thread'.  Except that OMP
allows constructors for C++ objects.  We can either refuse to support
this (how often is it used?)  or we can implement something akin to
.ctors.
d2896 2
a2897 2
   It is not clear what to do with bare FOR or SECTION blocks.  The only
thing I can figure is that we do something like:
d2915 2
a2916 2
for the two variables, i.e.  not something you could write directly in
C. Presumably this only makes sense if the "outer" x and y are global
d2929 4
a2932 4
pointer to an array of the type of the variable, indexed by the thread's
TEAM_ID.  The thread stores its final value into the array, and after
the barrier, the master thread iterates over the array to collect the
values.
d2969 3
a2971 3
   The function needs to create the appropriate number of threads and/or
launch them from the dock.  It needs to create the team structure and
assign team ids.
d2976 1
a2976 1
'omp_in_parallel()' state.
d3028 2
a3029 2
also pull it into a local variable if we like, but since its supposed to
remain unchanged, we can also not if we like.
d3031 5
a3035 5
   If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be able
to get away with no work-sharing context at all, since we can simply
perform the arithmetic directly in each thread to divide up the
iterations.  Which would mean that we wouldn't need to call any of these
routines.
d3137 2
a3138 2
"openacc", or "openmp", or both to the keywords field in the bug report,
as appropriate.
d3148 1
a3148 1
     Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
d3176 3
a3178 3
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
d3197 10
a3206 9
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
d3243 2
a3244 2
     infringement under applicable copyright law, except executing it on
     a computer or modifying a private copy.  Propagation includes
d3258 2
a3259 2
     the extent that warranties are provided), that licensees may convey
     the work under this License, and how to view a copy of this
d3267 2
a3268 2
     for making modifications to it.  "Object code" means any non-source
     form of a work.
d3279 4
a3282 4
     Major Component, and (b) serves only to enable use of the work with
     that Major Component, or to implement a Standard Interface for
     which an implementation is available to the public in source code
     form.  A "Major Component", in this context, means a major
d3290 3
a3292 3
     work) run the object code and to modify the work, including scripts
     to control those activities.  However, it does not include the
     work's System Libraries, or general-purpose tools or generally
d3295 4
a3298 4
     Corresponding Source includes interface definition files associated
     with source files for the work, and the source code for shared
     libraries and dynamically linked subprograms that the work is
     specifically designed to require, such as by intimate data
d3315 4
a3318 4
     a covered work is covered by this License only if the output, given
     its content, constitutes a covered work.  This License acknowledges
     your rights of fair use or other equivalent, as provided by
     copyright law.
d3323 8
a3330 8
     sole purpose of having them make modifications exclusively for you,
     or provide you with facilities for running those works, provided
     that you comply with the terms of this License in conveying all
     material for which you do not control copyright.  Those thus making
     or running the covered works for you must do so exclusively on your
     behalf, under your direction and control, on terms that prohibit
     them from making any copies of your copyrighted material outside
     their relationship with you.
d3347 2
a3348 2
     with respect to the covered work, and you disclaim any intention to
     limit operation or modification of the work as a means of
d3418 2
a3419 2
          written offer, valid for at least three years and valid for as
          long as you offer spare parts or customer support for that
d3429 2
a3430 2
       c. Convey individual copies of the object code with a copy of the
          written offer to provide the Corresponding Source.  This
d3436 2
a3437 2
          place (gratis or for a charge), and offer equivalent access to
          the Corresponding Source in the same way through the same
d3441 4
a3444 4
          Corresponding Source may be on a different server (operated by
          you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to the
          object code saying where to find the Corresponding Source.
d3446 2
a3447 2
          remain obligated to ensure that it is available for as long as
          needed to satisfy these requirements.
d3454 1
d3462 2
a3463 2
     incorporation into a dwelling.  In determining whether a product is
     a consumer product, doubtful cases shall be resolved in favor of
d3494 5
a3498 5
     warranty, or updates for a work that has been modified or installed
     by the recipient, or for the User Product in which it has been
     modified or installed.  Access to a network may be denied when the
     modification itself materially and adversely affects the operation
     of the network or violates the rules and protocols for
d3528 2
a3529 2
     holders of that material) supplement the terms of this License with
     terms:
d3539 3
a3541 2
          or requiring that modified versions of such material be marked
          in reasonable ways as different from the original version; or
d3560 5
a3564 4
     contains a further restriction but permits relicensing or conveying
     under this License, you may add to a covered work material governed
     by the terms of that license document, provided that the further
     restriction does not survive such relicensing or conveying.
d3580 2
a3581 2
     under this License (including any patent licenses granted under the
     third paragraph of section 11).
d3585 2
a3586 2
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
d3598 4
a3601 4
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, you do not qualify to receive new licenses
     for the same material under section 10.
d3615 1
a3615 1
  10. Automatic Licensing of Downstream Recipients.
d3629 4
a3632 4
     could give under the previous paragraph, plus a right to possession
     of the Corresponding Source of the work from the predecessor in
     interest, if the predecessor has it or can get it with reasonable
     efforts.
d3636 6
a3641 6
     may not impose a license fee, royalty, or other charge for exercise
     of rights granted under this License, and you may not initiate
     litigation (including a cross-claim or counterclaim in a lawsuit)
     alleging that any patent claim is infringed by making, using,
     selling, offering for sale, or importing the Program or any portion
     of it.
d3643 1
a3643 1
  11. Patents.
d3663 2
a3664 2
     otherwise run, modify and propagate the contents of its contributor
     version.
d3669 3
a3671 3
     patent or covenant not to sue for patent infringement).  To "grant"
     such a patent license to a party means to make such an agreement or
     commitment not to enforce a patent against the party.
d3701 10
a3710 10
     party that is in the business of distributing software, under which
     you make payment to the third party based on the extent of your
     activity of conveying the work, and under which the third party
     grants, to any of the parties who would receive the covered work
     from you, a discriminatory patent license (a) in connection with
     copies of the covered work conveyed by you (or copies made from
     those copies), or (b) primarily for and in connection with specific
     products or compilations that contain the covered work, unless you
     entered into that arrangement, or that patent license was granted,
     prior to 28 March 2007.
d3716 1
a3716 1
  12. No Surrender of Others' Freedom.
d3718 11
a3728 10
     If conditions are imposed on you (whether by court order, agreement
     or otherwise) that contradict the conditions of this License, they
     do not excuse you from the conditions of this License.  If you
     cannot convey a covered work so as to satisfy simultaneously your
     obligations under this License and any other pertinent obligations,
     then as a consequence you may not convey it at all.  For example,
     if you agree to terms that obligate you to collect a royalty for
     further conveying from those to whom you convey the Program, the
     only way you could satisfy both those terms and this License would
     be to refrain entirely from conveying the Program.
d3730 1
a3730 1
  13. Use with the GNU Affero General Public License.
d3741 1
a3741 1
  14. Revised Versions of this License.
d3744 4
a3747 3
     versions of the GNU General Public License from time to time.  Such
     new versions will be similar in spirit to the present version, but
     may differ in detail to address new problems or concerns.
d3753 4
a3756 4
     that numbered version or of any later version published by the Free
     Software Foundation.  If the Program does not specify a version
     number of the GNU General Public License, you may choose any
     version ever published by the Free Software Foundation.
d3768 1
a3768 1
  15. Disclaimer of Warranty.
d3771 1
a3771 1
     APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
d3775 1
a3775 1
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
d3780 1
a3780 1
  16. Limitation of Liability.
d3784 2
a3785 2
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
     DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
d3793 1
a3793 1
  17. Interpretation of Sections 15 and 16.
d3802 1
d3833 1
a3833 1
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
d3842 1
a3842 1
     This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
d3844 1
a3844 1
     under certain conditions; type 'show c' for details.
d3846 1
a3846 1
   The hypothetical commands 'show w' and 'show c' should show the
d3854 1
a3854 1
the GNU GPL, see <http://www.gnu.org/licenses/>.
d3861 1
a3861 1
please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
d3872 1
a3872 1
     <http://fsf.org/>
d3897 2
a3898 2
     of subject matter or whether it is published as a printed book.  We
     recommend this License principally for works whose purpose is
d3904 2
a3905 2
     that contains a notice placed by the copyright holder saying it can
     be distributed under the terms of this License.  Such a notice
d3909 3
a3911 3
     of the public is a licensee, and is addressed as "you".  You accept
     the license if you copy, modify or distribute the work in a way
     requiring permission under copyright law.
d3929 6
a3934 6
     titles are designated, as being those of Invariant Sections, in the
     notice that says that the Document is released under this License.
     If a section does not fit the above definition of Secondary then it
     is not allowed to be designated as Invariant.  The Document may
     contain zero Invariant Sections.  If the Document does not identify
     any Invariant Sections then there are none.
d3945 10
a3954 10
     straightforwardly with generic text editors or (for images composed
     of pixels) generic paint programs or (for drawings) some widely
     available drawing editor, and that is suitable for input to text
     formatters or for automatic translation to a variety of formats
     suitable for input to text formatters.  A copy made in an otherwise
     Transparent file format whose markup, or absence of markup, has
     been arranged to thwart or discourage subsequent modification by
     readers is not Transparent.  An image format is not Transparent if
     used for any substantial amount of text.  A copy that is not
     "Transparent" is called "Opaque".
d3958 8
a3965 8
     SGML or XML using a publicly available DTD, and standard-conforming
     simple HTML, PostScript or PDF designed for human modification.
     Examples of transparent image formats include PNG, XCF and JPG.
     Opaque formats include proprietary formats that can be read and
     edited only by proprietary word processors, SGML or XML for which
     the DTD and/or processing tools are not generally available, and
     the machine-generated HTML, PostScript or PDF produced by some word
     processors for output purposes only.
d4003 2
a4004 2
     distribute a large enough number of copies you must also follow the
     conditions in section 3.
d4018 6
a4023 5
     front cover must present the full title with all words of the title
     equally prominent and visible.  You may add other material on the
     covers in addition.  Copying with changes limited to the covers, as
     long as they preserve the title of the Document and satisfy these
     conditions, can be treated as verbatim copying in other respects.
d4031 12
a4042 11
     numbering more than 100, you must either include a machine-readable
     Transparent copy along with each Opaque copy, or state in or with
     each Opaque copy a computer-network location from which the general
     network-using public has access to download using public-standard
     network protocols a complete Transparent copy of the Document, free
     of added material.  If you use the latter option, you must take
     reasonably prudent steps, when you begin distribution of Opaque
     copies in quantity, to ensure that this Transparent copy will
     remain thus accessible at the stated location until at least one
     year after the last time you distribute an Opaque copy (directly or
     through your agents or retailers) of that edition to the public.
d4045 3
a4047 3
     the Document well before redistributing any large number of copies,
     to give them a chance to provide you with an updated version of the
     Document.
d4053 5
a4057 5
     release the Modified Version under precisely this License, with the
     Modified Version filling the role of the Document, thus licensing
     distribution and modification of the Modified Version to whoever
     possesses a copy of it.  In addition, you must do these things in
     the Modified Version:
d4060 5
a4064 5
          distinct from that of the Document, and from those of previous
          versions (which should, if there were any, be listed in the
          History section of the Document).  You may use the same title
          as a previous version if the original publisher of that
          version gives permission.
d4094 6
a4099 6
          authors, and publisher of the Modified Version as given on the
          Title Page.  If there is no section Entitled "History" in the
          Document, create one stating the title, year, authors, and
          publisher of the Document as given on its Title Page, then add
          an item describing the Modified Version as stated in the
          previous sentence.
d4104 5
a4108 5
          previous versions it was based on.  These may be placed in the
          "History" section.  You may omit a network location for a work
          that was published at least four years before the Document
          itself, or if the original publisher of the version it refers
          to gives permission.
d4111 2
a4112 2
          Preserve the Title of the section, and preserve in the section
          all the substance and tone of each of the contributor
d4115 4
a4118 3
       L. Preserve all the Invariant Sections of the Document, unaltered
          in their text and in their titles.  Section numbers or the
          equivalent are not considered part of the section titles.
d4131 5
a4135 5
     material copied from the Document, you may at your option designate
     some or all of these sections as invariant.  To do this, add their
     titles to the list of Invariant Sections in the Modified Version's
     license notice.  These titles must be distinct from any other
     section titles.
d4144 9
a4152 9
     and a passage of up to 25 words as a Back-Cover Text, to the end of
     the list of Cover Texts in the Modified Version.  Only one passage
     of Front-Cover Text and one of Back-Cover Text may be added by (or
     through arrangements made by) any one entity.  If the Document
     already includes a cover text for the same cover, previously added
     by you or by arrangement made by the same entity you are acting on
     behalf of, you may not add another; but you may replace the old
     one, on explicit permission from the previous publisher that added
     the old one.
d4162 2
a4163 2
     modified versions, provided that you include in the combination all
     of the Invariant Sections of all of the original documents,
d4190 2
a4191 2
     rules of this License for verbatim copying of each of the documents
     in all other respects.
d4195 3
a4197 3
     a copy of this License into the extracted document, and follow this
     License in all other respects regarding verbatim copying of that
     document.
d4202 2
a4203 2
     separate and independent documents or works, in or on a volume of a
     storage or distribution medium, is called an "aggregate" if the
d4248 2
a4249 2
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
d4261 4
a4264 4
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, receipt of a copy of some or all of the
     same material does not give you any rights to use it.
d4266 1
a4266 1
  10. FUTURE REVISIONS OF THIS LICENSE
d4272 1
a4272 1
     <http://www.gnu.org/copyleft/>.
d4279 5
a4283 5
     published (not as a draft) by the Free Software Foundation.  If the
     Document does not specify a version number of this License, you may
     choose any version ever published (not as a draft) by the Free
     Software Foundation.  If the Document specifies that a proxy can
     decide which future versions of this License can be used, that
d4287 1
a4287 1
  11. RELICENSING
d4317 1
d4334 1
a4334 1
Texts, replace the "with...Texts."  line with this:
d4345 3
a4347 3
recommend releasing these examples in parallel under your choice of free
software license, such as the GNU General Public License, to permit
their use in free software.
d4377 2
a4378 2
can greatly alter what fraction of the sales price counts as profit.  If
the price you pay is $50, ten percent of the profit is probably less
d4388 2
a4389 2
ports such as adding a new CPU to the GNU Compiler Collection contribute
more; major new features or packages contribute the most.
d4408 19
d4428 1
a4428 18
* Environment Variable <1>:              OMP_DISPLAY_ENV.       (line 6)
* Environment Variable <2>:              OMP_DEFAULT_DEVICE.    (line 6)
* Environment Variable <3>:              OMP_DYNAMIC.           (line 6)
* Environment Variable <4>:              OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable <5>:              OMP_MAX_TASK_PRIORITY. (line 6)
* Environment Variable <6>:              OMP_NESTED.            (line 6)
* Environment Variable <7>:              OMP_NUM_THREADS.       (line 6)
* Environment Variable <8>:              OMP_PROC_BIND.         (line 6)
* Environment Variable <9>:              OMP_PLACES.            (line 6)
* Environment Variable <10>:             OMP_STACKSIZE.         (line 6)
* Environment Variable <11>:             OMP_SCHEDULE.          (line 6)
* Environment Variable <12>:             OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <13>:             OMP_WAIT_POLICY.       (line 6)
* Environment Variable <14>:             GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <15>:             GOMP_DEBUG.            (line 6)
* Environment Variable <16>:             GOMP_STACKSIZE.        (line 6)
* Environment Variable <17>:             GOMP_SPINCOUNT.        (line 6)
* Environment Variable <18>:             GOMP_RTEMS_THREAD_POOLS.
d4430 1
a4430 1
* FDL, GNU Free Documentation License:   GNU Free Documentation License.
d4432 4
a4436 6
* Implementation specific setting <1>:   OMP_NUM_THREADS.       (line 6)
* Implementation specific setting <2>:   OMP_SCHEDULE.          (line 6)
* Implementation specific setting <3>:   GOMP_STACKSIZE.        (line 6)
* Implementation specific setting <4>:   GOMP_SPINCOUNT.        (line 6)
* Implementation specific setting <5>:   GOMP_RTEMS_THREAD_POOLS.
                                                                (line 6)
d4442 131
a4572 131
Node: Top2083
Node: Enabling OpenMP4489
Node: Runtime Library Routines5276
Node: omp_get_active_level8339
Node: omp_get_ancestor_thread_num9039
Node: omp_get_cancellation9969
Node: omp_get_default_device10783
Node: omp_get_dynamic11459
Node: omp_get_level12334
Node: omp_get_max_active_levels12954
Node: omp_get_max_task_priority13659
Node: omp_get_max_threads14279
Node: omp_get_nested15036
Node: omp_get_num_devices15950
Node: omp_get_num_procs16471
Node: omp_get_num_teams17010
Node: omp_get_num_threads17526
Node: omp_get_proc_bind18615
Node: omp_get_schedule19536
Node: omp_get_team_num20490
Node: omp_get_team_size20989
Node: omp_get_thread_limit21949
Node: omp_get_thread_num22568
Node: omp_in_parallel23439
Node: omp_in_final24088
Node: omp_is_initial_device24762
Node: omp_set_default_device25455
Node: omp_set_dynamic26246
Node: omp_set_max_active_levels27132
Node: omp_set_nested27909
Node: omp_set_num_threads28801
Node: omp_set_schedule29669
Node: omp_init_lock30750
Node: omp_set_lock31403
Node: omp_test_lock32258
Node: omp_unset_lock33234
Node: omp_destroy_lock34165
Node: omp_init_nest_lock34842
Node: omp_set_nest_lock35577
Node: omp_test_nest_lock36492
Node: omp_unset_nest_lock37519
Node: omp_destroy_nest_lock38534
Node: omp_get_wtick39285
Node: omp_get_wtime39877
Node: Environment Variables40653
Node: OMP_CANCELLATION42208
Node: OMP_DISPLAY_ENV42741
Node: OMP_DEFAULT_DEVICE43444
Node: OMP_DYNAMIC44224
Node: OMP_MAX_ACTIVE_LEVELS44820
Node: OMP_MAX_TASK_PRIORITY45470
Node: OMP_NESTED46128
Node: OMP_NUM_THREADS46733
Node: OMP_PROC_BIND47421
Node: OMP_PLACES48613
Node: OMP_STACKSIZE50790
Node: OMP_SCHEDULE51614
Node: OMP_THREAD_LIMIT52312
Node: OMP_WAIT_POLICY52912
Node: GOMP_CPU_AFFINITY53604
Node: GOMP_DEBUG55334
Node: GOMP_STACKSIZE55841
Node: GOMP_SPINCOUNT56670
Node: GOMP_RTEMS_THREAD_POOLS57874
Node: Enabling OpenACC60052
Node: OpenACC Runtime Library Routines61045
Node: acc_get_num_devices64839
Node: acc_set_device_type65565
Node: acc_get_device_type66329
Node: acc_set_device_num67044
Node: acc_get_device_num67828
Node: acc_async_test68625
Node: acc_async_test_all69617
Node: acc_wait70517
Node: acc_wait_all71152
Node: acc_wait_all_async71731
Node: acc_wait_async72483
Node: acc_init73190
Node: acc_shutdown73836
Node: acc_on_device74504
Node: acc_malloc75508
Node: acc_free76007
Node: acc_copyin76434
Node: acc_present_or_copyin77544
Node: acc_create79170
Node: acc_present_or_create80325
Node: acc_copyout81959
Node: acc_delete82982
Node: acc_update_device83957
Node: acc_update_self85069
Node: acc_map_data86173
Node: acc_unmap_data86858
Node: acc_deviceptr87379
Node: acc_hostptr87949
Node: acc_is_present88513
Node: acc_memcpy_to_device90040
Node: acc_memcpy_from_device90703
Node: acc_get_current_cuda_device91387
Node: acc_get_current_cuda_context91984
Node: acc_get_cuda_stream92578
Node: acc_set_cuda_stream93134
Node: OpenACC Environment Variables93666
Node: ACC_DEVICE_TYPE94125
Node: ACC_DEVICE_NUM94361
Node: GCC_ACC_NOTIFY94618
Node: CUDA Streams Usage94841
Ref: CUDA Streams Usage-Footnote-196741
Node: OpenACC Library Interoperability96850
Ref: OpenACC Library Interoperability-Footnote-1103206
Ref: OpenACC Library Interoperability-Footnote-2103458
Node: The libgomp ABI103666
Node: Implementing MASTER construct104522
Node: Implementing CRITICAL construct104936
Node: Implementing ATOMIC construct105675
Node: Implementing FLUSH construct106156
Node: Implementing BARRIER construct106427
Node: Implementing THREADPRIVATE construct106696
Node: Implementing PRIVATE clause107349
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses107930
Node: Implementing REDUCTION clause109254
Node: Implementing PARALLEL construct109811
Node: Implementing FOR construct111068
Node: Implementing ORDERED construct113066
Node: Implementing SECTIONS construct113372
Node: Implementing SINGLE construct114138
Node: Implementing OpenACC's PARALLEL construct114850
Node: Reporting Bugs115108
Node: Copying115470
Node: GNU Free Documentation License153017
Node: Funding178140
Node: Library Index180666
@


1.8.2.2
log
@Sync with HEAD
@
text
@d1 2
a2 2
This is libgomp.info, produced by makeinfo version 4.13 from
/space/rguenther/gcc-7.4.0/gcc-7.4.0/libgomp/libgomp.texi.
d4 1
a4 1
Copyright (C) 2006-2017 Free Software Foundation, Inc.
d21 2
a22 3
software.  Copies published by the Free Software Foundation raise
funds for GNU development.

d36 1
a36 1
   Copyright (C) 2006-2017 Free Software Foundation, Inc.
d53 2
a54 2
software.  Copies published by the Free Software Foundation raise
funds for GNU development.
d62 5
a66 5
This manual documents the usage of libgomp, the GNU Offloading and
Multi Processing Runtime Library.  This includes the GNU implementation
of the OpenMP (http://www.openmp.org) Application Programming Interface
(API) for multi-platform shared-memory parallel programming in C/C++
and Fortran, and the GNU implementation of the OpenACC
d110 10
a119 11
compile-time flag `-fopenmp' must be specified.  This enables the
OpenMP directive `#pragma omp' in C/C++ and `!$omp' directives in free
form, `c$omp', `*$omp' and `!$omp' directives in fixed form, `!$'
conditional compilation sentinels in free form and `c$', `*$' and `!$'
sentinels in fixed form, for Fortran.  The flag also arranges for
automatic linking of the OpenMP runtime library (*note Runtime Library
Routines::).

   A complete description of all OpenMP directives accepted may be
found in the OpenMP Application Program Interface
(http://www.openmp.org) manual, version 4.5.
d187 1
a187 1
2.1 `omp_get_active_level' - Number of parallel regions
d195 1
a195 1
     _Prototype_:  `int omp_get_active_level(void);'
d198 1
a198 1
     _Interface_:  `integer function omp_get_active_level()'
d210 1
a210 1
2.2 `omp_get_ancestor_thread_num' - Ancestor thread ID
d216 2
a217 2
     outside zero to `omp_get_level' -1 is returned; if LEVEL is
     `omp_get_level' the result is identical to `omp_get_thread_num'.
d220 1
a220 1
     _Prototype_:  `int omp_get_ancestor_thread_num(int level);'
d223 2
a224 2
     _Interface_:  `integer function omp_get_ancestor_thread_num(level)'
                   `integer level'
d236 1
a236 1
2.3 `omp_get_cancellation' - Whether cancellation support is enabled
d240 3
a242 3
     This function returns `true' if cancellation is activated, `false'
     otherwise.  Here, `true' and `false' represent their
     language-specific counterparts.  Unless `OMP_CANCELLATION' is set
d246 1
a246 1
     _Prototype_:  `int omp_get_cancellation(void);'
d249 1
a249 1
     _Interface_:  `logical function omp_get_cancellation()'
d260 1
a260 1
2.4 `omp_get_default_device' - Get the default device for target regions
d267 1
a267 1
     _Prototype_:  `int omp_get_default_device(void);'
d270 1
a270 1
     _Interface_:  `integer function omp_get_default_device()'
d281 1
a281 1
2.5 `omp_get_dynamic' - Dynamic teams setting
d285 2
a286 2
     This function returns `true' if enabled, `false' otherwise.  Here,
     `true' and `false' represent their language-specific counterparts.
d289 3
a291 3
     `OMP_DYNAMIC' environment variable or at runtime using
     `omp_set_dynamic'.  If undefined, dynamic adjustment is disabled
     by default.
d294 1
a294 1
     _Prototype_:  `int omp_get_dynamic(void);'
d297 1
a297 1
     _Interface_:  `logical function omp_get_dynamic()'
d308 1
a308 1
2.6 `omp_get_level' - Obtain the current nesting level
d316 1
a316 1
     _Prototype_:  `int omp_get_level(void);'
d319 1
a319 1
     _Interface_:  `integer function omp_level()'
d330 1
a330 1
2.7 `omp_get_max_active_levels' - Maximum number of active regions
d338 1
a338 1
     _Prototype_:  `int omp_get_max_active_levels(void);'
d341 1
a341 1
     _Interface_:  `integer function omp_get_max_active_levels()'
d352 1
a352 1
2.8 `omp_get_max_task_priority' - Maximum priority value
d361 1
a361 1
     _Prototype_:  `int omp_get_max_task_priority(void);'
d364 1
a364 1
     _Interface_:  `integer function omp_get_max_task_priority()'
d372 1
a372 1
2.9 `omp_get_max_threads' - Maximum number of threads of parallel region
d377 1
a377 1
     region that does not use the clause `num_threads'.
d380 1
a380 1
     _Prototype_:  `int omp_get_max_threads(void);'
d383 1
a383 1
     _Interface_:  `integer function omp_get_max_threads()'
d395 1
a395 1
2.10 `omp_get_nested' - Nested parallel regions
d399 2
a400 2
     This function returns `true' if nested parallel regions are
     enabled, `false' otherwise.  Here, `true' and `false' represent
d404 2
a405 2
     `OMP_NESTED' environment variable or at runtime using
     `omp_set_nested'.  If undefined, nested parallel regions are
d409 1
a409 1
     _Prototype_:  `int omp_get_nested(void);'
d412 1
a412 1
     _Interface_:  `logical function omp_get_nested()'
d423 1
a423 1
2.11 `omp_get_num_devices' - Number of target devices
d430 1
a430 1
     _Prototype_:  `int omp_get_num_devices(void);'
d433 1
a433 1
     _Interface_:  `integer function omp_get_num_devices()'
d441 1
a441 1
2.12 `omp_get_num_procs' - Number of processors online
d448 1
a448 1
     _Prototype_:  `int omp_get_num_procs(void);'
d451 1
a451 1
     _Interface_:  `integer function omp_get_num_procs()'
d459 1
a459 1
2.13 `omp_get_num_teams' - Number of teams
d466 1
a466 1
     _Prototype_:  `int omp_get_num_teams(void);'
d469 1
a469 1
     _Interface_:  `integer function omp_get_num_teams()'
d477 1
a477 1
2.14 `omp_get_num_threads' - Size of the active team
d481 2
a482 2
     Returns the number of threads in the current team.  In a
     sequential section of the program `omp_get_num_threads' returns 1.
d485 5
a489 5
     `OMP_NUM_THREADS' environment variable.  At runtime, the size of
     the current team may be set either by the `NUM_THREADS' clause or
     by `omp_set_num_threads'.  If none of the above were used to
     define a specific value and `OMP_DYNAMIC' is disabled, one thread
     per CPU online is used.
d492 1
a492 1
     _Prototype_:  `int omp_get_num_threads(void);'
d495 1
a495 1
     _Interface_:  `integer function omp_get_num_threads()'
d507 1
a507 1
2.15 `omp_get_proc_bind' - Whether theads may be moved between CPUs
d511 5
a515 5
     This functions returns the currently active thread affinity
     policy, which is set via `OMP_PROC_BIND'.  Possible values are
     `omp_proc_bind_false', `omp_proc_bind_true',
     `omp_proc_bind_master', `omp_proc_bind_close' and
     `omp_proc_bind_spread'.
d518 1
a518 1
     _Prototype_:  `omp_proc_bind_t omp_get_proc_bind(void);'
d521 2
a522 2
     _Interface_:  `integer(kind=omp_proc_bind_kind) function
                   omp_get_proc_bind()'
d534 1
a534 1
2.16 `omp_get_schedule' - Obtain the runtime scheduling method
d539 2
a540 2
     set to the value `omp_sched_static', `omp_sched_dynamic',
     `omp_sched_guided' or `omp_sched_auto'.  The second argument,
d544 2
a545 2
     _Prototype_:  `void omp_get_schedule(omp_sched_t *kind, int
                   *chunk_size);'
d548 3
a550 3
     _Interface_:  `subroutine omp_get_schedule(kind, chunk_size)'
                   `integer(kind=omp_sched_kind) kind'
                   `integer chunk_size'
d561 1
a561 1
2.17 `omp_get_team_num' - Get team number
d568 1
a568 1
     _Prototype_:  `int omp_get_team_num(void);'
d571 1
a571 1
     _Interface_:  `integer function omp_get_team_num()'
d579 1
a579 1
2.18 `omp_get_team_size' - Number of threads in a team
d585 3
a587 3
     values of LEVEL outside zero to `omp_get_level', -1 is returned;
     if LEVEL is zero, 1 is returned, and for `omp_get_level', the
     result is identical to `omp_get_num_threads'.
d590 1
a590 1
     _Prototype_:  `int omp_get_team_size(int level);'
d593 2
a594 2
     _Interface_:  `integer function omp_get_team_size(level)'
                   `integer level'
d606 1
a606 1
2.19 `omp_get_thread_limit' - Maximum number of threads
d613 1
a613 1
     _Prototype_:  `int omp_get_thread_limit(void);'
d616 1
a616 1
     _Interface_:  `integer function omp_get_thread_limit()'
d627 1
a627 1
2.20 `omp_get_thread_num' - Current thread ID
d632 4
a635 4
     team.  In a sequential parts of the program, `omp_get_thread_num'
     always returns 0.  In parallel regions the return value varies
     from 0 to `omp_get_num_threads'-1 inclusive.  The return value of
     the master thread of a team is always 0.
d638 1
a638 1
     _Prototype_:  `int omp_get_thread_num(void);'
d641 1
a641 1
     _Interface_:  `integer function omp_get_thread_num()'
d652 1
a652 1
2.21 `omp_in_parallel' - Whether a parallel region is active
d656 2
a657 2
     This function returns `true' if currently running in parallel,
     `false' otherwise.  Here, `true' and `false' represent their
d661 1
a661 1
     _Prototype_:  `int omp_in_parallel(void);'
d664 1
a664 1
     _Interface_:  `logical function omp_in_parallel()'
d672 1
a672 1
2.22 `omp_in_final' - Whether in final or included task region
d676 2
a677 2
     This function returns `true' if currently running in a final or
     included task region, `false' otherwise.  Here, `true' and `false'
d681 1
a681 1
     _Prototype_:  `int omp_in_final(void);'
d684 1
a684 1
     _Interface_:  `logical function omp_in_final()'
d692 1
a692 1
2.23 `omp_is_initial_device' - Whether executing on the host device
d696 2
a697 2
     This function returns `true' if currently running on the host
     device, `false' otherwise.  Here, `true' and `false' represent
d701 1
a701 1
     _Prototype_:  `int omp_is_initial_device(void);'
d704 1
a704 1
     _Interface_:  `logical function omp_is_initial_device()'
d712 1
a712 1
2.24 `omp_set_default_device' - Set the default device for target regions
d720 1
a720 1
     _Prototype_:  `void omp_set_default_device(int device_num);'
d723 2
a724 2
     _Interface_:  `subroutine omp_set_default_device(device_num)'
                   `integer device_num'
d735 1
a735 1
2.25 `omp_set_dynamic' - Enable/disable dynamic teams
d741 2
a742 2
     of `true' and `false', where `true' enables dynamic adjustment of
     team sizes and `false' disables it.
d745 1
a745 1
     _Prototype_:  `void omp_set_dynamic(int dynamic_threads);'
d748 2
a749 2
     _Interface_:  `subroutine omp_set_dynamic(dynamic_threads)'
                   `logical, intent(in) :: dynamic_threads'
d760 1
a760 1
2.26 `omp_set_max_active_levels' - Limits the number of active parallel regions
d768 1
a768 1
     _Prototype_:  `void omp_set_max_active_levels(int max_levels);'
d771 2
a772 2
     _Interface_:  `subroutine omp_set_max_active_levels(max_levels)'
                   `integer max_levels'
d783 1
a783 1
2.27 `omp_set_nested' - Enable/disable nested parallel regions
d789 2
a790 2
     language-specific equivalent of `true' and `false', where `true'
     enables dynamic adjustment of team sizes and `false' disables it.
d793 1
a793 1
     _Prototype_:  `void omp_set_nested(int nested);'
d796 2
a797 2
     _Interface_:  `subroutine omp_set_nested(nested)'
                   `logical, intent(in) :: nested'
d808 1
a808 1
2.28 `omp_set_num_threads' - Set upper team size limit
d813 2
a814 2
     parallel sections, if those do not specify a `num_threads' clause.
     The argument of `omp_set_num_threads' shall be a positive integer.
d817 1
a817 1
     _Prototype_:  `void omp_set_num_threads(int num_threads);'
d820 2
a821 2
     _Interface_:  `subroutine omp_set_num_threads(num_threads)'
                   `integer, intent(in) :: num_threads'
d833 1
a833 1
2.29 `omp_set_schedule' - Set the runtime scheduling method
d838 2
a839 2
     value `omp_sched_static', `omp_sched_dynamic', `omp_sched_guided'
     or `omp_sched_auto'.  Except for `omp_sched_auto', the chunk size
d841 1
a841 1
     value if zero or negative.  For `omp_sched_auto' the CHUNK_SIZE
d845 2
a846 2
     _Prototype_:  `void omp_set_schedule(omp_sched_t kind, int
                   chunk_size);'
d849 3
a851 3
     _Interface_:  `subroutine omp_set_schedule(kind, chunk_size)'
                   `integer(kind=omp_sched_kind) kind'
                   `integer chunk_size'
d862 1
a862 1
2.30 `omp_init_lock' - Initialize simple lock
d870 1
a870 1
     _Prototype_:  `void omp_init_lock(omp_lock_t *lock);'
d873 2
a874 2
     _Interface_:  `subroutine omp_init_lock(svar)'
                   `integer(omp_lock_kind), intent(out) :: svar'
d885 1
a885 1
2.31 `omp_set_lock' - Wait for and set simple lock
d889 4
a892 4
     Before setting a simple lock, the lock variable must be
     initialized by `omp_init_lock'.  The calling thread is blocked
     until the lock is available.  If the lock is already held by the
     current thread, a deadlock occurs.
d895 1
a895 1
     _Prototype_:  `void omp_set_lock(omp_lock_t *lock);'
d898 2
a899 2
     _Interface_:  `subroutine omp_set_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d911 1
a911 1
2.32 `omp_test_lock' - Test and set simple lock if available
d915 5
a919 5
     Before setting a simple lock, the lock variable must be
     initialized by `omp_init_lock'.  Contrary to `omp_set_lock',
     `omp_test_lock' does not block if the lock is not available.  This
     function returns `true' upon success, `false' otherwise.  Here,
     `true' and `false' represent their language-specific counterparts.
d922 1
a922 1
     _Prototype_:  `int omp_test_lock(omp_lock_t *lock);'
d925 2
a926 2
     _Interface_:  `logical function omp_test_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d937 1
a937 1
2.33 `omp_unset_lock' - Unset simple lock
d942 4
a945 4
     `omp_set_lock' or `omp_test_lock' before.  In addition, the lock
     must be held by the thread calling `omp_unset_lock'.  Then, the
     lock becomes unlocked.  If one or more threads attempted to set
     the lock before, one of them is chosen to, again, set the lock to
d949 1
a949 1
     _Prototype_:  `void omp_unset_lock(omp_lock_t *lock);'
d952 2
a953 2
     _Interface_:  `subroutine omp_unset_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d964 1
a964 1
2.34 `omp_destroy_lock' - Destroy simple lock
d972 1
a972 1
     _Prototype_:  `void omp_destroy_lock(omp_lock_t *lock);'
d975 2
a976 2
     _Interface_:  `subroutine omp_destroy_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d987 1
a987 1
2.35 `omp_init_nest_lock' - Initialize nested lock
d995 1
a995 1
     _Prototype_:  `void omp_init_nest_lock(omp_nest_lock_t *lock);'
d998 2
a999 2
     _Interface_:  `subroutine omp_init_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(out) :: nvar'
d1010 1
a1010 1
2.36 `omp_set_nest_lock' - Wait for and set nested lock
d1014 4
a1017 5
     Before setting a nested lock, the lock variable must be
     initialized by `omp_init_nest_lock'.  The calling thread is
     blocked until the lock is available.  If the lock is already held
     by the current thread, the nesting count for the lock is
     incremented.
d1020 1
a1020 1
     _Prototype_:  `void omp_set_nest_lock(omp_nest_lock_t *lock);'
d1023 2
a1024 2
     _Interface_:  `subroutine omp_set_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1035 1
a1035 1
2.37 `omp_test_nest_lock' - Test and set nested lock if available
d1039 5
a1043 6
     Before setting a nested lock, the lock variable must be
     initialized by `omp_init_nest_lock'.  Contrary to
     `omp_set_nest_lock', `omp_test_nest_lock' does not block if the
     lock is not available.  If the lock is already held by the current
     thread, the new nesting count is returned.  Otherwise, the return
     value equals zero.
d1046 1
a1046 1
     _Prototype_:  `int omp_test_nest_lock(omp_nest_lock_t *lock);'
d1049 2
a1050 2
     _Interface_:  `logical function omp_test_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1061 1
a1061 1
2.38 `omp_unset_nest_lock' - Unset nested lock
d1066 1
a1066 1
     `omp_set_nested_lock' or `omp_test_nested_lock' before.  In
d1068 1
a1068 1
     `omp_unset_nested_lock'.  If the nesting count drops to zero, the
d1074 1
a1074 1
     _Prototype_:  `void omp_unset_nest_lock(omp_nest_lock_t *lock);'
d1077 2
a1078 2
     _Interface_:  `subroutine omp_unset_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1089 1
a1089 1
2.39 `omp_destroy_nest_lock' - Destroy nested lock
d1098 1
a1098 1
     _Prototype_:  `void omp_destroy_nest_lock(omp_nest_lock_t *);'
d1101 2
a1102 2
     _Interface_:  `subroutine omp_destroy_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1113 1
a1113 1
2.40 `omp_get_wtick' - Get timer precision
d1121 1
a1121 1
     _Prototype_:  `double omp_get_wtick(void);'
d1124 1
a1124 1
     _Interface_:  `double precision function omp_get_wtick()'
d1135 1
a1135 1
2.41 `omp_get_wtime' - Elapsed wall clock time
d1146 1
a1146 1
     _Prototype_:  `double omp_get_wtime(void);'
d1149 1
a1149 1
     _Interface_:  `double precision function omp_get_wtime()'
d1163 1
a1163 1
The environment variables which beginning with `OMP_' are defined by
d1165 1
a1165 1
beginning with `GOMP_' are GNU extensions.
d1192 1
a1192 1
3.1 `OMP_CANCELLATION' - Set whether cancellation is activated
d1196 3
a1198 3
     If set to `TRUE', the cancellation is activated.  If set to
     `FALSE' or if unset, cancellation is disabled and the `cancel'
     construct is ignored.
d1209 1
a1209 1
3.2 `OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
d1213 1
a1213 1
     If set to `TRUE', the OpenMP version number and the values
d1215 1
a1215 1
     `stderr'.  If set to `VERBOSE', it additionally shows the value of
d1217 1
a1217 1
     or set to `FALSE', this information will not be shown.
d1225 1
a1225 1
3.3 `OMP_DEFAULT_DEVICE' - Set the device used in target regions
d1229 5
a1233 5
     Set to choose the device which is used in a `target' region,
     unless the value is overridden by `omp_set_default_device' or by a
     `device' clause.  The value shall be the nonnegative device
     number. If no device with the given device number exists, the code
     is executed on the host.  If unset, device number 0 will be used.
d1244 1
a1244 1
3.4 `OMP_DYNAMIC' - Dynamic adjustment of threads
d1250 2
a1251 2
     `TRUE' or `FALSE'.  If undefined, dynamic adjustment is disabled
     by default.
d1262 1
a1262 1
3.5 `OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1279 1
a1279 1
3.6 `OMP_MAX_TASK_PRIORITY' - Set the maximum priority
d1282 1
a1282 1
number that can be set for a task.  
d1284 2
a1285 2
     Specifies the initial value for the maximum priority value that
     can be set for a task.  The value of this variable shall be a
d1298 1
a1298 1
3.7 `OMP_NESTED' - Nested parallel regions
d1304 1
a1304 1
     environment variable shall be `TRUE' or `FALSE'.  If undefined,
d1316 1
a1316 1
3.8 `OMP_NUM_THREADS' - Specifies the number of threads to use
d1320 5
a1324 5
     Specifies the default number of threads to use in parallel
     regions.  The value of this variable shall be a comma-separated
     list of positive integers; the value specified the number of
     threads to use for the corresponding nested level.  If undefined
     one thread per CPU is used.
d1335 1
a1335 1
3.9 `OMP_PROC_BIND' - Whether theads may be moved between CPUs
d1340 1
a1340 1
     to `TRUE', OpenMP theads should not be moved; if set to `FALSE'
d1342 1
a1342 1
     values `MASTER', `CLOSE' and `SPREAD' can be used to specify the
d1344 3
a1346 3
     `MASTER' the worker threads are in the same place partition as the
     master thread.  With `CLOSE' those are kept close to the master
     thread in contiguous place partitions.  And with `SPREAD' a sparse
d1349 2
a1350 2
     When undefined, `OMP_PROC_BIND' defaults to `TRUE' when
     `OMP_PLACES' or `GOMP_CPU_AFFINITY' is set and `FALSE' otherwise.
d1362 1
a1362 1
3.10 `OMP_PLACES' - Specifies on which CPUs the theads should be placed
d1366 3
a1368 3
     The thread placement can be either specified using an abstract
     name or by an explicit list of the places.  The abstract names
     `threads', `cores' and `sockets' can be optionally followed by a
d1370 3
a1372 3
     shall be created.  With `threads' each place corresponds to a
     single hardware thread; `cores' to a single core with the
     corresponding number of hardware threads; and with `sockets' the
d1374 1
a1374 1
     be shown by setting the `OMP_DISPLAY_ENV' environment variable.
d1387 2
a1388 2
     specifies the same places list: `"{0,1,2}, {3,4,6}, {7,8,9},
     {10,11,12}"'; `"{0:3}, {3:3}, {7:3}, {10:3}"'; and `"{0:2}:4:3"'.
d1390 2
a1391 2
     If `OMP_PLACES' and `GOMP_CPU_AFFINITY' are unset and
     `OMP_PROC_BIND' is either unset or `false', threads may be moved
d1404 1
a1404 1
3.11 `OMP_STACKSIZE' - Set default thread stack size
d1409 7
a1415 7
     is suffixed by `B', `K', `M' or `G', in which case the size is,
     respectively, in bytes, kilobytes, megabytes or gigabytes.  This
     is different from `pthread_attr_setstacksize' which gets the
     number of bytes as an argument.  If the stack size cannot be set
     due to system constraints, an error is reported and the initial
     stack size is left unchanged.  If undefined, the stack size is
     system dependent.
d1423 1
a1423 1
3.12 `OMP_SCHEDULE' - How threads are scheduled
d1427 5
a1431 5
     Allows to specify `schedule type' and `chunk size'.  The value of
     the variable shall have the form: `type[,chunk]' where `type' is
     one of `static', `dynamic', `guided' or `auto' The optional
     `chunk' size shall be a positive integer.  If undefined, dynamic
     scheduling and a chunk size of 1 is used.
d1443 1
a1443 1
3.13 `OMP_THREAD_LIMIT' - Set the maximum number of threads
d1460 1
a1460 1
3.14 `OMP_WAIT_POLICY' - How waiting threads are handled
d1465 2
a1466 2
     the value is `PASSIVE', waiting threads should not consume CPU
     power while waiting; while the value is `ACTIVE' specifies that
d1479 1
a1479 1
3.15 `GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d1487 2
a1488 2
     (M-N:S).  CPU numbers are zero based.  For example,
     `GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
d1492 1
a1492 1
     beginning of the list.  `GOMP_CPU_AFFINITY=0' binds all threads to
d1497 10
a1506 10
     language-specific library functions, e.g., `getenv' in C or
     `GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
     setting of the `GOMP_CPU_AFFINITY' environment variable.  A
     defined CPU affinity on startup cannot be changed or disabled
     during the runtime of the application.

     If both `GOMP_CPU_AFFINITY' and `OMP_PROC_BIND' are set,
     `OMP_PROC_BIND' has a higher precedence.  If neither has been set
     and `OMP_PROC_BIND' is unset, or when `OMP_PROC_BIND' is set to
     `FALSE', the host system will handle the assignment of threads to
d1515 1
a1515 1
3.16 `GOMP_DEBUG' - Enable debugging output
d1519 2
a1520 2
     Enable debugging output.  The variable should be set to `0'
     (disabled, also the default if not set), or `1' (enabled).
d1529 1
a1529 1
3.17 `GOMP_STACKSIZE' - Set default thread stack size
d1534 1
a1534 1
     from `pthread_attr_setstacksize' which gets the number of bytes as
d1551 1
a1551 1
3.18 `GOMP_SPINCOUNT' - Set the busy-wait spin count
d1557 1
a1557 1
     value may be either `INFINITE', `INFINITY' to always wait actively
d1560 8
a1567 9
     suffixes acting as multiplication factors: `k' (kilo, thousand),
     `M' (mega, million), `G' (giga, billion), or `T' (tera, trillion).
     If undefined, 0 is used when `OMP_WAIT_POLICY' is `PASSIVE',
     300,000 is used when `OMP_WAIT_POLICY' is undefined and 30 billion
     is used when `OMP_WAIT_POLICY' is `ACTIVE'.  If there are more
     OpenMP threads than available CPUs, 1000 and 100 spins are used
     for `OMP_WAIT_POLICY' being `ACTIVE' or undefined, respectively;
     unless the `GOMP_SPINCOUNT' is lower or `OMP_WAIT_POLICY' is
     `PASSIVE'.
d1575 1
a1575 1
3.19 `GOMP_RTEMS_THREAD_POOLS' - Set the RTEMS specific thread pools
d1581 4
a1584 4
     thread pools.  The format for `GOMP_RTEMS_THREAD_POOLS' is a list
     of optional `<thread-pool-count>[$<priority>]@@<scheduler-name>'
     configurations separated by `:' where:
        * `<thread-pool-count>' is the thread pool count for this
d1586 2
a1587 3

        * `$<priority>' is an optional priority for the worker threads
          of a thread pool according to `pthread_setschedparam'.  In
d1593 1
a1593 2

        * `@@<scheduler-name>' is the scheduler instance name according
d1596 4
a1599 5
     instance, then each OpenMP master thread of this scheduler
     instance will use its own dynamically allocated thread pool.  To
     limit the worker thread count of the thread pools, each OpenMP
     master thread must call `omp_set_num_threads'.

d1601 2
a1602 2
     Lets suppose we have three scheduler instances `IO', `WRK0', and
     `WRK1' with `GOMP_RTEMS_THREAD_POOLS' set to `"1@@WRK0:3$4@@WRK1"'.
d1604 1
a1604 1
     `IO'.  In the scheduler instance `WRK0' there is one thread pool
d1607 3
a1609 3
     master thread that created it.  In the scheduler instance `WRK1'
     there are three thread pools available and their worker threads
     run at priority four.
d1618 4
a1621 4
compile-time flag `-fopenacc' must be specified.  This enables the
OpenACC directive `#pragma acc' in C/C++ and `!$accp' directives in
free form, `c$acc', `*$acc' and `!$acc' directives in fixed form, `!$'
conditional compilation sentinels in free form and `c$', `*$' and `!$'
d1631 2
a1632 2
future versions of GCC.  See `https://gcc.gnu.org/wiki/OpenACC' for
more information.
d1642 3
a1644 3
throw exceptions.  Generally, they are available only for the host,
with the exception of `acc_on_device', which is available for both the
host and the acceleration device.
d1707 1
a1707 1
5.1 `acc_get_num_devices' - Get number of devices for given device type
d1715 1
a1715 1
     _Prototype_:  `int acc_get_num_devices(acc_device_t devicetype);'
d1718 2
a1719 2
     _Interface_:  `integer function acc_get_num_devices(devicetype)'
                   `integer(kind=acc_device_kind) devicetype'
d1728 1
a1728 1
5.2 `acc_set_device_type' - Set type of device accelerator to use.
d1737 1
a1737 1
     _Prototype_:  `acc_set_device_type(acc_device_t devicetype);'
d1740 2
a1741 2
     _Interface_:  `subroutine acc_set_device_type(devicetype)'
                   `integer(kind=acc_device_kind) devicetype'
d1750 1
a1750 1
5.3 `acc_get_device_type' - Get type of device accelerator to be used.
d1758 1
a1758 1
     _Prototype_:  `acc_device_t acc_get_device_type(void);'
d1761 2
a1762 2
     _Interface_:  `function acc_get_device_type(void)'
                   `integer(kind=acc_device_kind) acc_get_device_type'
d1771 1
a1771 1
5.4 `acc_set_device_num' - Set device number to use.
d1780 1
a1780 2
     _Prototype_:  `acc_set_device_num(int num, acc_device_t
                   devicetype);'
d1783 3
a1785 3
     _Interface_:  `subroutine acc_set_device_num(devicenum, devicetype)'
                   `integer devicenum'
                   `integer(kind=acc_device_kind) devicetype'
d1794 1
a1794 1
5.5 `acc_get_device_num' - Get device number to be used.
d1803 1
a1803 1
     _Prototype_:  `int acc_get_device_num(acc_device_t devicetype);'
d1806 3
a1808 3
     _Interface_:  `function acc_get_device_num(devicetype)'
                   `integer(kind=acc_device_kind) devicetype'
                   `integer acc_get_device_num'
d1817 1
a1817 1
5.6 `acc_async_test' - Test for completion of a specific asynchronous operation.
d1822 4
a1825 4
     specified in ARG. In C/C++, a non-zero value will be returned to
     indicate the specified asynchronous operation has completed. While
     Fortran will return a `true'. If the asynchrounous operation has
     not completed, C/C++ returns a zero and Fortran returns a `false'.
d1828 1
a1828 1
     _Prototype_:  `int acc_async_test(int arg);'
d1831 3
a1833 3
     _Interface_:  `function acc_async_test(arg)'
                   `integer(kind=acc_handle_kind) arg'
                   `logical acc_async_test'
d1842 1
a1842 1
5.7 `acc_async_test_all' - Tests for completion of all asynchronous operations.
d1848 3
a1850 3
     asynchronous operations have completed. While Fortran will return
     a `true'. If any asynchronous operation has not completed, C/C++
     returns a zero and Fortran returns a `false'.
d1853 1
a1853 1
     _Prototype_:  `int acc_async_test_all(void);'
d1856 2
a1857 2
     _Interface_:  `function acc_async_test()'
                   `logical acc_get_device_num'
d1866 1
a1866 1
5.8 `acc_wait' - Wait for completion of a specific asynchronous operation.
d1874 1
a1874 1
     _Prototype_:  `acc_wait(arg);'
d1877 2
a1878 2
     _Interface_:  `subroutine acc_wait(arg)'
                   `integer(acc_handle_kind) arg'
d1887 1
a1887 1
5.9 `acc_wait_all' - Waits for completion of all asynchronous operations.
d1895 1
a1895 1
     _Prototype_:  `acc_wait_all(void);'
d1898 1
a1898 1
     _Interface_:  `subroutine acc_wait_async()'
d1907 1
a1907 1
5.10 `acc_wait_all_async' - Wait for completion of all asynchronous operations.
d1916 1
a1916 1
     _Prototype_:  `acc_wait_all_async(int async);'
d1919 2
a1920 2
     _Interface_:  `subroutine acc_wait_all_async(async)'
                   `integer(acc_handle_kind) async'
d1929 1
a1929 1
5.11 `acc_wait_async' - Wait for completion of asynchronous operations.
d1937 1
a1937 1
     _Prototype_:  `acc_wait_async(int arg, int async);'
d1940 2
a1941 2
     _Interface_:  `subroutine acc_wait_async(arg, async)'
                   `integer(acc_handle_kind) arg, async'
d1950 1
a1950 1
5.12 `acc_init' - Initialize runtime for a specific device type.
d1954 2
a1955 2
     This function initializes the runtime for the device type
     specified in DEVICETYPE.
d1958 1
a1958 1
     _Prototype_:  `acc_init(acc_device_t devicetype);'
d1961 2
a1962 2
     _Interface_:  `subroutine acc_init(devicetype)'
                   `integer(acc_device_kind) devicetype'
d1971 1
a1971 1
5.13 `acc_shutdown' - Shuts down the runtime for a specific device type.
d1979 1
a1979 1
     _Prototype_:  `acc_shutdown(acc_device_t devicetype);'
d1982 2
a1983 2
     _Interface_:  `subroutine acc_shutdown(devicetype)'
                   `integer(acc_device_kind) devicetype'
d1992 1
a1992 1
5.14 `acc_on_device' - Whether executing on a particular device
d1997 1
a1997 1
     particular device specified in DEVICETYPE. In C/C++ a non-zero
d1999 1
a1999 1
     specified device type.  In Fortran, `true' will be returned. If
d2001 1
a2001 1
     will return a zero, while Fortran will return `false'.
d2004 1
a2004 1
     _Prototype_:  `acc_on_device(acc_device_t devicetype);'
d2007 3
a2009 3
     _Interface_:  `function acc_on_device(devicetype)'
                   `integer(acc_device_kind) devicetype'
                   `logical acc_on_device'
d2018 1
a2018 1
5.15 `acc_malloc' - Allocate device memory.
d2022 1
a2022 1
     This function allocates LEN bytes of device memory. It returns the
d2026 1
a2026 1
     _Prototype_:  `d_void* acc_malloc(size_t len);'
d2035 1
a2035 1
5.16 `acc_free' - Free device memory.
d2039 1
a2039 1
     Free previously allocated device memory at the device address `a'.
d2042 1
a2042 1
     _Prototype_:  `acc_free(d_void *a);'
d2051 1
a2051 1
5.17 `acc_copyin' - Allocate device memory and copy host memory to it.
d2056 1
a2056 1
     maps it to the specified host address in A. The device address of
d2059 3
a2061 3
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies a
     variable or array element and LEN specifies the length in bytes.
d2064 1
a2064 1
     _Prototype_:  `void *acc_copyin(h_void *a, size_t len);'
d2067 5
a2071 5
     _Interface_:  `subroutine acc_copyin(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_copyin(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2080 1
a2080 1
5.18 `acc_present_or_copyin' - If the data is not present on the device, allocate device memory and copy from host memory.
d2085 3
a2087 3
     LEN is present or not. If it is not present, then device memory
     will be allocated and the host memory copied. The device address of
     the newly allocated device memory is returned.
d2089 2
a2090 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2094 2
a2095 2
     _Prototype_:  `void *acc_present_or_copyin(h_void *a, size_t len);'
     _Prototype_:  `void *acc_pcopyin(h_void *a, size_t len);'
d2098 10
a2107 10
     _Interface_:  `subroutine acc_present_or_copyin(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_present_or_copyin(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
     _Interface_:  `subroutine acc_pcopyin(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_pcopyin(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2116 1
a2116 1
5.19 `acc_create' - Allocate device memory and map it to host memory.
d2121 1
a2121 1
     specified by the host address A with a length of LEN bytes. In
d2125 2
a2126 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2130 1
a2130 1
     _Prototype_:  `void *acc_create(h_void *a, size_t len);'
d2133 5
a2137 5
     _Interface_:  `subroutine acc_create(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_create(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2146 1
a2146 1
5.20 `acc_present_or_create' - If the data is not present on the device, allocate device memory and map it to host memory.
d2151 2
a2152 2
     LEN is present or not. If it is not present, then device memory
     will be allocated and mapped to host memory. In C/C++, the device
d2155 2
a2156 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2160 2
a2161 2
     _Prototype_:  `void *acc_present_or_create(h_void *a, size_t len)'
     _Prototype_:  `void *acc_pcreate(h_void *a, size_t len)'
d2164 10
a2173 10
     _Interface_:  `subroutine acc_present_or_create(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_present_or_create(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
     _Interface_:  `subroutine acc_pcreate(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_pcreate(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2182 1
a2182 1
5.21 `acc_copyout' - Copy device memory to host memory.
d2189 2
a2190 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2194 1
a2194 1
     _Prototype_:  `acc_copyout(h_void *a, size_t len);'
d2197 5
a2201 5
     _Interface_:  `subroutine acc_copyout(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_copyout(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2210 1
a2210 1
5.22 `acc_delete' - Free device memory.
d2217 2
a2218 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2222 1
a2222 1
     _Prototype_:  `acc_delete(h_void *a, size_t len);'
d2225 5
a2229 5
     _Interface_:  `subroutine acc_delete(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_delete(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2238 1
a2238 1
5.23 `acc_update_device' - Update device memory from mapped host memory.
d2246 2
a2247 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2251 1
a2251 1
     _Prototype_:  `acc_update_device(h_void *a, size_t len);'
d2254 5
a2258 5
     _Interface_:  `subroutine acc_update_device(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_update_device(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2267 1
a2267 1
5.24 `acc_update_self' - Update host memory from mapped device memory.
d2275 2
a2276 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2280 1
a2280 1
     _Prototype_:  `acc_update_self(h_void *a, size_t len);'
d2283 5
a2287 5
     _Interface_:  `subroutine acc_update_self(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_update_self(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2296 1
a2296 1
5.25 `acc_map_data' - Map previously allocated device memory to host memory.
d2301 1
a2301 1
     The device memory is specified with the device address D. The host
d2305 1
a2305 1
     _Prototype_:  `acc_map_data(h_void *h, d_void *d, size_t len);'
d2314 1
a2314 1
5.26 `acc_unmap_data' - Unmap device memory from host memory.
d2318 1
a2318 1
     This function unmaps previously mapped device and host memory. The
d2322 1
a2322 1
     _Prototype_:  `acc_unmap_data(h_void *h);'
d2331 1
a2331 1
5.27 `acc_deviceptr' - Get device pointer associated with specific host address.
d2339 1
a2339 1
     _Prototype_:  `void *acc_deviceptr(h_void *h);'
d2348 1
a2348 1
5.28 `acc_hostptr' - Get host pointer associated with specific device address.
d2356 1
a2356 1
     _Prototype_:  `void *acc_hostptr(d_void *d);'
d2365 1
a2365 1
5.29 `acc_is_present' - Indicate whether host variable / array is present on device.
d2369 2
a2370 2
     This function indicates whether the specified host address in A
     and a length of LEN bytes is present on the device. In C/C++, a
d2372 1
a2372 1
     memory on the device. A zero is returned to indicate the memory is
d2375 2
a2376 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2378 2
a2379 2
     If the host memory is mapped to device memory, then a `true' is
     returned. Otherwise, a `false' is return to indicate the mapped
d2383 1
a2383 1
     _Prototype_:  `int acc_is_present(h_void *a, size_t len);'
d2386 7
a2392 7
     _Interface_:  `function acc_is_present(a)'
                   `type, dimension(:[,:]...) :: a'
                   `logical acc_is_present'
     _Interface_:  `function acc_is_present(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
                   `logical acc_is_present'
d2401 1
a2401 1
5.30 `acc_memcpy_to_device' - Copy host memory to device memory.
d2410 2
a2411 2
     _Prototype_:  `acc_memcpy_to_device(d_void *dest, h_void *src,
                   size_t bytes);'
d2420 1
a2420 1
5.31 `acc_memcpy_from_device' - Copy device memory to host memory.
d2429 2
a2430 2
     _Prototype_:  `acc_memcpy_from_device(d_void *dest, h_void *src,
                   size_t bytes);'
d2439 1
a2439 1
5.32 `acc_get_current_cuda_device' - Get CUDA device handle.
d2443 1
a2443 1
     This function returns the CUDA device handle. This handle is the
d2447 1
a2447 1
     _Prototype_:  `void *acc_get_current_cuda_device(void);'
d2456 1
a2456 1
5.33 `acc_get_current_cuda_context' - Get CUDA context handle.
d2460 1
a2460 1
     This function returns the CUDA context handle. This handle is the
d2464 1
a2464 1
     _Prototype_:  `acc_get_current_cuda_context(void);'
d2473 1
a2473 1
5.34 `acc_get_cuda_stream' - Get CUDA stream handle.
d2477 1
a2477 1
     This function returns the CUDA stream handle. This handle is the
d2481 1
a2481 1
     _Prototype_:  `acc_get_cuda_stream(void);'
d2490 1
a2490 1
5.35 `acc_set_cuda_stream' - Set CUDA stream handle.
d2498 1
a2498 1
     _Prototype_:  `acc_set_cuda_stream(int async void *stream);'
d2510 1
a2510 1
The variables `ACC_DEVICE_TYPE' and `ACC_DEVICE_NUM' are defined by
d2512 1
a2512 1
`GCC_ACC_NOTIFY' is used for diagnostic purposes.
d2523 1
a2523 1
6.1 `ACC_DEVICE_TYPE'
d2532 1
a2532 1
6.2 `ACC_DEVICE_NUM'
d2541 1
a2541 1
6.3 `GCC_ACC_NOTIFY'
d2553 1
a2553 1
This applies to the `nvptx' plugin only.
d2562 4
a2565 4
`async' and `wait' clauses.  When the `async' clause is first used with
a directive, it creates a CUDA stream.  If an `async-argument' is used
with the `async' clause, then the stream is associated with the
specified `async-argument'.
d2568 2
a2569 2
the `async-argument' of an `async' clause, both the `wait' clause and
the `wait' directive can be used.  When either the clause or directive
d2572 1
a2572 1
`async-argument', that is, stream, have completed.
d2575 2
a2576 2
of using the `async' clause, is done without any intervention by the
caller.  This implies the association between the `async-argument' and
d2579 5
a2583 5
function `acc_set_cuda_stream'.  When the function
`acc_set_cuda_stream' is called, the CUDA stream that was originally
associated with the `async' clause will be destroyed.  Caution should
be taken when changing the association as subsequent references to the
`async-argument' refer to a different CUDA stream.
d2600 4
a2603 4
programs that use the Runtime library directly, or another library
based on the Runtime library, e.g., CUBLAS(1).  This chapter describes
the use cases and what changes are required in order to use both the
OpenACC library and the CUBLAS and Runtime libraries within a program.
d2609 2
a2610 2
called prior to any of the functions in the OpenACC library. More
specifically, the function `cublasCreate()'.
d2615 5
a2619 5
returned to the caller. The OpenACC library also requires
initialization and allocation of hardware resources. Since the CUBLAS
library has already allocated the hardware resources for the device,
all that is left to do is to initialize the OpenACC library and acquire
the hardware resources on the host.
d2622 10
a2631 10
and allocate the host hardware resources, you need to acquire the
device number that was allocated during the call to `cublasCreate()'.
The invoking of the runtime library function `cudaGetDevice()'
accomplishes this. Once acquired, the device number is passed along
with the device type as parameters to the OpenACC library function
`acc_set_device_num()'.

   Once the call to `acc_set_device_num()' has completed, the OpenACC
library uses the  context that was created during the call to
`cublasCreate()'. In other words, both libraries will be sharing the
d2652 2
a2653 1
                                 Use Case 1
d2659 2
a2660 2
is called prior to any of the functions in the CUBLAS library. More
specificially, the function `acc_set_device_num()'.
d2662 1
a2662 1
   In the use case presented here, the function `acc_set_device_num()'
d2664 3
a2666 3
resources on the host and the device. In the call to the function, the
call parameters specify which device to use and what device type to
use, i.e., `acc_device_nvidia'. It should be noted that this is but one
d2668 1
a2668 1
hardware resources. Other methods are available through the use of
d2671 1
a2671 1
   Once the call to `acc_set_device_num()' has completed, other OpenACC
d2673 4
a2676 4
`acc_copyin()'. In addition, calls can be made to functions in the
CUBLAS library. In the use case a call to `cublasCreate()' is made
subsequent to the calls to `acc_copyin()'.  As seen in the previous use
case, a call to `cublasCreate()' initializes the CUBLAS library and
d2678 1
a2678 1
since the device has already been allocated, `cublasCreate()' will only
d2680 1
a2680 1
resources on the host. The context that was created as part of the
d2722 2
a2723 1
                                 Use Case 2
d2730 1
a2730 1
`ACC_DEVICE_TYPE' and `ACC_DEVICE_NUM', respecively. These two
d2732 2
a2733 2
`acc_set_device_num()'. As seen in the second use case, the device type
and device number were specified using `acc_set_device_num()'.  If
d2735 1
a2735 1
call to `acc_set_device_num()' would not be required.
d2737 4
a2740 4
   The use of the environment variables is only relevant when an
OpenACC function is called prior to a call to `cudaCreate()'. If
`cudaCreate()' is called prior to a call to an OpenACC function, then
you must call `acc_set_device_num()'(2)
d2746 2
a2747 2
Interoperability", in "CUDA Driver API", TRM-06703-001, Version 5.5,
for additional information on library interoperability.
d2749 2
a2750 2
   (2) More complete information about `ACC_DEVICE_TYPE' and
`ACC_DEVICE_NUM' can be found in sections 4.1 and 4.2 of the OpenACC
d2760 2
a2761 2
The following sections present notes on the external ABI as presented
by libgomp.  Only maintainers should need them.
d2822 1
a2822 1
The target should implement the `__sync' builtins.
d2838 1
a2838 1
Expands to the `__sync_synchronize' builtin.
d2854 4
a2857 4
In _most_ cases we can map this directly to `__thread'.  Except that
OMP allows constructors for C++ objects.  We can either refuse to
support this (how often is it used?) or we can implement something akin
to .ctors.
d2889 2
a2890 2
   It is not clear what to do with bare FOR or SECTION blocks.  The
only thing I can figure is that we do something like:
d2908 2
a2909 2
for the two variables, i.e. not something you could write directly in
C.  Presumably this only makes sense if the "outer" x and y are global
d2922 4
a2925 4
pointer to an array of the type of the variable, indexed by the
thread's TEAM_ID.  The thread stores its final value into the array,
and after the barrier, the master thread iterates over the array to
collect the values.
d2962 3
a2964 3
   The function needs to create the appropriate number of threads
and/or launch them from the dock.  It needs to create the team
structure and assign team ids.
d2969 1
a2969 1
`omp_in_parallel()' state.
d3021 2
a3022 2
also pull it into a local variable if we like, but since its supposed
to remain unchanged, we can also not if we like.
d3024 5
a3028 5
   If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be
able to get away with no work-sharing context at all, since we can
simply perform the arithmetic directly in each thread to divide up the
iterations.  Which would mean that we wouldn't need to call any of
these routines.
d3130 2
a3131 2
"openacc", or "openmp", or both to the keywords field in the bug
report, as appropriate.
d3141 1
a3141 1
     Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/'
d3169 3
a3171 3
these rights or asking you to surrender the rights.  Therefore, you
have certain responsibilities if you distribute copies of the software,
or if you modify it: responsibilities to respect the freedom of others.
d3190 9
a3198 10
modified versions of the software inside them, although the
manufacturer can do so.  This is fundamentally incompatible with the
aim of protecting users' freedom to change the software.  The
systematic pattern of such abuse occurs in the area of products for
individuals to use, which is precisely where it is most unacceptable.
Therefore, we have designed this version of the GPL to prohibit the
practice for those products.  If such problems arise substantially in
other domains, we stand ready to extend this provision to those domains
in future versions of the GPL, as needed to protect the freedom of
users.
d3235 2
a3236 2
     infringement under applicable copyright law, except executing it
     on a computer or modifying a private copy.  Propagation includes
d3250 2
a3251 2
     the extent that warranties are provided), that licensees may
     convey the work under this License, and how to view a copy of this
d3259 2
a3260 2
     for making modifications to it.  "Object code" means any
     non-source form of a work.
d3271 4
a3274 4
     Major Component, and (b) serves only to enable use of the work
     with that Major Component, or to implement a Standard Interface
     for which an implementation is available to the public in source
     code form.  A "Major Component", in this context, means a major
d3282 3
a3284 3
     work) run the object code and to modify the work, including
     scripts to control those activities.  However, it does not include
     the work's System Libraries, or general-purpose tools or generally
d3287 4
a3290 4
     Corresponding Source includes interface definition files
     associated with source files for the work, and the source code for
     shared libraries and dynamically linked subprograms that the work
     is specifically designed to require, such as by intimate data
d3307 4
a3310 4
     a covered work is covered by this License only if the output,
     given its content, constitutes a covered work.  This License
     acknowledges your rights of fair use or other equivalent, as
     provided by copyright law.
d3315 8
a3322 8
     sole purpose of having them make modifications exclusively for
     you, or provide you with facilities for running those works,
     provided that you comply with the terms of this License in
     conveying all material for which you do not control copyright.
     Those thus making or running the covered works for you must do so
     exclusively on your behalf, under your direction and control, on
     terms that prohibit them from making any copies of your
     copyrighted material outside their relationship with you.
d3339 2
a3340 2
     with respect to the covered work, and you disclaim any intention
     to limit operation or modification of the work as a means of
d3410 2
a3411 2
          written offer, valid for at least three years and valid for
          as long as you offer spare parts or customer support for that
d3421 2
a3422 2
       c. Convey individual copies of the object code with a copy of
          the written offer to provide the Corresponding Source.  This
d3428 2
a3429 2
          place (gratis or for a charge), and offer equivalent access
          to the Corresponding Source in the same way through the same
d3433 4
a3436 4
          Corresponding Source may be on a different server (operated
          by you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to
          the object code saying where to find the Corresponding Source.
d3438 2
a3439 2
          remain obligated to ensure that it is available for as long
          as needed to satisfy these requirements.
a3445 1

d3453 2
a3454 2
     incorporation into a dwelling.  In determining whether a product
     is a consumer product, doubtful cases shall be resolved in favor of
d3485 5
a3489 5
     warranty, or updates for a work that has been modified or
     installed by the recipient, or for the User Product in which it
     has been modified or installed.  Access to a network may be denied
     when the modification itself materially and adversely affects the
     operation of the network or violates the rules and protocols for
d3519 2
a3520 2
     holders of that material) supplement the terms of this License
     with terms:
d3530 2
a3531 3
          or requiring that modified versions of such material be
          marked in reasonable ways as different from the original
          version; or
d3550 4
a3553 5
     contains a further restriction but permits relicensing or
     conveying under this License, you may add to a covered work
     material governed by the terms of that license document, provided
     that the further restriction does not survive such relicensing or
     conveying.
d3569 2
a3570 2
     under this License (including any patent licenses granted under
     the third paragraph of section 11).
d3574 2
a3575 2
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
d3587 4
a3590 4
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, you do not qualify to receive new
     licenses for the same material under section 10.
d3604 1
a3604 1
 10. Automatic Licensing of Downstream Recipients.
d3618 4
a3621 4
     could give under the previous paragraph, plus a right to
     possession of the Corresponding Source of the work from the
     predecessor in interest, if the predecessor has it or can get it
     with reasonable efforts.
d3625 6
a3630 6
     may not impose a license fee, royalty, or other charge for
     exercise of rights granted under this License, and you may not
     initiate litigation (including a cross-claim or counterclaim in a
     lawsuit) alleging that any patent claim is infringed by making,
     using, selling, offering for sale, or importing the Program or any
     portion of it.
d3632 1
a3632 1
 11. Patents.
d3652 2
a3653 2
     otherwise run, modify and propagate the contents of its
     contributor version.
d3658 3
a3660 3
     patent or covenant not to sue for patent infringement).  To
     "grant" such a patent license to a party means to make such an
     agreement or commitment not to enforce a patent against the party.
d3690 10
a3699 10
     party that is in the business of distributing software, under
     which you make payment to the third party based on the extent of
     your activity of conveying the work, and under which the third
     party grants, to any of the parties who would receive the covered
     work from you, a discriminatory patent license (a) in connection
     with copies of the covered work conveyed by you (or copies made
     from those copies), or (b) primarily for and in connection with
     specific products or compilations that contain the covered work,
     unless you entered into that arrangement, or that patent license
     was granted, prior to 28 March 2007.
d3705 1
a3705 1
 12. No Surrender of Others' Freedom.
d3707 10
a3716 11
     If conditions are imposed on you (whether by court order,
     agreement or otherwise) that contradict the conditions of this
     License, they do not excuse you from the conditions of this
     License.  If you cannot convey a covered work so as to satisfy
     simultaneously your obligations under this License and any other
     pertinent obligations, then as a consequence you may not convey it
     at all.  For example, if you agree to terms that obligate you to
     collect a royalty for further conveying from those to whom you
     convey the Program, the only way you could satisfy both those
     terms and this License would be to refrain entirely from conveying
     the Program.
d3718 1
a3718 1
 13. Use with the GNU Affero General Public License.
d3729 1
a3729 1
 14. Revised Versions of this License.
d3732 3
a3734 4
     versions of the GNU General Public License from time to time.
     Such new versions will be similar in spirit to the present
     version, but may differ in detail to address new problems or
     concerns.
d3740 4
a3743 4
     that numbered version or of any later version published by the
     Free Software Foundation.  If the Program does not specify a
     version number of the GNU General Public License, you may choose
     any version ever published by the Free Software Foundation.
d3755 1
a3755 1
 15. Disclaimer of Warranty.
d3758 1
a3758 1
     APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE
d3762 1
a3762 1
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE
d3767 1
a3767 1
 16. Limitation of Liability.
d3771 2
a3772 2
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
     FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
d3780 1
a3780 1
 17. Interpretation of Sections 15 and 16.
a3788 1

d3819 1
a3819 1
     along with this program.  If not, see `http://www.gnu.org/licenses/'.
d3828 1
a3828 1
     This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
d3830 1
a3830 1
     under certain conditions; type `show c' for details.
d3832 1
a3832 1
   The hypothetical commands `show w' and `show c' should show the
d3840 1
a3840 1
the GNU GPL, see `http://www.gnu.org/licenses/'.
d3847 1
a3847 1
please read `http://www.gnu.org/philosophy/why-not-lgpl.html'.
d3858 1
a3858 1
     `http://fsf.org/'
d3883 2
a3884 2
     of subject matter or whether it is published as a printed book.
     We recommend this License principally for works whose purpose is
d3890 2
a3891 2
     that contains a notice placed by the copyright holder saying it
     can be distributed under the terms of this License.  Such a notice
d3895 3
a3897 3
     of the public is a licensee, and is addressed as "you".  You
     accept the license if you copy, modify or distribute the work in a
     way requiring permission under copyright law.
d3915 6
a3920 6
     titles are designated, as being those of Invariant Sections, in
     the notice that says that the Document is released under this
     License.  If a section does not fit the above definition of
     Secondary then it is not allowed to be designated as Invariant.
     The Document may contain zero Invariant Sections.  If the Document
     does not identify any Invariant Sections then there are none.
d3931 10
a3940 10
     straightforwardly with generic text editors or (for images
     composed of pixels) generic paint programs or (for drawings) some
     widely available drawing editor, and that is suitable for input to
     text formatters or for automatic translation to a variety of
     formats suitable for input to text formatters.  A copy made in an
     otherwise Transparent file format whose markup, or absence of
     markup, has been arranged to thwart or discourage subsequent
     modification by readers is not Transparent.  An image format is
     not Transparent if used for any substantial amount of text.  A
     copy that is not "Transparent" is called "Opaque".
d3944 8
a3951 8
     SGML or XML using a publicly available DTD, and
     standard-conforming simple HTML, PostScript or PDF designed for
     human modification.  Examples of transparent image formats include
     PNG, XCF and JPG.  Opaque formats include proprietary formats that
     can be read and edited only by proprietary word processors, SGML or
     XML for which the DTD and/or processing tools are not generally
     available, and the machine-generated HTML, PostScript or PDF
     produced by some word processors for output purposes only.
d3989 2
a3990 2
     distribute a large enough number of copies you must also follow
     the conditions in section 3.
d4004 5
a4008 6
     front cover must present the full title with all words of the
     title equally prominent and visible.  You may add other material
     on the covers in addition.  Copying with changes limited to the
     covers, as long as they preserve the title of the Document and
     satisfy these conditions, can be treated as verbatim copying in
     other respects.
d4016 11
a4026 12
     numbering more than 100, you must either include a
     machine-readable Transparent copy along with each Opaque copy, or
     state in or with each Opaque copy a computer-network location from
     which the general network-using public has access to download
     using public-standard network protocols a complete Transparent
     copy of the Document, free of added material.  If you use the
     latter option, you must take reasonably prudent steps, when you
     begin distribution of Opaque copies in quantity, to ensure that
     this Transparent copy will remain thus accessible at the stated
     location until at least one year after the last time you
     distribute an Opaque copy (directly or through your agents or
     retailers) of that edition to the public.
d4029 3
a4031 3
     the Document well before redistributing any large number of
     copies, to give them a chance to provide you with an updated
     version of the Document.
d4037 5
a4041 5
     release the Modified Version under precisely this License, with
     the Modified Version filling the role of the Document, thus
     licensing distribution and modification of the Modified Version to
     whoever possesses a copy of it.  In addition, you must do these
     things in the Modified Version:
d4044 5
a4048 5
          distinct from that of the Document, and from those of
          previous versions (which should, if there were any, be listed
          in the History section of the Document).  You may use the
          same title as a previous version if the original publisher of
          that version gives permission.
d4078 6
a4083 6
          authors, and publisher of the Modified Version as given on
          the Title Page.  If there is no section Entitled "History" in
          the Document, create one stating the title, year, authors,
          and publisher of the Document as given on its Title Page,
          then add an item describing the Modified Version as stated in
          the previous sentence.
d4088 5
a4092 5
          previous versions it was based on.  These may be placed in
          the "History" section.  You may omit a network location for a
          work that was published at least four years before the
          Document itself, or if the original publisher of the version
          it refers to gives permission.
d4095 2
a4096 2
          Preserve the Title of the section, and preserve in the
          section all the substance and tone of each of the contributor
d4099 3
a4101 4
       L. Preserve all the Invariant Sections of the Document,
          unaltered in their text and in their titles.  Section numbers
          or the equivalent are not considered part of the section
          titles.
d4114 5
a4118 5
     material copied from the Document, you may at your option
     designate some or all of these sections as invariant.  To do this,
     add their titles to the list of Invariant Sections in the Modified
     Version's license notice.  These titles must be distinct from any
     other section titles.
d4127 9
a4135 9
     and a passage of up to 25 words as a Back-Cover Text, to the end
     of the list of Cover Texts in the Modified Version.  Only one
     passage of Front-Cover Text and one of Back-Cover Text may be
     added by (or through arrangements made by) any one entity.  If the
     Document already includes a cover text for the same cover,
     previously added by you or by arrangement made by the same entity
     you are acting on behalf of, you may not add another; but you may
     replace the old one, on explicit permission from the previous
     publisher that added the old one.
d4145 2
a4146 2
     modified versions, provided that you include in the combination
     all of the Invariant Sections of all of the original documents,
d4173 2
a4174 2
     rules of this License for verbatim copying of each of the
     documents in all other respects.
d4178 3
a4180 3
     a copy of this License into the extracted document, and follow
     this License in all other respects regarding verbatim copying of
     that document.
d4185 2
a4186 2
     separate and independent documents or works, in or on a volume of
     a storage or distribution medium, is called an "aggregate" if the
d4231 2
a4232 2
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
d4244 4
a4247 4
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, receipt of a copy of some or all of
     the same material does not give you any rights to use it.
d4249 1
a4249 1
 10. FUTURE REVISIONS OF THIS LICENSE
d4255 1
a4255 1
     `http://www.gnu.org/copyleft/'.
d4262 5
a4266 5
     published (not as a draft) by the Free Software Foundation.  If
     the Document does not specify a version number of this License,
     you may choose any version ever published (not as a draft) by the
     Free Software Foundation.  If the Document specifies that a proxy
     can decide which future versions of this License can be used, that
d4270 1
a4270 1
 11. RELICENSING
a4299 1

d4316 1
a4316 1
Texts, replace the "with...Texts." line with this:
d4327 3
a4329 3
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License, to
permit their use in free software.
d4359 2
a4360 2
can greatly alter what fraction of the sales price counts as profit.
If the price you pay is $50, ten percent of the profit is probably less
d4370 2
a4371 2
ports such as adding a new CPU to the GNU Compiler Collection
contribute more; major new features or packages contribute the most.
d4390 19
a4408 1
* Environment Variable <1>:              GOMP_RTEMS_THREAD_POOLS.
a4409 18
* Environment Variable <2>:              GOMP_SPINCOUNT.        (line 6)
* Environment Variable <3>:              GOMP_STACKSIZE.        (line 6)
* Environment Variable <4>:              GOMP_DEBUG.            (line 6)
* Environment Variable <5>:              GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <6>:              OMP_WAIT_POLICY.       (line 6)
* Environment Variable <7>:              OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <8>:              OMP_SCHEDULE.          (line 6)
* Environment Variable <9>:              OMP_STACKSIZE.         (line 6)
* Environment Variable <10>:             OMP_PLACES.            (line 6)
* Environment Variable <11>:             OMP_PROC_BIND.         (line 6)
* Environment Variable <12>:             OMP_NUM_THREADS.       (line 6)
* Environment Variable <13>:             OMP_NESTED.            (line 6)
* Environment Variable <14>:             OMP_MAX_TASK_PRIORITY. (line 6)
* Environment Variable <15>:             OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable <16>:             OMP_DYNAMIC.           (line 6)
* Environment Variable <17>:             OMP_DEFAULT_DEVICE.    (line 6)
* Environment Variable <18>:             OMP_DISPLAY_ENV.       (line 6)
* Environment Variable:                  OMP_CANCELLATION.      (line 6)
d4412 6
a4417 1
* Implementation specific setting <1>:   GOMP_RTEMS_THREAD_POOLS.
a4418 5
* Implementation specific setting <2>:   GOMP_SPINCOUNT.        (line 6)
* Implementation specific setting <3>:   GOMP_STACKSIZE.        (line 6)
* Implementation specific setting <4>:   OMP_SCHEDULE.          (line 6)
* Implementation specific setting <5>:   OMP_NUM_THREADS.       (line 6)
* Implementation specific setting:       OMP_NESTED.            (line 6)
d4424 131
a4554 131
Node: Top2130
Node: Enabling OpenMP4536
Node: Runtime Library Routines5323
Node: omp_get_active_level8386
Node: omp_get_ancestor_thread_num9084
Node: omp_get_cancellation10011
Node: omp_get_default_device10823
Node: omp_get_dynamic11497
Node: omp_get_level12370
Node: omp_get_max_active_levels12988
Node: omp_get_max_task_priority13691
Node: omp_get_max_threads14309
Node: omp_get_nested15064
Node: omp_get_num_devices15976
Node: omp_get_num_procs16495
Node: omp_get_num_teams17032
Node: omp_get_num_threads17546
Node: omp_get_proc_bind18633
Node: omp_get_schedule19551
Node: omp_get_team_num20500
Node: omp_get_team_size20997
Node: omp_get_thread_limit21954
Node: omp_get_thread_num22571
Node: omp_in_parallel23440
Node: omp_in_final24087
Node: omp_is_initial_device24759
Node: omp_set_default_device25450
Node: omp_set_dynamic26238
Node: omp_set_max_active_levels27121
Node: omp_set_nested27895
Node: omp_set_num_threads28784
Node: omp_set_schedule29649
Node: omp_init_lock30725
Node: omp_set_lock31375
Node: omp_test_lock32227
Node: omp_unset_lock33200
Node: omp_destroy_lock34128
Node: omp_init_nest_lock34802
Node: omp_set_nest_lock35534
Node: omp_test_nest_lock36451
Node: omp_unset_nest_lock37481
Node: omp_destroy_nest_lock38493
Node: omp_get_wtick39241
Node: omp_get_wtime39831
Node: Environment Variables40605
Node: OMP_CANCELLATION42160
Node: OMP_DISPLAY_ENV42693
Node: OMP_DEFAULT_DEVICE43396
Node: OMP_DYNAMIC44176
Node: OMP_MAX_ACTIVE_LEVELS44772
Node: OMP_MAX_TASK_PRIORITY45422
Node: OMP_NESTED46082
Node: OMP_NUM_THREADS46687
Node: OMP_PROC_BIND47376
Node: OMP_PLACES48568
Node: OMP_STACKSIZE50745
Node: OMP_SCHEDULE51569
Node: OMP_THREAD_LIMIT52267
Node: OMP_WAIT_POLICY52867
Node: GOMP_CPU_AFFINITY53559
Node: GOMP_DEBUG55290
Node: GOMP_STACKSIZE55797
Node: GOMP_SPINCOUNT56626
Node: GOMP_RTEMS_THREAD_POOLS57835
Node: Enabling OpenACC60016
Node: OpenACC Runtime Library Routines61010
Node: acc_get_num_devices64804
Node: acc_set_device_type65527
Node: acc_get_device_type66288
Node: acc_set_device_num67000
Node: acc_get_device_num67799
Node: acc_async_test68592
Node: acc_async_test_all69577
Node: acc_wait70472
Node: acc_wait_all71104
Node: acc_wait_all_async71681
Node: acc_wait_async72430
Node: acc_init73134
Node: acc_shutdown73777
Node: acc_on_device74442
Node: acc_malloc75440
Node: acc_free75937
Node: acc_copyin76363
Node: acc_present_or_copyin77464
Node: acc_create79074
Node: acc_present_or_create80220
Node: acc_copyout81838
Node: acc_delete82853
Node: acc_update_device83820
Node: acc_update_self84924
Node: acc_map_data86020
Node: acc_unmap_data86703
Node: acc_deviceptr87222
Node: acc_hostptr87791
Node: acc_is_present88354
Node: acc_memcpy_to_device89868
Node: acc_memcpy_from_device90529
Node: acc_get_current_cuda_device91211
Node: acc_get_current_cuda_context91806
Node: acc_get_cuda_stream92398
Node: acc_set_cuda_stream92952
Node: OpenACC Environment Variables93483
Node: ACC_DEVICE_TYPE93942
Node: ACC_DEVICE_NUM94178
Node: GCC_ACC_NOTIFY94435
Node: CUDA Streams Usage94658
Ref: CUDA Streams Usage-Footnote-196558
Node: OpenACC Library Interoperability96667
Ref: OpenACC Library Interoperability-Footnote-1103013
Ref: OpenACC Library Interoperability-Footnote-2103265
Node: The libgomp ABI103473
Node: Implementing MASTER construct104329
Node: Implementing CRITICAL construct104743
Node: Implementing ATOMIC construct105482
Node: Implementing FLUSH construct105963
Node: Implementing BARRIER construct106234
Node: Implementing THREADPRIVATE construct106503
Node: Implementing PRIVATE clause107155
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses107736
Node: Implementing REDUCTION clause109060
Node: Implementing PARALLEL construct109617
Node: Implementing FOR construct110874
Node: Implementing ORDERED construct112872
Node: Implementing SECTIONS construct113178
Node: Implementing SINGLE construct113944
Node: Implementing OpenACC's PARALLEL construct114656
Node: Reporting Bugs114914
Node: Copying115276
Node: GNU Free Documentation License152841
Node: Funding177983
Node: Library Index180508
@


1.7
log
@merge GCC 5.5.0.  this does not include updated man/info pages (yet).
@
text
@d1 2
a2 2
This is libgomp.info, produced by makeinfo version 6.1 from
libgomp.texi.
d4 1
a4 1
Copyright (C) 2006-2015 Free Software Foundation, Inc.
d21 3
a23 2
software.  Copies published by the Free Software Foundation raise funds
for GNU development.
d37 1
a37 1
   Copyright (C) 2006-2015 Free Software Foundation, Inc.
d54 2
a55 2
software.  Copies published by the Free Software Foundation raise funds
for GNU development.
d63 5
a67 5
This manual documents the usage of libgomp, the GNU Offloading and Multi
Processing Runtime Library.  This includes the GNU implementation of the
OpenMP (http://www.openmp.org) Application Programming Interface (API)
for multi-platform shared-memory parallel programming in C/C++ and
Fortran, and the GNU implementation of the OpenACC
d83 10
d111 11
a121 10
compile-time flag '-fopenmp' must be specified.  This enables the OpenMP
directive '#pragma omp' in C/C++ and '!$omp' directives in free form,
'c$omp', '*$omp' and '!$omp' directives in fixed form, '!$' conditional
compilation sentinels in free form and 'c$', '*$' and '!$' sentinels in
fixed form, for Fortran.  The flag also arranges for automatic linking
of the OpenMP runtime library (*note Runtime Library Routines::).

   A complete description of all OpenMP directives accepted may be found
in the OpenMP Application Program Interface (http://www.openmp.org)
manual, version 4.0.
d130 1
a130 1
OpenMP specification in version 4.0.  The routines are structured in
d145 1
d189 1
a189 1
2.1 'omp_get_active_level' - Number of parallel regions
d197 1
a197 1
     _Prototype_:   'int omp_get_active_level(void);'
d200 1
a200 1
     _Interface_:   'integer function omp_get_active_level()'
d207 1
a207 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.20.
d212 1
a212 1
2.2 'omp_get_ancestor_thread_num' - Ancestor thread ID
d218 2
a219 2
     outside zero to 'omp_get_level' -1 is returned; if LEVEL is
     'omp_get_level' the result is identical to 'omp_get_thread_num'.
d222 1
a222 1
     _Prototype_:   'int omp_get_ancestor_thread_num(int level);'
d225 2
a226 2
     _Interface_:   'integer function omp_get_ancestor_thread_num(level)'
                    'integer level'
d233 1
a233 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.18.
d238 1
a238 1
2.3 'omp_get_cancellation' - Whether cancellation support is enabled
d242 3
a244 3
     This function returns 'true' if cancellation is activated, 'false'
     otherwise.  Here, 'true' and 'false' represent their
     language-specific counterparts.  Unless 'OMP_CANCELLATION' is set
d248 1
a248 1
     _Prototype_:   'int omp_get_cancellation(void);'
d251 1
a251 1
     _Interface_:   'logical function omp_get_cancellation()'
d257 1
a257 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.9.
d262 1
a262 1
2.4 'omp_get_default_device' - Get the default device for target regions
d269 1
a269 1
     _Prototype_:   'int omp_get_default_device(void);'
d272 1
a272 1
     _Interface_:   'integer function omp_get_default_device()'
d278 1
a278 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.24.
d283 1
a283 1
2.5 'omp_get_dynamic' - Dynamic teams setting
d287 2
a288 2
     This function returns 'true' if enabled, 'false' otherwise.  Here,
     'true' and 'false' represent their language-specific counterparts.
d291 3
a293 3
     'OMP_DYNAMIC' environment variable or at runtime using
     'omp_set_dynamic'.  If undefined, dynamic adjustment is disabled by
     default.
d296 1
a296 1
     _Prototype_:   'int omp_get_dynamic(void);'
d299 1
a299 1
     _Interface_:   'logical function omp_get_dynamic()'
d305 1
a305 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.8.
d310 1
a310 1
2.6 'omp_get_level' - Obtain the current nesting level
d318 1
a318 1
     _Prototype_:   'int omp_get_level(void);'
d321 1
a321 1
     _Interface_:   'integer function omp_level()'
d327 1
a327 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.17.
d330 1
a330 1
File: libgomp.info,  Node: omp_get_max_active_levels,  Next: omp_get_max_threads,  Prev: omp_get_level,  Up: Runtime Library Routines
d332 1
a332 1
2.7 'omp_get_max_active_levels' - Maximum number of active regions
d340 1
a340 1
     _Prototype_:   'int omp_get_max_active_levels(void);'
d343 1
a343 1
     _Interface_:   'integer function omp_get_max_active_levels()'
d349 1
a349 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.16.
d352 12
a363 1
File: libgomp.info,  Node: omp_get_max_threads,  Next: omp_get_nested,  Prev: omp_get_max_active_levels,  Up: Runtime Library Routines
d365 10
a374 1
2.8 'omp_get_max_threads' - Maximum number of threads of parallel region
d379 1
a379 1
     region that does not use the clause 'num_threads'.
d382 1
a382 1
     _Prototype_:   'int omp_get_max_threads(void);'
d385 1
a385 1
     _Interface_:   'integer function omp_get_max_threads()'
d392 1
a392 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.3.
d397 2
a398 2
2.9 'omp_get_nested' - Nested parallel regions
==============================================
d401 2
a402 2
     This function returns 'true' if nested parallel regions are
     enabled, 'false' otherwise.  Here, 'true' and 'false' represent
d406 2
a407 2
     'OMP_NESTED' environment variable or at runtime using
     'omp_set_nested'.  If undefined, nested parallel regions are
d411 1
a411 1
     _Prototype_:   'int omp_get_nested(void);'
d414 1
a414 1
     _Interface_:   'logical function omp_get_nested()'
d420 1
a420 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.11.
d425 1
a425 1
2.10 'omp_get_num_devices' - Number of target devices
d432 1
a432 1
     _Prototype_:   'int omp_get_num_devices(void);'
d435 1
a435 1
     _Interface_:   'integer function omp_get_num_devices()'
d438 1
a438 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.25.
d443 1
a443 1
2.11 'omp_get_num_procs' - Number of processors online
d450 1
a450 1
     _Prototype_:   'int omp_get_num_procs(void);'
d453 1
a453 1
     _Interface_:   'integer function omp_get_num_procs()'
d456 1
a456 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.5.
d461 1
a461 1
2.12 'omp_get_num_teams' - Number of teams
d468 1
a468 1
     _Prototype_:   'int omp_get_num_teams(void);'
d471 1
a471 1
     _Interface_:   'integer function omp_get_num_teams()'
d474 1
a474 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.26.
d479 1
a479 1
2.13 'omp_get_num_threads' - Size of the active team
d483 2
a484 2
     Returns the number of threads in the current team.  In a sequential
     section of the program 'omp_get_num_threads' returns 1.
d487 5
a491 5
     'OMP_NUM_THREADS' environment variable.  At runtime, the size of
     the current team may be set either by the 'NUM_THREADS' clause or
     by 'omp_set_num_threads'.  If none of the above were used to define
     a specific value and 'OMP_DYNAMIC' is disabled, one thread per CPU
     online is used.
d494 1
a494 1
     _Prototype_:   'int omp_get_num_threads(void);'
d497 1
a497 1
     _Interface_:   'integer function omp_get_num_threads()'
d504 1
a504 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.2.
d509 1
a509 1
2.14 'omp_get_proc_bind' - Whether theads may be moved between CPUs
d513 5
a517 5
     This functions returns the currently active thread affinity policy,
     which is set via 'OMP_PROC_BIND'.  Possible values are
     'omp_proc_bind_false', 'omp_proc_bind_true',
     'omp_proc_bind_master', 'omp_proc_bind_close' and
     'omp_proc_bind_spread'.
d520 1
a520 1
     _Prototype_:   'omp_proc_bind_t omp_get_proc_bind(void);'
d523 2
a524 2
     _Interface_:   'integer(kind=omp_proc_bind_kind) function
                    omp_get_proc_bind()'
d531 1
a531 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.22.
d536 1
a536 1
2.15 'omp_get_schedule' - Obtain the runtime scheduling method
d541 3
a543 3
     set to the value 'omp_sched_static', 'omp_sched_dynamic',
     'omp_sched_guided' or 'omp_sched_auto'.  The second argument,
     MODIFIER, is set to the chunk size.
d546 2
a547 2
     _Prototype_:   'void omp_get_schedule(omp_sched_t *kind, int
                    *modifier);'
d550 3
a552 3
     _Interface_:   'subroutine omp_get_schedule(kind, modifier)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer modifier'
d558 1
a558 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.13.
d563 1
a563 1
2.16 'omp_get_team_num' - Get team number
d570 1
a570 1
     _Prototype_:   'int omp_get_team_num(void);'
d573 1
a573 1
     _Interface_:   'integer function omp_get_team_num()'
d576 1
a576 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.27.
d581 1
a581 1
2.17 'omp_get_team_size' - Number of threads in a team
d587 3
a589 3
     values of LEVEL outside zero to 'omp_get_level', -1 is returned; if
     LEVEL is zero, 1 is returned, and for 'omp_get_level', the result
     is identical to 'omp_get_num_threads'.
d592 1
a592 1
     _Prototype_:   'int omp_get_team_size(int level);'
d595 2
a596 2
     _Interface_:   'integer function omp_get_team_size(level)'
                    'integer level'
d603 1
a603 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.19.
d608 1
a608 1
2.18 'omp_get_thread_limit' - Maximum number of threads
d615 1
a615 1
     _Prototype_:   'int omp_get_thread_limit(void);'
d618 1
a618 1
     _Interface_:   'integer function omp_get_thread_limit()'
d624 1
a624 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.14.
d629 1
a629 1
2.19 'omp_get_thread_num' - Current thread ID
d634 4
a637 4
     team.  In a sequential parts of the program, 'omp_get_thread_num'
     always returns 0.  In parallel regions the return value varies from
     0 to 'omp_get_num_threads'-1 inclusive.  The return value of the
     master thread of a team is always 0.
d640 1
a640 1
     _Prototype_:   'int omp_get_thread_num(void);'
d643 1
a643 1
     _Interface_:   'integer function omp_get_thread_num()'
d649 1
a649 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.4.
d654 1
a654 1
2.20 'omp_in_parallel' - Whether a parallel region is active
d658 2
a659 2
     This function returns 'true' if currently running in parallel,
     'false' otherwise.  Here, 'true' and 'false' represent their
d663 1
a663 1
     _Prototype_:   'int omp_in_parallel(void);'
d666 1
a666 1
     _Interface_:   'logical function omp_in_parallel()'
d669 1
a669 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.6.
d674 1
a674 1
2.21 'omp_in_final' - Whether in final or included task region
d678 2
a679 2
     This function returns 'true' if currently running in a final or
     included task region, 'false' otherwise.  Here, 'true' and 'false'
d683 1
a683 1
     _Prototype_:   'int omp_in_final(void);'
d686 1
a686 1
     _Interface_:   'logical function omp_in_final()'
d689 1
a689 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.21.
d694 1
a694 1
2.22 'omp_is_initial_device' - Whether executing on the host device
d698 2
a699 2
     This function returns 'true' if currently running on the host
     device, 'false' otherwise.  Here, 'true' and 'false' represent
d703 1
a703 1
     _Prototype_:   'int omp_is_initial_device(void);'
d706 1
a706 1
     _Interface_:   'logical function omp_is_initial_device()'
d709 1
a709 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.28.
d714 1
a714 1
2.23 'omp_set_default_device' - Set the default device for target regions
d722 1
a722 1
     _Prototype_:   'void omp_set_default_device(int device_num);'
d725 2
a726 2
     _Interface_:   'subroutine omp_set_default_device(device_num)'
                    'integer device_num'
d732 1
a732 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.23.
d737 1
a737 1
2.24 'omp_set_dynamic' - Enable/disable dynamic teams
d743 2
a744 2
     of 'true' and 'false', where 'true' enables dynamic adjustment of
     team sizes and 'false' disables it.
d747 1
a747 1
     _Prototype_:   'void omp_set_dynamic(int dynamic_threads);'
d750 2
a751 2
     _Interface_:   'subroutine omp_set_dynamic(dynamic_threads)'
                    'logical, intent(in) :: dynamic_threads'
d757 1
a757 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.7.
d762 1
a762 1
2.25 'omp_set_max_active_levels' - Limits the number of active parallel regions
d770 1
a770 1
     _Prototype_:   'void omp_set_max_active_levels(int max_levels);'
d773 2
a774 2
     _Interface_:   'subroutine omp_set_max_active_levels(max_levels)'
                    'integer max_levels'
d780 1
a780 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.15.
d785 1
a785 1
2.26 'omp_set_nested' - Enable/disable nested parallel regions
d791 2
a792 2
     language-specific equivalent of 'true' and 'false', where 'true'
     enables dynamic adjustment of team sizes and 'false' disables it.
d795 1
a795 1
     _Prototype_:   'void omp_set_nested(int nested);'
d798 2
a799 2
     _Interface_:   'subroutine omp_set_nested(nested)'
                    'logical, intent(in) :: nested'
d805 1
a805 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.10.
d810 1
a810 1
2.27 'omp_set_num_threads' - Set upper team size limit
d815 2
a816 2
     parallel sections, if those do not specify a 'num_threads' clause.
     The argument of 'omp_set_num_threads' shall be a positive integer.
d819 1
a819 1
     _Prototype_:   'void omp_set_num_threads(int num_threads);'
d822 2
a823 2
     _Interface_:   'subroutine omp_set_num_threads(num_threads)'
                    'integer, intent(in) :: num_threads'
d830 1
a830 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.1.
d835 1
a835 1
2.28 'omp_set_schedule' - Set the runtime scheduling method
d840 4
a843 4
     value 'omp_sched_static', 'omp_sched_dynamic', 'omp_sched_guided'
     or 'omp_sched_auto'.  Except for 'omp_sched_auto', the chunk size
     is set to the value of MODIFIER if positive, or to the default
     value if zero or negative.  For 'omp_sched_auto' the MODIFIER
d847 2
a848 1
     _Prototype_:   'void omp_set_schedule(omp_sched_t kind, int modifier);'
d851 3
a853 3
     _Interface_:   'subroutine omp_set_schedule(kind, modifier)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer modifier'
d859 1
a859 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.12.
d864 1
a864 1
2.29 'omp_init_lock' - Initialize simple lock
d872 1
a872 1
     _Prototype_:   'void omp_init_lock(omp_lock_t *lock);'
d875 2
a876 2
     _Interface_:   'subroutine omp_init_lock(svar)'
                    'integer(omp_lock_kind), intent(out) :: svar'
d882 1
a882 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.1.
d887 1
a887 1
2.30 'omp_set_lock' - Wait for and set simple lock
d891 4
a894 4
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  The calling thread is blocked until the lock
     is available.  If the lock is already held by the current thread, a
     deadlock occurs.
d897 1
a897 1
     _Prototype_:   'void omp_set_lock(omp_lock_t *lock);'
d900 2
a901 2
     _Interface_:   'subroutine omp_set_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d908 1
a908 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.3.
d913 1
a913 1
2.31 'omp_test_lock' - Test and set simple lock if available
d917 5
a921 5
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  Contrary to 'omp_set_lock', 'omp_test_lock'
     does not block if the lock is not available.  This function returns
     'true' upon success, 'false' otherwise.  Here, 'true' and 'false'
     represent their language-specific counterparts.
d924 1
a924 1
     _Prototype_:   'int omp_test_lock(omp_lock_t *lock);'
d927 2
a928 2
     _Interface_:   'logical function omp_test_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d934 1
a934 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.5.
d939 1
a939 1
2.32 'omp_unset_lock' - Unset simple lock
d944 4
a947 4
     'omp_set_lock' or 'omp_test_lock' before.  In addition, the lock
     must be held by the thread calling 'omp_unset_lock'.  Then, the
     lock becomes unlocked.  If one or more threads attempted to set the
     lock before, one of them is chosen to, again, set the lock to
d951 1
a951 1
     _Prototype_:   'void omp_unset_lock(omp_lock_t *lock);'
d954 2
a955 2
     _Interface_:   'subroutine omp_unset_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d961 1
a961 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.4.
d966 1
a966 1
2.33 'omp_destroy_lock' - Destroy simple lock
d974 1
a974 1
     _Prototype_:   'void omp_destroy_lock(omp_lock_t *lock);'
d977 2
a978 2
     _Interface_:   'subroutine omp_destroy_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d984 1
a984 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.2.
d989 1
a989 1
2.34 'omp_init_nest_lock' - Initialize nested lock
d997 1
a997 1
     _Prototype_:   'void omp_init_nest_lock(omp_nest_lock_t *lock);'
d1000 2
a1001 2
     _Interface_:   'subroutine omp_init_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(out) :: nvar'
d1007 1
a1007 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.1.
d1012 1
a1012 1
2.35 'omp_set_nest_lock' - Wait for and set nested lock
d1016 5
a1020 4
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  The calling thread is blocked until the
     lock is available.  If the lock is already held by the current
     thread, the nesting count for the lock is incremented.
d1023 1
a1023 1
     _Prototype_:   'void omp_set_nest_lock(omp_nest_lock_t *lock);'
d1026 2
a1027 2
     _Interface_:   'subroutine omp_set_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1033 1
a1033 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.3.
d1038 1
a1038 1
2.36 'omp_test_nest_lock' - Test and set nested lock if available
d1042 6
a1047 5
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  Contrary to 'omp_set_nest_lock',
     'omp_test_nest_lock' does not block if the lock is not available.
     If the lock is already held by the current thread, the new nesting
     count is returned.  Otherwise, the return value equals zero.
d1050 1
a1050 1
     _Prototype_:   'int omp_test_nest_lock(omp_nest_lock_t *lock);'
d1053 2
a1054 2
     _Interface_:   'logical function omp_test_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1060 1
a1060 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.5.
d1065 1
a1065 1
2.37 'omp_unset_nest_lock' - Unset nested lock
d1070 1
a1070 1
     'omp_set_nested_lock' or 'omp_test_nested_lock' before.  In
d1072 1
a1072 1
     'omp_unset_nested_lock'.  If the nesting count drops to zero, the
d1078 1
a1078 1
     _Prototype_:   'void omp_unset_nest_lock(omp_nest_lock_t *lock);'
d1081 2
a1082 2
     _Interface_:   'subroutine omp_unset_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1088 1
a1088 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.4.
d1093 1
a1093 1
2.38 'omp_destroy_nest_lock' - Destroy nested lock
d1102 1
a1102 1
     _Prototype_:   'void omp_destroy_nest_lock(omp_nest_lock_t *);'
d1105 2
a1106 2
     _Interface_:   'subroutine omp_destroy_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1112 1
a1112 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.2.
d1117 1
a1117 1
2.39 'omp_get_wtick' - Get timer precision
d1125 1
a1125 1
     _Prototype_:   'double omp_get_wtick(void);'
d1128 1
a1128 1
     _Interface_:   'double precision function omp_get_wtick()'
d1134 1
a1134 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.4.2.
d1139 1
a1139 1
2.40 'omp_get_wtime' - Elapsed wall clock time
d1150 1
a1150 1
     _Prototype_:   'double omp_get_wtime(void);'
d1153 1
a1153 1
     _Interface_:   'double precision function omp_get_wtime()'
d1159 1
a1159 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.4.1.
d1162 1
a1162 1
File: libgomp.info,  Node: Environment Variables,  Next: The libgomp ABI,  Prev: Runtime Library Routines,  Up: Top
d1167 3
a1169 3
The environment variables which beginning with 'OMP_' are defined by
section 4 of the OpenMP specification in version 4.0, while those
beginning with 'GOMP_' are GNU extensions.
d1173 19
a1191 17
* OMP_CANCELLATION::      Set whether cancellation is activated
* OMP_DISPLAY_ENV::       Show OpenMP version and environment variables
* OMP_DEFAULT_DEVICE::    Set the device used in target regions
* OMP_DYNAMIC::           Dynamic adjustment of threads
* OMP_MAX_ACTIVE_LEVELS:: Set the maximum number of nested parallel regions
* OMP_NESTED::            Nested parallel regions
* OMP_NUM_THREADS::       Specifies the number of threads to use
* OMP_PROC_BIND::         Whether theads may be moved between CPUs
* OMP_PLACES::            Specifies on which CPUs the theads should be placed
* OMP_STACKSIZE::         Set default thread stack size
* OMP_SCHEDULE::          How threads are scheduled
* OMP_THREAD_LIMIT::      Set the maximum number of threads
* OMP_WAIT_POLICY::       How waiting threads are handled
* GOMP_CPU_AFFINITY::     Bind threads to specific CPUs
* GOMP_DEBUG::            Enable debugging output
* GOMP_STACKSIZE::        Set default thread stack size
* GOMP_SPINCOUNT::        Set the busy-wait spin count
d1196 1
a1196 1
3.1 'OMP_CANCELLATION' - Set whether cancellation is activated
d1200 3
a1202 3
     If set to 'TRUE', the cancellation is activated.  If set to 'FALSE'
     or if unset, cancellation is disabled and the 'cancel' construct is
     ignored.
d1208 1
a1208 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.11
d1213 1
a1213 1
3.2 'OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
d1217 1
a1217 1
     If set to 'TRUE', the OpenMP version number and the values
d1219 1
a1219 1
     'stderr'.  If set to 'VERBOSE', it additionally shows the value of
d1221 1
a1221 1
     or set to 'FALSE', this information will not be shown.
d1224 1
a1224 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.12
d1229 1
a1229 1
3.3 'OMP_DEFAULT_DEVICE' - Set the device used in target regions
d1233 5
a1237 5
     Set to choose the device which is used in a 'target' region, unless
     the value is overridden by 'omp_set_default_device' or by a
     'device' clause.  The value shall be the nonnegative device number.
     If no device with the given device number exists, the code is
     executed on the host.  If unset, device number 0 will be used.
d1243 1
a1243 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.11
d1248 1
a1248 1
3.4 'OMP_DYNAMIC' - Dynamic adjustment of threads
d1254 2
a1255 2
     'TRUE' or 'FALSE'.  If undefined, dynamic adjustment is disabled by
     default.
d1261 1
a1261 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.3
d1264 1
a1264 1
File: libgomp.info,  Node: OMP_MAX_ACTIVE_LEVELS,  Next: OMP_NESTED,  Prev: OMP_DYNAMIC,  Up: Environment Variables
d1266 1
a1266 1
3.5 'OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1278 1
a1278 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.9
d1281 14
a1294 1
File: libgomp.info,  Node: OMP_NESTED,  Next: OMP_NUM_THREADS,  Prev: OMP_MAX_ACTIVE_LEVELS,  Up: Environment Variables
d1296 7
a1302 1
3.6 'OMP_NESTED' - Nested parallel regions
d1308 1
a1308 1
     environment variable shall be 'TRUE' or 'FALSE'.  If undefined,
d1315 1
a1315 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.6
d1320 1
a1320 1
3.7 'OMP_NUM_THREADS' - Specifies the number of threads to use
d1324 5
a1328 5
     Specifies the default number of threads to use in parallel regions.
     The value of this variable shall be a comma-separated list of
     positive integers; the value specified the number of threads to use
     for the corresponding nested level.  If undefined one thread per
     CPU is used.
d1334 1
a1334 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.2
d1339 1
a1339 1
3.8 'OMP_PROC_BIND' - Whether theads may be moved between CPUs
d1344 1
a1344 1
     to 'TRUE', OpenMP theads should not be moved; if set to 'FALSE'
d1346 1
a1346 1
     values 'MASTER', 'CLOSE' and 'SPREAD' can be used to specify the
d1348 3
a1350 3
     'MASTER' the worker threads are in the same place partition as the
     master thread.  With 'CLOSE' those are kept close to the master
     thread in contiguous place partitions.  And with 'SPREAD' a sparse
d1353 2
a1354 2
     When undefined, 'OMP_PROC_BIND' defaults to 'TRUE' when
     'OMP_PLACES' or 'GOMP_CPU_AFFINITY' is set and 'FALSE' otherwise.
d1361 1
a1361 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.4
d1366 2
a1367 2
3.9 'OMP_PLACES' - Specifies on which CPUs the theads should be placed
======================================================================
d1370 3
a1372 3
     The thread placement can be either specified using an abstract name
     or by an explicit list of the places.  The abstract names
     'threads', 'cores' and 'sockets' can be optionally followed by a
d1374 3
a1376 3
     shall be created.  With 'threads' each place corresponds to a
     single hardware thread; 'cores' to a single core with the
     corresponding number of hardware threads; and with 'sockets' the
d1378 1
a1378 1
     be shown by setting the 'OMP_DISPLAY_ENV' environment variable.
d1391 2
a1392 2
     specifies the same places list: '"{0,1,2}, {3,4,6}, {7,8,9},
     {10,11,12}"'; '"{0:3}, {3:3}, {7:3}, {10:3}"'; and '"{0:2}:4:3"'.
d1394 2
a1395 2
     If 'OMP_PLACES' and 'GOMP_CPU_AFFINITY' are unset and
     'OMP_PROC_BIND' is either unset or 'false', threads may be moved
d1403 1
a1403 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.5
d1408 1
a1408 1
3.10 'OMP_STACKSIZE' - Set default thread stack size
d1413 7
a1419 7
     is suffixed by 'B', 'K', 'M' or 'G', in which case the size is,
     respectively, in bytes, kilobytes, megabytes or gigabytes.  This is
     different from 'pthread_attr_setstacksize' which gets the number of
     bytes as an argument.  If the stack size cannot be set due to
     system constraints, an error is reported and the initial stack size
     is left unchanged.  If undefined, the stack size is system
     dependent.
d1422 1
a1422 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.7
d1427 1
a1427 1
3.11 'OMP_SCHEDULE' - How threads are scheduled
d1431 5
a1435 5
     Allows to specify 'schedule type' and 'chunk size'.  The value of
     the variable shall have the form: 'type[,chunk]' where 'type' is
     one of 'static', 'dynamic', 'guided' or 'auto' The optional 'chunk'
     size shall be a positive integer.  If undefined, dynamic scheduling
     and a chunk size of 1 is used.
d1441 2
a1442 2
     OpenMP specification v4.0 (http://www.openmp.org/), Sections 2.7.1
     and 4.1
d1447 1
a1447 1
3.12 'OMP_THREAD_LIMIT' - Set the maximum number of threads
d1459 1
a1459 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.10
d1464 1
a1464 1
3.13 'OMP_WAIT_POLICY' - How waiting threads are handled
d1469 2
a1470 2
     the value is 'PASSIVE', waiting threads should not consume CPU
     power while waiting; while the value is 'ACTIVE' specifies that
d1478 1
a1478 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.8
d1483 1
a1483 1
3.14 'GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d1491 2
a1492 2
     (M-N:S). CPU numbers are zero based.  For example,
     'GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
d1496 1
a1496 1
     beginning of the list.  'GOMP_CPU_AFFINITY=0' binds all threads to
d1501 10
a1510 10
     language-specific library functions, e.g., 'getenv' in C or
     'GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
     setting of the 'GOMP_CPU_AFFINITY' environment variable.  A defined
     CPU affinity on startup cannot be changed or disabled during the
     runtime of the application.

     If both 'GOMP_CPU_AFFINITY' and 'OMP_PROC_BIND' are set,
     'OMP_PROC_BIND' has a higher precedence.  If neither has been set
     and 'OMP_PROC_BIND' is unset, or when 'OMP_PROC_BIND' is set to
     'FALSE', the host system will handle the assignment of threads to
d1519 1
a1519 1
3.15 'GOMP_DEBUG' - Enable debugging output
d1523 2
a1524 2
     Enable debugging output.  The variable should be set to '0'
     (disabled, also the default if not set), or '1' (enabled).
d1533 1
a1533 1
3.16 'GOMP_STACKSIZE' - Set default thread stack size
d1538 1
a1538 1
     from 'pthread_attr_setstacksize' which gets the number of bytes as
d1553 1
a1553 1
File: libgomp.info,  Node: GOMP_SPINCOUNT,  Prev: GOMP_STACKSIZE,  Up: Environment Variables
d1555 1
a1555 1
3.17 'GOMP_SPINCOUNT' - Set the busy-wait spin count
d1561 1
a1561 1
     value may be either 'INFINITE', 'INFINITY' to always wait actively
d1564 9
a1572 8
     suffixes acting as multiplication factors: 'k' (kilo, thousand),
     'M' (mega, million), 'G' (giga, billion), or 'T' (tera, trillion).
     If undefined, 0 is used when 'OMP_WAIT_POLICY' is 'PASSIVE',
     300,000 is used when 'OMP_WAIT_POLICY' is undefined and 30 billion
     is used when 'OMP_WAIT_POLICY' is 'ACTIVE'.  If there are more
     OpenMP threads than available CPUs, 1000 and 100 spins are used for
     'OMP_WAIT_POLICY' being 'ACTIVE' or undefined, respectively; unless
     the 'GOMP_SPINCOUNT' is lower or 'OMP_WAIT_POLICY' is 'PASSIVE'.
d1578 579
a2156 1
File: libgomp.info,  Node: The libgomp ABI,  Next: Reporting Bugs,  Prev: Environment Variables,  Up: Top
d2158 607
a2764 1
4 The libgomp ABI
d2767 2
a2768 2
The following sections present notes on the external ABI as presented by
libgomp.  Only maintainers should need them.
d2786 1
d2791 1
a2791 1
4.1 Implementing MASTER construct
d2804 1
a2804 1
4.2 Implementing CRITICAL construct
d2826 1
a2826 1
4.3 Implementing ATOMIC construct
d2829 1
a2829 1
The target should implement the '__sync' builtins.
d2842 1
a2842 1
4.4 Implementing FLUSH construct
d2845 1
a2845 1
Expands to the '__sync_synchronize' builtin.
d2850 1
a2850 1
4.5 Implementing BARRIER construct
d2858 1
a2858 1
4.6 Implementing THREADPRIVATE construct
d2861 4
a2864 4
In _most_ cases we can map this directly to '__thread'.  Except that OMP
allows constructors for C++ objects.  We can either refuse to support
this (how often is it used?)  or we can implement something akin to
.ctors.
d2873 1
a2873 1
4.7 Implementing PRIVATE clause
d2887 1
a2887 1
4.8 Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses
d2896 2
a2897 2
   It is not clear what to do with bare FOR or SECTION blocks.  The only
thing I can figure is that we do something like:
d2915 2
a2916 2
for the two variables, i.e.  not something you could write directly in
C. Presumably this only makes sense if the "outer" x and y are global
d2925 1
a2925 1
4.9 Implementing REDUCTION clause
d2929 4
a2932 4
pointer to an array of the type of the variable, indexed by the thread's
TEAM_ID.  The thread stores its final value into the array, and after
the barrier, the master thread iterates over the array to collect the
values.
d2937 1
a2937 1
4.10 Implementing PARALLEL construct
d2969 3
a2971 3
   The function needs to create the appropriate number of threads and/or
launch them from the dock.  It needs to create the team structure and
assign team ids.
d2976 1
a2976 1
'omp_in_parallel()' state.
d2981 1
a2981 1
4.11 Implementing FOR construct
d3028 2
a3029 2
also pull it into a local variable if we like, but since its supposed to
remain unchanged, we can also not if we like.
d3031 5
a3035 5
   If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be able
to get away with no work-sharing context at all, since we can simply
perform the arithmetic directly in each thread to divide up the
iterations.  Which would mean that we wouldn't need to call any of these
routines.
d3043 1
a3043 1
4.12 Implementing ORDERED construct
d3052 1
a3052 1
4.13 Implementing SECTIONS construct
d3085 1
a3085 1
File: libgomp.info,  Node: Implementing SINGLE construct,  Prev: Implementing SECTIONS construct,  Up: The libgomp ABI
d3087 1
a3087 1
4.14 Implementing SINGLE construct
d3122 8
d3132 2
a3133 2
5 Reporting Bugs
****************
d3137 2
a3138 2
"openacc", or "openmp", or both to the keywords field in the bug report,
as appropriate.
d3148 1
a3148 1
     Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
d3176 3
a3178 3
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
d3197 10
a3206 9
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
d3243 2
a3244 2
     infringement under applicable copyright law, except executing it on
     a computer or modifying a private copy.  Propagation includes
d3258 2
a3259 2
     the extent that warranties are provided), that licensees may convey
     the work under this License, and how to view a copy of this
d3267 2
a3268 2
     for making modifications to it.  "Object code" means any non-source
     form of a work.
d3279 4
a3282 4
     Major Component, and (b) serves only to enable use of the work with
     that Major Component, or to implement a Standard Interface for
     which an implementation is available to the public in source code
     form.  A "Major Component", in this context, means a major
d3290 3
a3292 3
     work) run the object code and to modify the work, including scripts
     to control those activities.  However, it does not include the
     work's System Libraries, or general-purpose tools or generally
d3295 4
a3298 4
     Corresponding Source includes interface definition files associated
     with source files for the work, and the source code for shared
     libraries and dynamically linked subprograms that the work is
     specifically designed to require, such as by intimate data
d3315 4
a3318 4
     a covered work is covered by this License only if the output, given
     its content, constitutes a covered work.  This License acknowledges
     your rights of fair use or other equivalent, as provided by
     copyright law.
d3323 8
a3330 8
     sole purpose of having them make modifications exclusively for you,
     or provide you with facilities for running those works, provided
     that you comply with the terms of this License in conveying all
     material for which you do not control copyright.  Those thus making
     or running the covered works for you must do so exclusively on your
     behalf, under your direction and control, on terms that prohibit
     them from making any copies of your copyrighted material outside
     their relationship with you.
d3347 2
a3348 2
     with respect to the covered work, and you disclaim any intention to
     limit operation or modification of the work as a means of
d3418 2
a3419 2
          written offer, valid for at least three years and valid for as
          long as you offer spare parts or customer support for that
d3429 2
a3430 2
       c. Convey individual copies of the object code with a copy of the
          written offer to provide the Corresponding Source.  This
d3436 2
a3437 2
          place (gratis or for a charge), and offer equivalent access to
          the Corresponding Source in the same way through the same
d3441 4
a3444 4
          Corresponding Source may be on a different server (operated by
          you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to the
          object code saying where to find the Corresponding Source.
d3446 2
a3447 2
          remain obligated to ensure that it is available for as long as
          needed to satisfy these requirements.
d3454 1
d3462 2
a3463 2
     incorporation into a dwelling.  In determining whether a product is
     a consumer product, doubtful cases shall be resolved in favor of
d3494 5
a3498 5
     warranty, or updates for a work that has been modified or installed
     by the recipient, or for the User Product in which it has been
     modified or installed.  Access to a network may be denied when the
     modification itself materially and adversely affects the operation
     of the network or violates the rules and protocols for
d3528 2
a3529 2
     holders of that material) supplement the terms of this License with
     terms:
d3539 3
a3541 2
          or requiring that modified versions of such material be marked
          in reasonable ways as different from the original version; or
d3560 5
a3564 4
     contains a further restriction but permits relicensing or conveying
     under this License, you may add to a covered work material governed
     by the terms of that license document, provided that the further
     restriction does not survive such relicensing or conveying.
d3580 2
a3581 2
     under this License (including any patent licenses granted under the
     third paragraph of section 11).
d3585 2
a3586 2
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
d3598 4
a3601 4
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, you do not qualify to receive new licenses
     for the same material under section 10.
d3615 1
a3615 1
  10. Automatic Licensing of Downstream Recipients.
d3629 4
a3632 4
     could give under the previous paragraph, plus a right to possession
     of the Corresponding Source of the work from the predecessor in
     interest, if the predecessor has it or can get it with reasonable
     efforts.
d3636 6
a3641 6
     may not impose a license fee, royalty, or other charge for exercise
     of rights granted under this License, and you may not initiate
     litigation (including a cross-claim or counterclaim in a lawsuit)
     alleging that any patent claim is infringed by making, using,
     selling, offering for sale, or importing the Program or any portion
     of it.
d3643 1
a3643 1
  11. Patents.
d3663 2
a3664 2
     otherwise run, modify and propagate the contents of its contributor
     version.
d3669 3
a3671 3
     patent or covenant not to sue for patent infringement).  To "grant"
     such a patent license to a party means to make such an agreement or
     commitment not to enforce a patent against the party.
d3701 10
a3710 10
     party that is in the business of distributing software, under which
     you make payment to the third party based on the extent of your
     activity of conveying the work, and under which the third party
     grants, to any of the parties who would receive the covered work
     from you, a discriminatory patent license (a) in connection with
     copies of the covered work conveyed by you (or copies made from
     those copies), or (b) primarily for and in connection with specific
     products or compilations that contain the covered work, unless you
     entered into that arrangement, or that patent license was granted,
     prior to 28 March 2007.
d3716 1
a3716 1
  12. No Surrender of Others' Freedom.
d3718 11
a3728 10
     If conditions are imposed on you (whether by court order, agreement
     or otherwise) that contradict the conditions of this License, they
     do not excuse you from the conditions of this License.  If you
     cannot convey a covered work so as to satisfy simultaneously your
     obligations under this License and any other pertinent obligations,
     then as a consequence you may not convey it at all.  For example,
     if you agree to terms that obligate you to collect a royalty for
     further conveying from those to whom you convey the Program, the
     only way you could satisfy both those terms and this License would
     be to refrain entirely from conveying the Program.
d3730 1
a3730 1
  13. Use with the GNU Affero General Public License.
d3741 1
a3741 1
  14. Revised Versions of this License.
d3744 4
a3747 3
     versions of the GNU General Public License from time to time.  Such
     new versions will be similar in spirit to the present version, but
     may differ in detail to address new problems or concerns.
d3753 4
a3756 4
     that numbered version or of any later version published by the Free
     Software Foundation.  If the Program does not specify a version
     number of the GNU General Public License, you may choose any
     version ever published by the Free Software Foundation.
d3768 1
a3768 1
  15. Disclaimer of Warranty.
d3771 1
a3771 1
     APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
d3775 1
a3775 1
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
d3780 1
a3780 1
  16. Limitation of Liability.
d3784 2
a3785 2
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
     DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
d3793 1
a3793 1
  17. Interpretation of Sections 15 and 16.
d3802 1
d3833 1
a3833 1
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
d3842 1
a3842 1
     This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
d3844 1
a3844 1
     under certain conditions; type 'show c' for details.
d3846 1
a3846 1
   The hypothetical commands 'show w' and 'show c' should show the
d3854 1
a3854 1
the GNU GPL, see <http://www.gnu.org/licenses/>.
d3861 1
a3861 1
please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
d3872 1
a3872 1
     <http://fsf.org/>
d3897 2
a3898 2
     of subject matter or whether it is published as a printed book.  We
     recommend this License principally for works whose purpose is
d3904 2
a3905 2
     that contains a notice placed by the copyright holder saying it can
     be distributed under the terms of this License.  Such a notice
d3909 3
a3911 3
     of the public is a licensee, and is addressed as "you".  You accept
     the license if you copy, modify or distribute the work in a way
     requiring permission under copyright law.
d3929 6
a3934 6
     titles are designated, as being those of Invariant Sections, in the
     notice that says that the Document is released under this License.
     If a section does not fit the above definition of Secondary then it
     is not allowed to be designated as Invariant.  The Document may
     contain zero Invariant Sections.  If the Document does not identify
     any Invariant Sections then there are none.
d3945 10
a3954 10
     straightforwardly with generic text editors or (for images composed
     of pixels) generic paint programs or (for drawings) some widely
     available drawing editor, and that is suitable for input to text
     formatters or for automatic translation to a variety of formats
     suitable for input to text formatters.  A copy made in an otherwise
     Transparent file format whose markup, or absence of markup, has
     been arranged to thwart or discourage subsequent modification by
     readers is not Transparent.  An image format is not Transparent if
     used for any substantial amount of text.  A copy that is not
     "Transparent" is called "Opaque".
d3958 8
a3965 8
     SGML or XML using a publicly available DTD, and standard-conforming
     simple HTML, PostScript or PDF designed for human modification.
     Examples of transparent image formats include PNG, XCF and JPG.
     Opaque formats include proprietary formats that can be read and
     edited only by proprietary word processors, SGML or XML for which
     the DTD and/or processing tools are not generally available, and
     the machine-generated HTML, PostScript or PDF produced by some word
     processors for output purposes only.
d4003 2
a4004 2
     distribute a large enough number of copies you must also follow the
     conditions in section 3.
d4018 6
a4023 5
     front cover must present the full title with all words of the title
     equally prominent and visible.  You may add other material on the
     covers in addition.  Copying with changes limited to the covers, as
     long as they preserve the title of the Document and satisfy these
     conditions, can be treated as verbatim copying in other respects.
d4031 12
a4042 11
     numbering more than 100, you must either include a machine-readable
     Transparent copy along with each Opaque copy, or state in or with
     each Opaque copy a computer-network location from which the general
     network-using public has access to download using public-standard
     network protocols a complete Transparent copy of the Document, free
     of added material.  If you use the latter option, you must take
     reasonably prudent steps, when you begin distribution of Opaque
     copies in quantity, to ensure that this Transparent copy will
     remain thus accessible at the stated location until at least one
     year after the last time you distribute an Opaque copy (directly or
     through your agents or retailers) of that edition to the public.
d4045 3
a4047 3
     the Document well before redistributing any large number of copies,
     to give them a chance to provide you with an updated version of the
     Document.
d4053 5
a4057 5
     release the Modified Version under precisely this License, with the
     Modified Version filling the role of the Document, thus licensing
     distribution and modification of the Modified Version to whoever
     possesses a copy of it.  In addition, you must do these things in
     the Modified Version:
d4060 5
a4064 5
          distinct from that of the Document, and from those of previous
          versions (which should, if there were any, be listed in the
          History section of the Document).  You may use the same title
          as a previous version if the original publisher of that
          version gives permission.
d4094 6
a4099 6
          authors, and publisher of the Modified Version as given on the
          Title Page.  If there is no section Entitled "History" in the
          Document, create one stating the title, year, authors, and
          publisher of the Document as given on its Title Page, then add
          an item describing the Modified Version as stated in the
          previous sentence.
d4104 5
a4108 5
          previous versions it was based on.  These may be placed in the
          "History" section.  You may omit a network location for a work
          that was published at least four years before the Document
          itself, or if the original publisher of the version it refers
          to gives permission.
d4111 2
a4112 2
          Preserve the Title of the section, and preserve in the section
          all the substance and tone of each of the contributor
d4115 4
a4118 3
       L. Preserve all the Invariant Sections of the Document, unaltered
          in their text and in their titles.  Section numbers or the
          equivalent are not considered part of the section titles.
d4131 5
a4135 5
     material copied from the Document, you may at your option designate
     some or all of these sections as invariant.  To do this, add their
     titles to the list of Invariant Sections in the Modified Version's
     license notice.  These titles must be distinct from any other
     section titles.
d4144 9
a4152 9
     and a passage of up to 25 words as a Back-Cover Text, to the end of
     the list of Cover Texts in the Modified Version.  Only one passage
     of Front-Cover Text and one of Back-Cover Text may be added by (or
     through arrangements made by) any one entity.  If the Document
     already includes a cover text for the same cover, previously added
     by you or by arrangement made by the same entity you are acting on
     behalf of, you may not add another; but you may replace the old
     one, on explicit permission from the previous publisher that added
     the old one.
d4162 2
a4163 2
     modified versions, provided that you include in the combination all
     of the Invariant Sections of all of the original documents,
d4190 2
a4191 2
     rules of this License for verbatim copying of each of the documents
     in all other respects.
d4195 3
a4197 3
     a copy of this License into the extracted document, and follow this
     License in all other respects regarding verbatim copying of that
     document.
d4202 2
a4203 2
     separate and independent documents or works, in or on a volume of a
     storage or distribution medium, is called an "aggregate" if the
d4248 2
a4249 2
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
d4261 4
a4264 4
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, receipt of a copy of some or all of the
     same material does not give you any rights to use it.
d4266 1
a4266 1
  10. FUTURE REVISIONS OF THIS LICENSE
d4272 1
a4272 1
     <http://www.gnu.org/copyleft/>.
d4279 5
a4283 5
     published (not as a draft) by the Free Software Foundation.  If the
     Document does not specify a version number of this License, you may
     choose any version ever published (not as a draft) by the Free
     Software Foundation.  If the Document specifies that a proxy can
     decide which future versions of this License can be used, that
d4287 1
a4287 1
  11. RELICENSING
d4317 1
d4334 1
a4334 1
Texts, replace the "with...Texts."  line with this:
d4345 3
a4347 3
recommend releasing these examples in parallel under your choice of free
software license, such as the GNU General Public License, to permit
their use in free software.
d4377 2
a4378 2
can greatly alter what fraction of the sales price counts as profit.  If
the price you pay is $50, ten percent of the profit is probably less
d4388 2
a4389 2
ports such as adding a new CPU to the GNU Compiler Collection contribute
more; major new features or packages contribute the most.
d4408 19
a4427 16
* Environment Variable <1>:              OMP_DISPLAY_ENV.       (line 6)
* Environment Variable <2>:              OMP_DEFAULT_DEVICE.    (line 6)
* Environment Variable <3>:              OMP_DYNAMIC.           (line 6)
* Environment Variable <4>:              OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable <5>:              OMP_NESTED.            (line 6)
* Environment Variable <6>:              OMP_NUM_THREADS.       (line 6)
* Environment Variable <7>:              OMP_PROC_BIND.         (line 6)
* Environment Variable <8>:              OMP_PLACES.            (line 6)
* Environment Variable <9>:              OMP_STACKSIZE.         (line 6)
* Environment Variable <10>:             OMP_SCHEDULE.          (line 6)
* Environment Variable <11>:             OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <12>:             OMP_WAIT_POLICY.       (line 6)
* Environment Variable <13>:             GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <14>:             GOMP_DEBUG.            (line 6)
* Environment Variable <15>:             GOMP_STACKSIZE.        (line 6)
* Environment Variable <16>:             GOMP_SPINCOUNT.        (line 6)
d4430 6
a4436 4
* Implementation specific setting <1>:   OMP_NUM_THREADS.       (line 6)
* Implementation specific setting <2>:   OMP_SCHEDULE.          (line 6)
* Implementation specific setting <3>:   GOMP_STACKSIZE.        (line 6)
* Implementation specific setting <4>:   GOMP_SPINCOUNT.        (line 6)
d4442 131
a4572 81
Node: Top2083
Node: Enabling OpenMP3878
Node: Runtime Library Routines4665
Node: omp_get_active_level7652
Node: omp_get_ancestor_thread_num8352
Node: omp_get_cancellation9282
Node: omp_get_default_device10096
Node: omp_get_dynamic10772
Node: omp_get_level11647
Node: omp_get_max_active_levels12267
Node: omp_get_max_threads12966
Node: omp_get_nested13723
Node: omp_get_num_devices14635
Node: omp_get_num_procs15156
Node: omp_get_num_teams15695
Node: omp_get_num_threads16211
Node: omp_get_proc_bind17300
Node: omp_get_schedule18221
Node: omp_get_team_num19167
Node: omp_get_team_size19666
Node: omp_get_thread_limit20626
Node: omp_get_thread_num21245
Node: omp_in_parallel22116
Node: omp_in_final22765
Node: omp_is_initial_device23439
Node: omp_set_default_device24132
Node: omp_set_dynamic24923
Node: omp_set_max_active_levels25809
Node: omp_set_nested26586
Node: omp_set_num_threads27478
Node: omp_set_schedule28346
Node: omp_init_lock29397
Node: omp_set_lock30050
Node: omp_test_lock30905
Node: omp_unset_lock31881
Node: omp_destroy_lock32812
Node: omp_init_nest_lock33489
Node: omp_set_nest_lock34224
Node: omp_test_nest_lock35139
Node: omp_unset_nest_lock36166
Node: omp_destroy_nest_lock37181
Node: omp_get_wtick37932
Node: omp_get_wtime38524
Node: Environment Variables39300
Node: OMP_CANCELLATION40692
Node: OMP_DISPLAY_ENV41225
Node: OMP_DEFAULT_DEVICE41928
Node: OMP_DYNAMIC42708
Node: OMP_MAX_ACTIVE_LEVELS43304
Node: OMP_NESTED43943
Node: OMP_NUM_THREADS44548
Node: OMP_PROC_BIND45236
Node: OMP_PLACES46428
Node: OMP_STACKSIZE48603
Node: OMP_SCHEDULE49427
Node: OMP_THREAD_LIMIT50123
Node: OMP_WAIT_POLICY50723
Node: GOMP_CPU_AFFINITY51415
Node: GOMP_DEBUG53145
Node: GOMP_STACKSIZE53652
Node: GOMP_SPINCOUNT54481
Node: The libgomp ABI55653
Node: Implementing MASTER construct56452
Node: Implementing CRITICAL construct56866
Node: Implementing ATOMIC construct57605
Node: Implementing FLUSH construct58086
Node: Implementing BARRIER construct58357
Node: Implementing THREADPRIVATE construct58626
Node: Implementing PRIVATE clause59279
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses59860
Node: Implementing REDUCTION clause61184
Node: Implementing PARALLEL construct61741
Node: Implementing FOR construct62998
Node: Implementing ORDERED construct64996
Node: Implementing SECTIONS construct65302
Node: Implementing SINGLE construct66068
Node: Reporting Bugs66730
Node: Copying67090
Node: GNU Free Documentation License104637
Node: Funding129760
Node: Library Index132286
@


1.6
log
@merge GCC 5.4.0.  (needs mknative, may not build yet.)
@
text
@d1 2
a2 2
This is libgomp.info, produced by makeinfo version 4.12 from
/space/rguenther/gcc-5.4.0/gcc-5.4.0/libgomp/libgomp.texi.
d21 2
a22 3
software.  Copies published by the Free Software Foundation raise
funds for GNU development.

d53 2
a54 2
software.  Copies published by the Free Software Foundation raise
funds for GNU development.
d62 5
a66 5
This manual documents the usage of libgomp, the GNU Offloading and
Multi Processing Runtime Library.  This includes the GNU implementation
of the OpenMP (http://www.openmp.org) Application Programming Interface
(API) for multi-platform shared-memory parallel programming in C/C++
and Fortran, and the GNU implementation of the OpenACC
d100 10
a109 11
compile-time flag `-fopenmp' must be specified.  This enables the
OpenMP directive `#pragma omp' in C/C++ and `!$omp' directives in free
form, `c$omp', `*$omp' and `!$omp' directives in fixed form, `!$'
conditional compilation sentinels in free form and `c$', `*$' and `!$'
sentinels in fixed form, for Fortran.  The flag also arranges for
automatic linking of the OpenMP runtime library (*note Runtime Library
Routines::).

   A complete description of all OpenMP directives accepted may be
found in the OpenMP Application Program Interface
(http://www.openmp.org) manual, version 4.0.
d176 1
a176 1
2.1 `omp_get_active_level' - Number of parallel regions
d184 1
a184 1
     _Prototype_:  `int omp_get_active_level(void);'
d187 1
a187 1
     _Interface_:  `integer function omp_get_active_level()'
d199 1
a199 1
2.2 `omp_get_ancestor_thread_num' - Ancestor thread ID
d205 2
a206 2
     outside zero to `omp_get_level' -1 is returned; if LEVEL is
     `omp_get_level' the result is identical to `omp_get_thread_num'.
d209 1
a209 1
     _Prototype_:  `int omp_get_ancestor_thread_num(int level);'
d212 2
a213 2
     _Interface_:  `integer function omp_get_ancestor_thread_num(level)'
                   `integer level'
d225 1
a225 1
2.3 `omp_get_cancellation' - Whether cancellation support is enabled
d229 3
a231 3
     This function returns `true' if cancellation is activated, `false'
     otherwise.  Here, `true' and `false' represent their
     language-specific counterparts.  Unless `OMP_CANCELLATION' is set
d235 1
a235 1
     _Prototype_:  `int omp_get_cancellation(void);'
d238 1
a238 1
     _Interface_:  `logical function omp_get_cancellation()'
d249 1
a249 1
2.4 `omp_get_default_device' - Get the default device for target regions
d256 1
a256 1
     _Prototype_:  `int omp_get_default_device(void);'
d259 1
a259 1
     _Interface_:  `integer function omp_get_default_device()'
d270 1
a270 1
2.5 `omp_get_dynamic' - Dynamic teams setting
d274 2
a275 2
     This function returns `true' if enabled, `false' otherwise.  Here,
     `true' and `false' represent their language-specific counterparts.
d278 3
a280 3
     `OMP_DYNAMIC' environment variable or at runtime using
     `omp_set_dynamic'.  If undefined, dynamic adjustment is disabled
     by default.
d283 1
a283 1
     _Prototype_:  `int omp_get_dynamic(void);'
d286 1
a286 1
     _Interface_:  `logical function omp_get_dynamic()'
d297 1
a297 1
2.6 `omp_get_level' - Obtain the current nesting level
d305 1
a305 1
     _Prototype_:  `int omp_get_level(void);'
d308 1
a308 1
     _Interface_:  `integer function omp_level()'
d319 1
a319 1
2.7 `omp_get_max_active_levels' - Maximum number of active regions
d327 1
a327 1
     _Prototype_:  `int omp_get_max_active_levels(void);'
d330 1
a330 1
     _Interface_:  `integer function omp_get_max_active_levels()'
d341 1
a341 1
2.8 `omp_get_max_threads' - Maximum number of threads of parallel region
d346 1
a346 1
     region that does not use the clause `num_threads'.
d349 1
a349 1
     _Prototype_:  `int omp_get_max_threads(void);'
d352 1
a352 1
     _Interface_:  `integer function omp_get_max_threads()'
d364 1
a364 1
2.9 `omp_get_nested' - Nested parallel regions
d368 2
a369 2
     This function returns `true' if nested parallel regions are
     enabled, `false' otherwise.  Here, `true' and `false' represent
d373 2
a374 2
     `OMP_NESTED' environment variable or at runtime using
     `omp_set_nested'.  If undefined, nested parallel regions are
d378 1
a378 1
     _Prototype_:  `int omp_get_nested(void);'
d381 1
a381 1
     _Interface_:  `logical function omp_get_nested()'
d392 1
a392 1
2.10 `omp_get_num_devices' - Number of target devices
d399 1
a399 1
     _Prototype_:  `int omp_get_num_devices(void);'
d402 1
a402 1
     _Interface_:  `integer function omp_get_num_devices()'
d410 1
a410 1
2.11 `omp_get_num_procs' - Number of processors online
d417 1
a417 1
     _Prototype_:  `int omp_get_num_procs(void);'
d420 1
a420 1
     _Interface_:  `integer function omp_get_num_procs()'
d428 1
a428 1
2.12 `omp_get_num_teams' - Number of teams
d435 1
a435 1
     _Prototype_:  `int omp_get_num_teams(void);'
d438 1
a438 1
     _Interface_:  `integer function omp_get_num_teams()'
d446 1
a446 1
2.13 `omp_get_num_threads' - Size of the active team
d450 2
a451 2
     Returns the number of threads in the current team.  In a
     sequential section of the program `omp_get_num_threads' returns 1.
d454 5
a458 5
     `OMP_NUM_THREADS' environment variable.  At runtime, the size of
     the current team may be set either by the `NUM_THREADS' clause or
     by `omp_set_num_threads'.  If none of the above were used to
     define a specific value and `OMP_DYNAMIC' is disabled, one thread
     per CPU online is used.
d461 1
a461 1
     _Prototype_:  `int omp_get_num_threads(void);'
d464 1
a464 1
     _Interface_:  `integer function omp_get_num_threads()'
d476 1
a476 1
2.14 `omp_get_proc_bind' - Whether theads may be moved between CPUs
d480 5
a484 5
     This functions returns the currently active thread affinity
     policy, which is set via `OMP_PROC_BIND'.  Possible values are
     `omp_proc_bind_false', `omp_proc_bind_true',
     `omp_proc_bind_master', `omp_proc_bind_close' and
     `omp_proc_bind_spread'.
d487 1
a487 1
     _Prototype_:  `omp_proc_bind_t omp_get_proc_bind(void);'
d490 2
a491 2
     _Interface_:  `integer(kind=omp_proc_bind_kind) function
                   omp_get_proc_bind()'
d503 1
a503 1
2.15 `omp_get_schedule' - Obtain the runtime scheduling method
d508 2
a509 2
     set to the value `omp_sched_static', `omp_sched_dynamic',
     `omp_sched_guided' or `omp_sched_auto'.  The second argument,
d513 2
a514 2
     _Prototype_:  `void omp_get_schedule(omp_sched_t *kind, int
                   *modifier);'
d517 3
a519 3
     _Interface_:  `subroutine omp_get_schedule(kind, modifier)'
                   `integer(kind=omp_sched_kind) kind'
                   `integer modifier'
d530 1
a530 1
2.16 `omp_get_team_num' - Get team number
d537 1
a537 1
     _Prototype_:  `int omp_get_team_num(void);'
d540 1
a540 1
     _Interface_:  `integer function omp_get_team_num()'
d548 1
a548 1
2.17 `omp_get_team_size' - Number of threads in a team
d554 3
a556 3
     values of LEVEL outside zero to `omp_get_level', -1 is returned;
     if LEVEL is zero, 1 is returned, and for `omp_get_level', the
     result is identical to `omp_get_num_threads'.
d559 1
a559 1
     _Prototype_:  `int omp_get_team_size(int level);'
d562 2
a563 2
     _Interface_:  `integer function omp_get_team_size(level)'
                   `integer level'
d575 1
a575 1
2.18 `omp_get_thread_limit' - Maximum number of threads
d582 1
a582 1
     _Prototype_:  `int omp_get_thread_limit(void);'
d585 1
a585 1
     _Interface_:  `integer function omp_get_thread_limit()'
d596 1
a596 1
2.19 `omp_get_thread_num' - Current thread ID
d601 4
a604 4
     team.  In a sequential parts of the program, `omp_get_thread_num'
     always returns 0.  In parallel regions the return value varies
     from 0 to `omp_get_num_threads'-1 inclusive.  The return value of
     the master thread of a team is always 0.
d607 1
a607 1
     _Prototype_:  `int omp_get_thread_num(void);'
d610 1
a610 1
     _Interface_:  `integer function omp_get_thread_num()'
d621 1
a621 1
2.20 `omp_in_parallel' - Whether a parallel region is active
d625 2
a626 2
     This function returns `true' if currently running in parallel,
     `false' otherwise.  Here, `true' and `false' represent their
d630 1
a630 1
     _Prototype_:  `int omp_in_parallel(void);'
d633 1
a633 1
     _Interface_:  `logical function omp_in_parallel()'
d641 1
a641 1
2.21 `omp_in_final' - Whether in final or included task region
d645 2
a646 2
     This function returns `true' if currently running in a final or
     included task region, `false' otherwise.  Here, `true' and `false'
d650 1
a650 1
     _Prototype_:  `int omp_in_final(void);'
d653 1
a653 1
     _Interface_:  `logical function omp_in_final()'
d661 1
a661 1
2.22 `omp_is_initial_device' - Whether executing on the host device
d665 2
a666 2
     This function returns `true' if currently running on the host
     device, `false' otherwise.  Here, `true' and `false' represent
d670 1
a670 1
     _Prototype_:  `int omp_is_initial_device(void);'
d673 1
a673 1
     _Interface_:  `logical function omp_is_initial_device()'
d681 1
a681 1
2.23 `omp_set_default_device' - Set the default device for target regions
d689 1
a689 1
     _Prototype_:  `void omp_set_default_device(int device_num);'
d692 2
a693 2
     _Interface_:  `subroutine omp_set_default_device(device_num)'
                   `integer device_num'
d704 1
a704 1
2.24 `omp_set_dynamic' - Enable/disable dynamic teams
d710 2
a711 2
     of `true' and `false', where `true' enables dynamic adjustment of
     team sizes and `false' disables it.
d714 1
a714 1
     _Prototype_:  `void omp_set_dynamic(int dynamic_threads);'
d717 2
a718 2
     _Interface_:  `subroutine omp_set_dynamic(dynamic_threads)'
                   `logical, intent(in) :: dynamic_threads'
d729 1
a729 1
2.25 `omp_set_max_active_levels' - Limits the number of active parallel regions
d737 1
a737 1
     _Prototype_:  `void omp_set_max_active_levels(int max_levels);'
d740 2
a741 2
     _Interface_:  `subroutine omp_set_max_active_levels(max_levels)'
                   `integer max_levels'
d752 1
a752 1
2.26 `omp_set_nested' - Enable/disable nested parallel regions
d758 2
a759 2
     language-specific equivalent of `true' and `false', where `true'
     enables dynamic adjustment of team sizes and `false' disables it.
d762 1
a762 1
     _Prototype_:  `void omp_set_nested(int nested);'
d765 2
a766 2
     _Interface_:  `subroutine omp_set_nested(nested)'
                   `logical, intent(in) :: nested'
d777 1
a777 1
2.27 `omp_set_num_threads' - Set upper team size limit
d782 2
a783 2
     parallel sections, if those do not specify a `num_threads' clause.
     The argument of `omp_set_num_threads' shall be a positive integer.
d786 1
a786 1
     _Prototype_:  `void omp_set_num_threads(int num_threads);'
d789 2
a790 2
     _Interface_:  `subroutine omp_set_num_threads(num_threads)'
                   `integer, intent(in) :: num_threads'
d802 1
a802 1
2.28 `omp_set_schedule' - Set the runtime scheduling method
d807 2
a808 2
     value `omp_sched_static', `omp_sched_dynamic', `omp_sched_guided'
     or `omp_sched_auto'.  Except for `omp_sched_auto', the chunk size
d810 1
a810 1
     value if zero or negative.  For `omp_sched_auto' the MODIFIER
d814 1
a814 2
     _Prototype_:  `void omp_set_schedule(omp_sched_t kind, int
                   modifier);'
d817 3
a819 3
     _Interface_:  `subroutine omp_set_schedule(kind, modifier)'
                   `integer(kind=omp_sched_kind) kind'
                   `integer modifier'
d830 1
a830 1
2.29 `omp_init_lock' - Initialize simple lock
d838 1
a838 1
     _Prototype_:  `void omp_init_lock(omp_lock_t *lock);'
d841 2
a842 2
     _Interface_:  `subroutine omp_init_lock(svar)'
                   `integer(omp_lock_kind), intent(out) :: svar'
d853 1
a853 1
2.30 `omp_set_lock' - Wait for and set simple lock
d857 4
a860 4
     Before setting a simple lock, the lock variable must be
     initialized by `omp_init_lock'.  The calling thread is blocked
     until the lock is available.  If the lock is already held by the
     current thread, a deadlock occurs.
d863 1
a863 1
     _Prototype_:  `void omp_set_lock(omp_lock_t *lock);'
d866 2
a867 2
     _Interface_:  `subroutine omp_set_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d879 1
a879 1
2.31 `omp_test_lock' - Test and set simple lock if available
d883 5
a887 5
     Before setting a simple lock, the lock variable must be
     initialized by `omp_init_lock'.  Contrary to `omp_set_lock',
     `omp_test_lock' does not block if the lock is not available.  This
     function returns `true' upon success, `false' otherwise.  Here,
     `true' and `false' represent their language-specific counterparts.
d890 1
a890 1
     _Prototype_:  `int omp_test_lock(omp_lock_t *lock);'
d893 2
a894 2
     _Interface_:  `logical function omp_test_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d905 1
a905 1
2.32 `omp_unset_lock' - Unset simple lock
d910 4
a913 4
     `omp_set_lock' or `omp_test_lock' before.  In addition, the lock
     must be held by the thread calling `omp_unset_lock'.  Then, the
     lock becomes unlocked.  If one or more threads attempted to set
     the lock before, one of them is chosen to, again, set the lock to
d917 1
a917 1
     _Prototype_:  `void omp_unset_lock(omp_lock_t *lock);'
d920 2
a921 2
     _Interface_:  `subroutine omp_unset_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d932 1
a932 1
2.33 `omp_destroy_lock' - Destroy simple lock
d940 1
a940 1
     _Prototype_:  `void omp_destroy_lock(omp_lock_t *lock);'
d943 2
a944 2
     _Interface_:  `subroutine omp_destroy_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d955 1
a955 1
2.34 `omp_init_nest_lock' - Initialize nested lock
d963 1
a963 1
     _Prototype_:  `void omp_init_nest_lock(omp_nest_lock_t *lock);'
d966 2
a967 2
     _Interface_:  `subroutine omp_init_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(out) :: nvar'
d978 1
a978 1
2.35 `omp_set_nest_lock' - Wait for and set nested lock
d982 4
a985 5
     Before setting a nested lock, the lock variable must be
     initialized by `omp_init_nest_lock'.  The calling thread is
     blocked until the lock is available.  If the lock is already held
     by the current thread, the nesting count for the lock is
     incremented.
d988 1
a988 1
     _Prototype_:  `void omp_set_nest_lock(omp_nest_lock_t *lock);'
d991 2
a992 2
     _Interface_:  `subroutine omp_set_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1003 1
a1003 1
2.36 `omp_test_nest_lock' - Test and set nested lock if available
d1007 5
a1011 6
     Before setting a nested lock, the lock variable must be
     initialized by `omp_init_nest_lock'.  Contrary to
     `omp_set_nest_lock', `omp_test_nest_lock' does not block if the
     lock is not available.  If the lock is already held by the current
     thread, the new nesting count is returned.  Otherwise, the return
     value equals zero.
d1014 1
a1014 1
     _Prototype_:  `int omp_test_nest_lock(omp_nest_lock_t *lock);'
d1017 2
a1018 2
     _Interface_:  `logical function omp_test_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1029 1
a1029 1
2.37 `omp_unset_nest_lock' - Unset nested lock
d1034 1
a1034 1
     `omp_set_nested_lock' or `omp_test_nested_lock' before.  In
d1036 1
a1036 1
     `omp_unset_nested_lock'.  If the nesting count drops to zero, the
d1042 1
a1042 1
     _Prototype_:  `void omp_unset_nest_lock(omp_nest_lock_t *lock);'
d1045 2
a1046 2
     _Interface_:  `subroutine omp_unset_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1057 1
a1057 1
2.38 `omp_destroy_nest_lock' - Destroy nested lock
d1066 1
a1066 1
     _Prototype_:  `void omp_destroy_nest_lock(omp_nest_lock_t *);'
d1069 2
a1070 2
     _Interface_:  `subroutine omp_destroy_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1081 1
a1081 1
2.39 `omp_get_wtick' - Get timer precision
d1089 1
a1089 1
     _Prototype_:  `double omp_get_wtick(void);'
d1092 1
a1092 1
     _Interface_:  `double precision function omp_get_wtick()'
d1103 1
a1103 1
2.40 `omp_get_wtime' - Elapsed wall clock time
d1114 1
a1114 1
     _Prototype_:  `double omp_get_wtime(void);'
d1117 1
a1117 1
     _Interface_:  `double precision function omp_get_wtime()'
d1131 1
a1131 1
The environment variables which beginning with `OMP_' are defined by
d1133 1
a1133 1
beginning with `GOMP_' are GNU extensions.
d1158 1
a1158 1
3.1 `OMP_CANCELLATION' - Set whether cancellation is activated
d1162 3
a1164 3
     If set to `TRUE', the cancellation is activated.  If set to
     `FALSE' or if unset, cancellation is disabled and the `cancel'
     construct is ignored.
d1175 1
a1175 1
3.2 `OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
d1179 1
a1179 1
     If set to `TRUE', the OpenMP version number and the values
d1181 1
a1181 1
     `stderr'.  If set to `VERBOSE', it additionally shows the value of
d1183 1
a1183 1
     or set to `FALSE', this information will not be shown.
d1191 1
a1191 1
3.3 `OMP_DEFAULT_DEVICE' - Set the device used in target regions
d1195 5
a1199 5
     Set to choose the device which is used in a `target' region,
     unless the value is overridden by `omp_set_default_device' or by a
     `device' clause.  The value shall be the nonnegative device
     number. If no device with the given device number exists, the code
     is executed on the host.  If unset, device number 0 will be used.
d1210 1
a1210 1
3.4 `OMP_DYNAMIC' - Dynamic adjustment of threads
d1216 2
a1217 2
     `TRUE' or `FALSE'.  If undefined, dynamic adjustment is disabled
     by default.
d1228 1
a1228 1
3.5 `OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1245 1
a1245 1
3.6 `OMP_NESTED' - Nested parallel regions
d1251 1
a1251 1
     environment variable shall be `TRUE' or `FALSE'.  If undefined,
d1263 1
a1263 1
3.7 `OMP_NUM_THREADS' - Specifies the number of threads to use
d1267 5
a1271 5
     Specifies the default number of threads to use in parallel
     regions.  The value of this variable shall be a comma-separated
     list of positive integers; the value specified the number of
     threads to use for the corresponding nested level.  If undefined
     one thread per CPU is used.
d1282 1
a1282 1
3.8 `OMP_PROC_BIND' - Whether theads may be moved between CPUs
d1287 1
a1287 1
     to `TRUE', OpenMP theads should not be moved; if set to `FALSE'
d1289 1
a1289 1
     values `MASTER', `CLOSE' and `SPREAD' can be used to specify the
d1291 3
a1293 3
     `MASTER' the worker threads are in the same place partition as the
     master thread.  With `CLOSE' those are kept close to the master
     thread in contiguous place partitions.  And with `SPREAD' a sparse
d1296 2
a1297 2
     When undefined, `OMP_PROC_BIND' defaults to `TRUE' when
     `OMP_PLACES' or `GOMP_CPU_AFFINITY' is set and `FALSE' otherwise.
d1309 1
a1309 1
3.9 `OMP_PLACES' - Specifies on which CPUs the theads should be placed
d1313 3
a1315 3
     The thread placement can be either specified using an abstract
     name or by an explicit list of the places.  The abstract names
     `threads', `cores' and `sockets' can be optionally followed by a
d1317 3
a1319 3
     shall be created.  With `threads' each place corresponds to a
     single hardware thread; `cores' to a single core with the
     corresponding number of hardware threads; and with `sockets' the
d1321 1
a1321 1
     be shown by setting the `OMP_DISPLAY_ENV' environment variable.
d1334 2
a1335 2
     specifies the same places list: `"{0,1,2}, {3,4,6}, {7,8,9},
     {10,11,12}"'; `"{0:3}, {3:3}, {7:3}, {10:3}"'; and `"{0:2}:4:3"'.
d1337 2
a1338 2
     If `OMP_PLACES' and `GOMP_CPU_AFFINITY' are unset and
     `OMP_PROC_BIND' is either unset or `false', threads may be moved
d1351 1
a1351 1
3.10 `OMP_STACKSIZE' - Set default thread stack size
d1356 7
a1362 7
     is suffixed by `B', `K', `M' or `G', in which case the size is,
     respectively, in bytes, kilobytes, megabytes or gigabytes.  This
     is different from `pthread_attr_setstacksize' which gets the
     number of bytes as an argument.  If the stack size cannot be set
     due to system constraints, an error is reported and the initial
     stack size is left unchanged.  If undefined, the stack size is
     system dependent.
d1370 1
a1370 1
3.11 `OMP_SCHEDULE' - How threads are scheduled
d1374 5
a1378 5
     Allows to specify `schedule type' and `chunk size'.  The value of
     the variable shall have the form: `type[,chunk]' where `type' is
     one of `static', `dynamic', `guided' or `auto' The optional
     `chunk' size shall be a positive integer.  If undefined, dynamic
     scheduling and a chunk size of 1 is used.
d1390 1
a1390 1
3.12 `OMP_THREAD_LIMIT' - Set the maximum number of threads
d1407 1
a1407 1
3.13 `OMP_WAIT_POLICY' - How waiting threads are handled
d1412 2
a1413 2
     the value is `PASSIVE', waiting threads should not consume CPU
     power while waiting; while the value is `ACTIVE' specifies that
d1426 1
a1426 1
3.14 `GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d1434 2
a1435 2
     (M-N:S).  CPU numbers are zero based.  For example,
     `GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
d1439 1
a1439 1
     beginning of the list.  `GOMP_CPU_AFFINITY=0' binds all threads to
d1444 10
a1453 10
     language-specific library functions, e.g., `getenv' in C or
     `GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
     setting of the `GOMP_CPU_AFFINITY' environment variable.  A
     defined CPU affinity on startup cannot be changed or disabled
     during the runtime of the application.

     If both `GOMP_CPU_AFFINITY' and `OMP_PROC_BIND' are set,
     `OMP_PROC_BIND' has a higher precedence.  If neither has been set
     and `OMP_PROC_BIND' is unset, or when `OMP_PROC_BIND' is set to
     `FALSE', the host system will handle the assignment of threads to
d1462 1
a1462 1
3.15 `GOMP_DEBUG' - Enable debugging output
d1466 2
a1467 2
     Enable debugging output.  The variable should be set to `0'
     (disabled, also the default if not set), or `1' (enabled).
d1476 1
a1476 1
3.16 `GOMP_STACKSIZE' - Set default thread stack size
d1481 1
a1481 1
     from `pthread_attr_setstacksize' which gets the number of bytes as
d1498 1
a1498 1
3.17 `GOMP_SPINCOUNT' - Set the busy-wait spin count
d1504 1
a1504 1
     value may be either `INFINITE', `INFINITY' to always wait actively
d1507 8
a1514 9
     suffixes acting as multiplication factors: `k' (kilo, thousand),
     `M' (mega, million), `G' (giga, billion), or `T' (tera, trillion).
     If undefined, 0 is used when `OMP_WAIT_POLICY' is `PASSIVE',
     300,000 is used when `OMP_WAIT_POLICY' is undefined and 30 billion
     is used when `OMP_WAIT_POLICY' is `ACTIVE'.  If there are more
     OpenMP threads than available CPUs, 1000 and 100 spins are used
     for `OMP_WAIT_POLICY' being `ACTIVE' or undefined, respectively;
     unless the `GOMP_SPINCOUNT' is lower or `OMP_WAIT_POLICY' is
     `PASSIVE'.
d1525 2
a1526 2
The following sections present notes on the external ABI as presented
by libgomp.  Only maintainers should need them.
d1586 1
a1586 1
The target should implement the `__sync' builtins.
d1602 1
a1602 1
Expands to the `__sync_synchronize' builtin.
d1618 4
a1621 4
In _most_ cases we can map this directly to `__thread'.  Except that
OMP allows constructors for C++ objects.  We can either refuse to
support this (how often is it used?) or we can implement something akin
to .ctors.
d1653 2
a1654 2
   It is not clear what to do with bare FOR or SECTION blocks.  The
only thing I can figure is that we do something like:
d1672 2
a1673 2
for the two variables, i.e. not something you could write directly in
C.  Presumably this only makes sense if the "outer" x and y are global
d1686 4
a1689 4
pointer to an array of the type of the variable, indexed by the
thread's TEAM_ID.  The thread stores its final value into the array,
and after the barrier, the master thread iterates over the array to
collect the values.
d1726 3
a1728 3
   The function needs to create the appropriate number of threads
and/or launch them from the dock.  It needs to create the team
structure and assign team ids.
d1733 1
a1733 1
`omp_in_parallel()' state.
d1785 2
a1786 2
also pull it into a local variable if we like, but since its supposed
to remain unchanged, we can also not if we like.
d1788 5
a1792 5
   If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be
able to get away with no work-sharing context at all, since we can
simply perform the arithmetic directly in each thread to divide up the
iterations.  Which would mean that we wouldn't need to call any of
these routines.
d1886 2
a1887 2
"openacc", or "openmp", or both to the keywords field in the bug
report, as appropriate.
d1897 1
a1897 1
     Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/'
d1925 3
a1927 3
these rights or asking you to surrender the rights.  Therefore, you
have certain responsibilities if you distribute copies of the software,
or if you modify it: responsibilities to respect the freedom of others.
d1946 9
a1954 10
modified versions of the software inside them, although the
manufacturer can do so.  This is fundamentally incompatible with the
aim of protecting users' freedom to change the software.  The
systematic pattern of such abuse occurs in the area of products for
individuals to use, which is precisely where it is most unacceptable.
Therefore, we have designed this version of the GPL to prohibit the
practice for those products.  If such problems arise substantially in
other domains, we stand ready to extend this provision to those domains
in future versions of the GPL, as needed to protect the freedom of
users.
d1991 2
a1992 2
     infringement under applicable copyright law, except executing it
     on a computer or modifying a private copy.  Propagation includes
d2006 2
a2007 2
     the extent that warranties are provided), that licensees may
     convey the work under this License, and how to view a copy of this
d2015 2
a2016 2
     for making modifications to it.  "Object code" means any
     non-source form of a work.
d2027 4
a2030 4
     Major Component, and (b) serves only to enable use of the work
     with that Major Component, or to implement a Standard Interface
     for which an implementation is available to the public in source
     code form.  A "Major Component", in this context, means a major
d2038 3
a2040 3
     work) run the object code and to modify the work, including
     scripts to control those activities.  However, it does not include
     the work's System Libraries, or general-purpose tools or generally
d2043 4
a2046 4
     Corresponding Source includes interface definition files
     associated with source files for the work, and the source code for
     shared libraries and dynamically linked subprograms that the work
     is specifically designed to require, such as by intimate data
d2063 4
a2066 4
     a covered work is covered by this License only if the output,
     given its content, constitutes a covered work.  This License
     acknowledges your rights of fair use or other equivalent, as
     provided by copyright law.
d2071 8
a2078 8
     sole purpose of having them make modifications exclusively for
     you, or provide you with facilities for running those works,
     provided that you comply with the terms of this License in
     conveying all material for which you do not control copyright.
     Those thus making or running the covered works for you must do so
     exclusively on your behalf, under your direction and control, on
     terms that prohibit them from making any copies of your
     copyrighted material outside their relationship with you.
d2095 2
a2096 2
     with respect to the covered work, and you disclaim any intention
     to limit operation or modification of the work as a means of
d2166 2
a2167 2
          written offer, valid for at least three years and valid for
          as long as you offer spare parts or customer support for that
d2177 2
a2178 2
       c. Convey individual copies of the object code with a copy of
          the written offer to provide the Corresponding Source.  This
d2184 2
a2185 2
          place (gratis or for a charge), and offer equivalent access
          to the Corresponding Source in the same way through the same
d2189 4
a2192 4
          Corresponding Source may be on a different server (operated
          by you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to
          the object code saying where to find the Corresponding Source.
d2194 2
a2195 2
          remain obligated to ensure that it is available for as long
          as needed to satisfy these requirements.
a2201 1

d2209 2
a2210 2
     incorporation into a dwelling.  In determining whether a product
     is a consumer product, doubtful cases shall be resolved in favor of
d2241 5
a2245 5
     warranty, or updates for a work that has been modified or
     installed by the recipient, or for the User Product in which it
     has been modified or installed.  Access to a network may be denied
     when the modification itself materially and adversely affects the
     operation of the network or violates the rules and protocols for
d2275 2
a2276 2
     holders of that material) supplement the terms of this License
     with terms:
d2286 2
a2287 3
          or requiring that modified versions of such material be
          marked in reasonable ways as different from the original
          version; or
d2306 4
a2309 5
     contains a further restriction but permits relicensing or
     conveying under this License, you may add to a covered work
     material governed by the terms of that license document, provided
     that the further restriction does not survive such relicensing or
     conveying.
d2325 2
a2326 2
     under this License (including any patent licenses granted under
     the third paragraph of section 11).
d2330 2
a2331 2
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
d2343 4
a2346 4
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, you do not qualify to receive new
     licenses for the same material under section 10.
d2360 1
a2360 1
 10. Automatic Licensing of Downstream Recipients.
d2374 4
a2377 4
     could give under the previous paragraph, plus a right to
     possession of the Corresponding Source of the work from the
     predecessor in interest, if the predecessor has it or can get it
     with reasonable efforts.
d2381 6
a2386 6
     may not impose a license fee, royalty, or other charge for
     exercise of rights granted under this License, and you may not
     initiate litigation (including a cross-claim or counterclaim in a
     lawsuit) alleging that any patent claim is infringed by making,
     using, selling, offering for sale, or importing the Program or any
     portion of it.
d2388 1
a2388 1
 11. Patents.
d2408 2
a2409 2
     otherwise run, modify and propagate the contents of its
     contributor version.
d2414 3
a2416 3
     patent or covenant not to sue for patent infringement).  To
     "grant" such a patent license to a party means to make such an
     agreement or commitment not to enforce a patent against the party.
d2446 10
a2455 10
     party that is in the business of distributing software, under
     which you make payment to the third party based on the extent of
     your activity of conveying the work, and under which the third
     party grants, to any of the parties who would receive the covered
     work from you, a discriminatory patent license (a) in connection
     with copies of the covered work conveyed by you (or copies made
     from those copies), or (b) primarily for and in connection with
     specific products or compilations that contain the covered work,
     unless you entered into that arrangement, or that patent license
     was granted, prior to 28 March 2007.
d2461 1
a2461 1
 12. No Surrender of Others' Freedom.
d2463 10
a2472 11
     If conditions are imposed on you (whether by court order,
     agreement or otherwise) that contradict the conditions of this
     License, they do not excuse you from the conditions of this
     License.  If you cannot convey a covered work so as to satisfy
     simultaneously your obligations under this License and any other
     pertinent obligations, then as a consequence you may not convey it
     at all.  For example, if you agree to terms that obligate you to
     collect a royalty for further conveying from those to whom you
     convey the Program, the only way you could satisfy both those
     terms and this License would be to refrain entirely from conveying
     the Program.
d2474 1
a2474 1
 13. Use with the GNU Affero General Public License.
d2485 1
a2485 1
 14. Revised Versions of this License.
d2488 3
a2490 4
     versions of the GNU General Public License from time to time.
     Such new versions will be similar in spirit to the present
     version, but may differ in detail to address new problems or
     concerns.
d2496 4
a2499 4
     that numbered version or of any later version published by the
     Free Software Foundation.  If the Program does not specify a
     version number of the GNU General Public License, you may choose
     any version ever published by the Free Software Foundation.
d2511 1
a2511 1
 15. Disclaimer of Warranty.
d2514 1
a2514 1
     APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE
d2518 1
a2518 1
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE
d2523 1
a2523 1
 16. Limitation of Liability.
d2527 2
a2528 2
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
     FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
d2536 1
a2536 1
 17. Interpretation of Sections 15 and 16.
a2544 1

d2575 1
a2575 1
     along with this program.  If not, see `http://www.gnu.org/licenses/'.
d2584 1
a2584 1
     This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
d2586 1
a2586 1
     under certain conditions; type `show c' for details.
d2588 1
a2588 1
   The hypothetical commands `show w' and `show c' should show the
d2596 1
a2596 1
the GNU GPL, see `http://www.gnu.org/licenses/'.
d2603 1
a2603 1
please read `http://www.gnu.org/philosophy/why-not-lgpl.html'.
d2614 1
a2614 1
     `http://fsf.org/'
d2639 2
a2640 2
     of subject matter or whether it is published as a printed book.
     We recommend this License principally for works whose purpose is
d2646 2
a2647 2
     that contains a notice placed by the copyright holder saying it
     can be distributed under the terms of this License.  Such a notice
d2651 3
a2653 3
     of the public is a licensee, and is addressed as "you".  You
     accept the license if you copy, modify or distribute the work in a
     way requiring permission under copyright law.
d2671 6
a2676 6
     titles are designated, as being those of Invariant Sections, in
     the notice that says that the Document is released under this
     License.  If a section does not fit the above definition of
     Secondary then it is not allowed to be designated as Invariant.
     The Document may contain zero Invariant Sections.  If the Document
     does not identify any Invariant Sections then there are none.
d2687 10
a2696 10
     straightforwardly with generic text editors or (for images
     composed of pixels) generic paint programs or (for drawings) some
     widely available drawing editor, and that is suitable for input to
     text formatters or for automatic translation to a variety of
     formats suitable for input to text formatters.  A copy made in an
     otherwise Transparent file format whose markup, or absence of
     markup, has been arranged to thwart or discourage subsequent
     modification by readers is not Transparent.  An image format is
     not Transparent if used for any substantial amount of text.  A
     copy that is not "Transparent" is called "Opaque".
d2700 8
a2707 8
     SGML or XML using a publicly available DTD, and
     standard-conforming simple HTML, PostScript or PDF designed for
     human modification.  Examples of transparent image formats include
     PNG, XCF and JPG.  Opaque formats include proprietary formats that
     can be read and edited only by proprietary word processors, SGML or
     XML for which the DTD and/or processing tools are not generally
     available, and the machine-generated HTML, PostScript or PDF
     produced by some word processors for output purposes only.
d2745 2
a2746 2
     distribute a large enough number of copies you must also follow
     the conditions in section 3.
d2760 5
a2764 6
     front cover must present the full title with all words of the
     title equally prominent and visible.  You may add other material
     on the covers in addition.  Copying with changes limited to the
     covers, as long as they preserve the title of the Document and
     satisfy these conditions, can be treated as verbatim copying in
     other respects.
d2772 11
a2782 12
     numbering more than 100, you must either include a
     machine-readable Transparent copy along with each Opaque copy, or
     state in or with each Opaque copy a computer-network location from
     which the general network-using public has access to download
     using public-standard network protocols a complete Transparent
     copy of the Document, free of added material.  If you use the
     latter option, you must take reasonably prudent steps, when you
     begin distribution of Opaque copies in quantity, to ensure that
     this Transparent copy will remain thus accessible at the stated
     location until at least one year after the last time you
     distribute an Opaque copy (directly or through your agents or
     retailers) of that edition to the public.
d2785 3
a2787 3
     the Document well before redistributing any large number of
     copies, to give them a chance to provide you with an updated
     version of the Document.
d2793 5
a2797 5
     release the Modified Version under precisely this License, with
     the Modified Version filling the role of the Document, thus
     licensing distribution and modification of the Modified Version to
     whoever possesses a copy of it.  In addition, you must do these
     things in the Modified Version:
d2800 5
a2804 5
          distinct from that of the Document, and from those of
          previous versions (which should, if there were any, be listed
          in the History section of the Document).  You may use the
          same title as a previous version if the original publisher of
          that version gives permission.
d2834 6
a2839 6
          authors, and publisher of the Modified Version as given on
          the Title Page.  If there is no section Entitled "History" in
          the Document, create one stating the title, year, authors,
          and publisher of the Document as given on its Title Page,
          then add an item describing the Modified Version as stated in
          the previous sentence.
d2844 5
a2848 5
          previous versions it was based on.  These may be placed in
          the "History" section.  You may omit a network location for a
          work that was published at least four years before the
          Document itself, or if the original publisher of the version
          it refers to gives permission.
d2851 2
a2852 2
          Preserve the Title of the section, and preserve in the
          section all the substance and tone of each of the contributor
d2855 3
a2857 4
       L. Preserve all the Invariant Sections of the Document,
          unaltered in their text and in their titles.  Section numbers
          or the equivalent are not considered part of the section
          titles.
d2870 5
a2874 5
     material copied from the Document, you may at your option
     designate some or all of these sections as invariant.  To do this,
     add their titles to the list of Invariant Sections in the Modified
     Version's license notice.  These titles must be distinct from any
     other section titles.
d2883 9
a2891 9
     and a passage of up to 25 words as a Back-Cover Text, to the end
     of the list of Cover Texts in the Modified Version.  Only one
     passage of Front-Cover Text and one of Back-Cover Text may be
     added by (or through arrangements made by) any one entity.  If the
     Document already includes a cover text for the same cover,
     previously added by you or by arrangement made by the same entity
     you are acting on behalf of, you may not add another; but you may
     replace the old one, on explicit permission from the previous
     publisher that added the old one.
d2901 2
a2902 2
     modified versions, provided that you include in the combination
     all of the Invariant Sections of all of the original documents,
d2929 2
a2930 2
     rules of this License for verbatim copying of each of the
     documents in all other respects.
d2934 3
a2936 3
     a copy of this License into the extracted document, and follow
     this License in all other respects regarding verbatim copying of
     that document.
d2941 2
a2942 2
     separate and independent documents or works, in or on a volume of
     a storage or distribution medium, is called an "aggregate" if the
d2987 2
a2988 2
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
d3000 4
a3003 4
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, receipt of a copy of some or all of
     the same material does not give you any rights to use it.
d3005 1
a3005 1
 10. FUTURE REVISIONS OF THIS LICENSE
d3011 1
a3011 1
     `http://www.gnu.org/copyleft/'.
d3018 5
a3022 5
     published (not as a draft) by the Free Software Foundation.  If
     the Document does not specify a version number of this License,
     you may choose any version ever published (not as a draft) by the
     Free Software Foundation.  If the Document specifies that a proxy
     can decide which future versions of this License can be used, that
d3026 1
a3026 1
 11. RELICENSING
a3055 1

d3072 1
a3072 1
Texts, replace the "with...Texts." line with this:
d3083 3
a3085 3
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License, to
permit their use in free software.
d3115 2
a3116 2
can greatly alter what fraction of the sales price counts as profit.
If the price you pay is $50, ten percent of the profit is probably less
d3126 2
a3127 2
ports such as adding a new CPU to the GNU Compiler Collection
contribute more; major new features or packages contribute the most.
a3145 16
* Environment Variable <1>:              GOMP_SPINCOUNT.        (line 6)
* Environment Variable <2>:              GOMP_STACKSIZE.        (line 6)
* Environment Variable <3>:              GOMP_DEBUG.            (line 6)
* Environment Variable <4>:              GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <5>:              OMP_WAIT_POLICY.       (line 6)
* Environment Variable <6>:              OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <7>:              OMP_SCHEDULE.          (line 6)
* Environment Variable <8>:              OMP_STACKSIZE.         (line 6)
* Environment Variable <9>:              OMP_PLACES.            (line 6)
* Environment Variable <10>:             OMP_PROC_BIND.         (line 6)
* Environment Variable <11>:             OMP_NUM_THREADS.       (line 6)
* Environment Variable <12>:             OMP_NESTED.            (line 6)
* Environment Variable <13>:             OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable <14>:             OMP_DYNAMIC.           (line 6)
* Environment Variable <15>:             OMP_DEFAULT_DEVICE.    (line 6)
* Environment Variable <16>:             OMP_DISPLAY_ENV.       (line 6)
d3147 16
a3164 4
* Implementation specific setting <1>:   GOMP_SPINCOUNT.        (line 6)
* Implementation specific setting <2>:   GOMP_STACKSIZE.        (line 6)
* Implementation specific setting <3>:   OMP_SCHEDULE.          (line 6)
* Implementation specific setting <4>:   OMP_NUM_THREADS.       (line 6)
d3166 4
d3175 81
a3255 81
Node: Top2130
Node: Enabling OpenMP3925
Node: Runtime Library Routines4712
Node: omp_get_active_level7699
Node: omp_get_ancestor_thread_num8397
Node: omp_get_cancellation9324
Node: omp_get_default_device10136
Node: omp_get_dynamic10810
Node: omp_get_level11683
Node: omp_get_max_active_levels12301
Node: omp_get_max_threads12998
Node: omp_get_nested13753
Node: omp_get_num_devices14663
Node: omp_get_num_procs15182
Node: omp_get_num_teams15719
Node: omp_get_num_threads16233
Node: omp_get_proc_bind17320
Node: omp_get_schedule18238
Node: omp_get_team_num19179
Node: omp_get_team_size19676
Node: omp_get_thread_limit20633
Node: omp_get_thread_num21250
Node: omp_in_parallel22119
Node: omp_in_final22766
Node: omp_is_initial_device23438
Node: omp_set_default_device24129
Node: omp_set_dynamic24917
Node: omp_set_max_active_levels25800
Node: omp_set_nested26574
Node: omp_set_num_threads27463
Node: omp_set_schedule28328
Node: omp_init_lock29394
Node: omp_set_lock30044
Node: omp_test_lock30896
Node: omp_unset_lock31869
Node: omp_destroy_lock32797
Node: omp_init_nest_lock33471
Node: omp_set_nest_lock34203
Node: omp_test_nest_lock35120
Node: omp_unset_nest_lock36150
Node: omp_destroy_nest_lock37162
Node: omp_get_wtick37910
Node: omp_get_wtime38500
Node: Environment Variables39274
Node: OMP_CANCELLATION40666
Node: OMP_DISPLAY_ENV41199
Node: OMP_DEFAULT_DEVICE41902
Node: OMP_DYNAMIC42682
Node: OMP_MAX_ACTIVE_LEVELS43278
Node: OMP_NESTED43917
Node: OMP_NUM_THREADS44522
Node: OMP_PROC_BIND45211
Node: OMP_PLACES46403
Node: OMP_STACKSIZE48578
Node: OMP_SCHEDULE49402
Node: OMP_THREAD_LIMIT50098
Node: OMP_WAIT_POLICY50698
Node: GOMP_CPU_AFFINITY51390
Node: GOMP_DEBUG53121
Node: GOMP_STACKSIZE53628
Node: GOMP_SPINCOUNT54457
Node: The libgomp ABI55634
Node: Implementing MASTER construct56433
Node: Implementing CRITICAL construct56847
Node: Implementing ATOMIC construct57586
Node: Implementing FLUSH construct58067
Node: Implementing BARRIER construct58338
Node: Implementing THREADPRIVATE construct58607
Node: Implementing PRIVATE clause59259
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses59840
Node: Implementing REDUCTION clause61164
Node: Implementing PARALLEL construct61721
Node: Implementing FOR construct62978
Node: Implementing ORDERED construct64976
Node: Implementing SECTIONS construct65282
Node: Implementing SINGLE construct66048
Node: Reporting Bugs66710
Node: Copying67070
Node: GNU Free Documentation License104635
Node: Funding129777
Node: Library Index132302
@


1.6.8.1
log
@Pull up the gcc 5.5 import and assorted fixes, requested by mrg in ticket #381:

external/gpl3/gcc/dist/fixincludes/tests/base/iso/stdlib_c99.h up to 1.1.1.1
external/gpl3/gcc/dist/gcc/config/arm/t-phoenix up to 1.1.1.1
external/gpl3/gcc/dist/gcc/config/phoenix.h     up to 1.1.1.1
external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-freebsd.h up to 1.1.1.1
external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64-freebsd up to 1.1.1.1
external/gpl3/gcc/dist/gcc/doc/gcov-dump.1      up to 1.1.1.1
external/gpl3/gcc/dist/gcc/doc/gcov-dump.texi   up to 1.1.1.1
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/lfts_config.h up to 1.1.1.1
external/gpl3/gcc/dist/gcc/config/i386/pcommitintrin.h delete
external/gpl3/gcc/dist/gcc/config/i386/stringop.opt delete
external/gpl3/gcc/lib/libgcc/Makefile.wrapper   delete
external/gpl3/gcc/dist/ChangeLog                up to 1.1.1.10
external/gpl3/gcc/dist/LAST_UPDATED             up to 1.9
external/gpl3/gcc/dist/MD5SUMS                  up to 1.9
external/gpl3/gcc/dist/NEWS                     up to 1.7
external/gpl3/gcc/dist/config.sub               up to 1.11
external/gpl3/gcc/dist/configure                up to 1.11
external/gpl3/gcc/dist/configure.ac             up to 1.10
external/gpl3/gcc/dist/INSTALL/binaries.html    up to 1.5
external/gpl3/gcc/dist/INSTALL/build.html       up to 1.6
external/gpl3/gcc/dist/INSTALL/configure.html   up to 1.6
external/gpl3/gcc/dist/INSTALL/download.html    up to 1.5
external/gpl3/gcc/dist/INSTALL/finalinstall.html up to 1.5
external/gpl3/gcc/dist/INSTALL/gfdl.html        up to 1.5
external/gpl3/gcc/dist/INSTALL/index.html       up to 1.5
external/gpl3/gcc/dist/INSTALL/old.html         up to 1.5
external/gpl3/gcc/dist/INSTALL/prerequisites.html up to 1.6
external/gpl3/gcc/dist/INSTALL/specific.html    up to 1.6
external/gpl3/gcc/dist/INSTALL/test.html        up to 1.5
external/gpl3/gcc/dist/config/ChangeLog         up to 1.1.1.10
external/gpl3/gcc/dist/contrib/ChangeLog        up to 1.1.1.10
external/gpl3/gcc/dist/contrib/gcc_update       up to 1.1.1.4
external/gpl3/gcc/dist/contrib/reghunt/ChangeLog up to 1.1.1.9
external/gpl3/gcc/dist/contrib/regression/ChangeLog up to 1.1.1.9
external/gpl3/gcc/dist/fixincludes/ChangeLog    up to 1.1.1.9
external/gpl3/gcc/dist/fixincludes/fixincl.x    up to 1.1.1.6
external/gpl3/gcc/dist/fixincludes/inclhack.def up to 1.1.1.6
external/gpl3/gcc/dist/fixincludes/tests/base/math.h up to 1.1.1.3
external/gpl3/gcc/dist/fixincludes/tests/base/stdio.h up to 1.1.1.5
external/gpl3/gcc/dist/fixincludes/tests/base/stdlib.h up to 1.1.1.3
external/gpl3/gcc/dist/fixincludes/tests/base/iso/stdio_iso.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/BASE-VER             up to 1.1.1.8
external/gpl3/gcc/dist/gcc/ChangeLog            up to 1.15
external/gpl3/gcc/dist/gcc/DATESTAMP            up to 1.1.1.11
external/gpl3/gcc/dist/gcc/Makefile.in          up to 1.14
external/gpl3/gcc/dist/gcc/asan.c               up to 1.1.1.3
external/gpl3/gcc/dist/gcc/auto-profile.c       up to 1.3
external/gpl3/gcc/dist/gcc/bb-reorder.c         up to 1.1.1.6
external/gpl3/gcc/dist/gcc/builtins.c           up to 1.10
external/gpl3/gcc/dist/gcc/calls.c              up to 1.1.1.6
external/gpl3/gcc/dist/gcc/cgraph.c             up to 1.1.1.5
external/gpl3/gcc/dist/gcc/cgraph.h             up to 1.1.1.5
external/gpl3/gcc/dist/gcc/cgraphclones.c       up to 1.1.1.4
external/gpl3/gcc/dist/gcc/cgraphunit.c         up to 1.1.1.6
external/gpl3/gcc/dist/gcc/combine.c            up to 1.1.1.8
external/gpl3/gcc/dist/gcc/common.opt           up to 1.6
external/gpl3/gcc/dist/gcc/config.gcc           up to 1.37
external/gpl3/gcc/dist/gcc/coverage.c           up to 1.1.1.4
external/gpl3/gcc/dist/gcc/coverage.h           up to 1.1.1.4
external/gpl3/gcc/dist/gcc/cselib.c             up to 1.1.1.5
external/gpl3/gcc/dist/gcc/data-streamer-in.c   up to 1.1.1.3
external/gpl3/gcc/dist/gcc/data-streamer-out.c  up to 1.1.1.3
external/gpl3/gcc/dist/gcc/diagnostic.c         up to 1.4
external/gpl3/gcc/dist/gcc/dwarf2out.c          up to 1.8
external/gpl3/gcc/dist/gcc/explow.c             up to 1.1.1.4
external/gpl3/gcc/dist/gcc/expmed.c             up to 1.1.1.4
external/gpl3/gcc/dist/gcc/expr.c               up to 1.10
external/gpl3/gcc/dist/gcc/fold-const.c         up to 1.1.1.11
external/gpl3/gcc/dist/gcc/function.c           up to 1.1.1.7
external/gpl3/gcc/dist/gcc/function.h           up to 1.1.1.4
external/gpl3/gcc/dist/gcc/fwprop.c             up to 1.1.1.5
external/gpl3/gcc/dist/gcc/gcc.c                up to 1.15
external/gpl3/gcc/dist/gcc/gcov-dump.c          up to 1.1.1.5
external/gpl3/gcc/dist/gcc/gcov-io.c            up to 1.1.1.4
external/gpl3/gcc/dist/gcc/gcov-tool.c          up to 1.1.1.2
external/gpl3/gcc/dist/gcc/gcov.c               up to 1.1.1.5
external/gpl3/gcc/dist/gcc/gcse.c               up to 1.1.1.5
external/gpl3/gcc/dist/gcc/gengtype-lex.c       up to 1.7
external/gpl3/gcc/dist/gcc/genmatch.c           up to 1.1.1.2
external/gpl3/gcc/dist/gcc/gimple-fold.c        up to 1.1.1.5
external/gpl3/gcc/dist/gcc/gimple-ssa-strength-reduction.c up to 1.1.1.5
external/gpl3/gcc/dist/gcc/gimplify.c           up to 1.1.1.7
external/gpl3/gcc/dist/gcc/graphite-isl-ast-to-gimple.c up to 1.3
external/gpl3/gcc/dist/gcc/incpath.c            up to 1.1.1.4
external/gpl3/gcc/dist/gcc/internal-fn.c        up to 1.1.1.3
external/gpl3/gcc/dist/gcc/ipa-comdats.c        up to 1.1.1.2
external/gpl3/gcc/dist/gcc/ipa-cp.c             up to 1.1.1.8
external/gpl3/gcc/dist/gcc/ipa-devirt.c         up to 1.1.1.3
external/gpl3/gcc/dist/gcc/ipa-icf-gimple.c     up to 1.1.1.2
external/gpl3/gcc/dist/gcc/ipa-icf-gimple.h     up to 1.1.1.2
external/gpl3/gcc/dist/gcc/ipa-icf.c            up to 1.1.1.3
external/gpl3/gcc/dist/gcc/ipa-icf.h            up to 1.1.1.2
external/gpl3/gcc/dist/gcc/ipa-inline-transform.c up to 1.1.1.3
external/gpl3/gcc/dist/gcc/ipa-polymorphic-call.c up to 1.1.1.3
external/gpl3/gcc/dist/gcc/ipa-prop.c           up to 1.1.1.7
external/gpl3/gcc/dist/gcc/ipa-pure-const.c     up to 1.1.1.5
external/gpl3/gcc/dist/gcc/ipa-split.c          up to 1.1.1.4
external/gpl3/gcc/dist/gcc/ipa-visibility.c     up to 1.1.1.2
external/gpl3/gcc/dist/gcc/ira-build.c          up to 1.1.1.4
external/gpl3/gcc/dist/gcc/ira-costs.c          up to 1.1.1.4
external/gpl3/gcc/dist/gcc/ira-int.h            up to 1.1.1.4
external/gpl3/gcc/dist/gcc/ira-lives.c          up to 1.1.1.4
external/gpl3/gcc/dist/gcc/loop-doloop.c        up to 1.1.1.5
external/gpl3/gcc/dist/gcc/loop-invariant.c     up to 1.1.1.4
external/gpl3/gcc/dist/gcc/lra-constraints.c    up to 1.1.1.5
external/gpl3/gcc/dist/gcc/lra-remat.c          up to 1.1.1.3
external/gpl3/gcc/dist/gcc/lto-cgraph.c         up to 1.1.1.4
external/gpl3/gcc/dist/gcc/lto-streamer.h       up to 1.1.1.5
external/gpl3/gcc/dist/gcc/match.pd             up to 1.1.1.3
external/gpl3/gcc/dist/gcc/omp-low.c            up to 1.1.1.8
external/gpl3/gcc/dist/gcc/params.def           up to 1.1.1.5
external/gpl3/gcc/dist/gcc/postreload.c         up to 1.1.1.5
external/gpl3/gcc/dist/gcc/pretty-print.c       up to 1.1.1.4
external/gpl3/gcc/dist/gcc/real.c               up to 1.1.1.5
external/gpl3/gcc/dist/gcc/ree.c                up to 1.1.1.4
external/gpl3/gcc/dist/gcc/rtl.h                up to 1.1.1.6
external/gpl3/gcc/dist/gcc/sel-sched.c          up to 1.1.1.6
external/gpl3/gcc/dist/gcc/simplify-rtx.c       up to 1.1.1.4
external/gpl3/gcc/dist/gcc/system.h             up to 1.6
external/gpl3/gcc/dist/gcc/toplev.c             up to 1.2
external/gpl3/gcc/dist/gcc/tree-call-cdce.c     up to 1.1.1.4
external/gpl3/gcc/dist/gcc/tree-cfg.c           up to 1.8
external/gpl3/gcc/dist/gcc/tree-chkp-opt.c      up to 1.1.1.2
external/gpl3/gcc/dist/gcc/tree-chkp.c          up to 1.1.1.2
external/gpl3/gcc/dist/gcc/tree-chrec.c         up to 1.1.1.5
external/gpl3/gcc/dist/gcc/tree-data-ref.c      up to 1.1.1.7
external/gpl3/gcc/dist/gcc/tree-eh.c            up to 1.1.1.7
external/gpl3/gcc/dist/gcc/tree-inline.c        up to 1.1.1.7
external/gpl3/gcc/dist/gcc/tree-inline.h        up to 1.1.1.4
external/gpl3/gcc/dist/gcc/tree-loop-distribution.c up to 1.1.1.4
external/gpl3/gcc/dist/gcc/tree-nested.c        up to 1.1.1.4
external/gpl3/gcc/dist/gcc/tree-predcom.c       up to 1.1.1.5
external/gpl3/gcc/dist/gcc/tree-profile.c       up to 1.1.1.4
external/gpl3/gcc/dist/gcc/tree-ssa-ccp.c       up to 1.8
external/gpl3/gcc/dist/gcc/tree-ssa-loop-im.c   up to 1.1.1.5
external/gpl3/gcc/dist/gcc/tree-ssa-loop-ivopts.c up to 1.1.1.5
external/gpl3/gcc/dist/gcc/tree-ssa-loop-prefetch.c up to 1.1.1.4
external/gpl3/gcc/dist/gcc/tree-ssa-math-opts.c up to 1.1.1.7
external/gpl3/gcc/dist/gcc/tree-ssa-pre.c       up to 1.1.1.5
external/gpl3/gcc/dist/gcc/tree-ssa-reassoc.c   up to 1.1.1.7
external/gpl3/gcc/dist/gcc/tree-ssa-sccvn.c     up to 1.1.1.7
external/gpl3/gcc/dist/gcc/tree-ssa-strlen.c    up to 1.1.1.4
external/gpl3/gcc/dist/gcc/tree-ssa-structalias.c up to 1.1.1.6
external/gpl3/gcc/dist/gcc/tree-ssa-tail-merge.c up to 1.1.1.6
external/gpl3/gcc/dist/gcc/tree-ssa-threadedge.c up to 1.1.1.4
external/gpl3/gcc/dist/gcc/tree-ssa-uninit.c    up to 1.1.1.5
external/gpl3/gcc/dist/gcc/tree-ssa.c           up to 1.1.1.5
external/gpl3/gcc/dist/gcc/tree-vect-data-refs.c up to 1.1.1.9
external/gpl3/gcc/dist/gcc/tree-vect-loop-manip.c up to 1.1.1.5
external/gpl3/gcc/dist/gcc/tree-vrp.c           up to 1.1.1.7
external/gpl3/gcc/dist/gcc/tsan.c               up to 1.1.1.4
external/gpl3/gcc/dist/gcc/ubsan.c              up to 1.1.1.3
external/gpl3/gcc/dist/gcc/value-prof.c         up to 1.1.1.4
external/gpl3/gcc/dist/gcc/c/ChangeLog          up to 1.1.1.8
external/gpl3/gcc/dist/gcc/c/c-decl.c           up to 1.1.1.5
external/gpl3/gcc/dist/gcc/c/c-objc-common.c    up to 1.1.1.3
external/gpl3/gcc/dist/gcc/c/c-parser.c         up to 1.1.1.5
external/gpl3/gcc/dist/gcc/c/c-typeck.c         up to 1.1.1.7
external/gpl3/gcc/dist/gcc/c-family/ChangeLog   up to 1.1.1.7
external/gpl3/gcc/dist/gcc/c-family/c-ada-spec.c up to 1.1.1.3
external/gpl3/gcc/dist/gcc/c-family/c-common.c  up to 1.1.1.6
external/gpl3/gcc/dist/gcc/c-family/c-cppbuiltin.c up to 1.1.1.3
external/gpl3/gcc/dist/gcc/c-family/c-gimplify.c up to 1.1.1.3
external/gpl3/gcc/dist/gcc/c-family/c-omp.c     up to 1.1.1.3
external/gpl3/gcc/dist/gcc/c-family/c-opts.c    up to 1.5
external/gpl3/gcc/dist/gcc/common/config/i386/i386-common.c up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-simd.md up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/aarch64/aarch64.c up to 1.1.1.8
external/gpl3/gcc/dist/gcc/config/aarch64/aarch64.md up to 1.1.1.6
external/gpl3/gcc/dist/gcc/config/arm/arm-builtins.c up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/arm/arm-protos.h up to 1.1.1.5
external/gpl3/gcc/dist/gcc/config/arm/arm.c     up to 1.4
external/gpl3/gcc/dist/gcc/config/arm/arm.h     up to 1.15
external/gpl3/gcc/dist/gcc/config/arm/arm.md    up to 1.12
external/gpl3/gcc/dist/gcc/config/arm/freebsd.h up to 1.4
external/gpl3/gcc/dist/gcc/config/arm/neon.md   up to 1.1.1.5
external/gpl3/gcc/dist/gcc/config/avr/avr.c     up to 1.1.1.7
external/gpl3/gcc/dist/gcc/config/avr/avr.md    up to 1.1.1.7
external/gpl3/gcc/dist/gcc/config/avr/avr.opt   up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/avr/gen-avr-mmcu-specs.c up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/avr/gen-avr-mmcu-texi.c up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/i386/avx2intrin.h up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/i386/avx512bwintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/avx512dqintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/avx512fintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/avx512ifmaintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/avx512ifmavlintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/avx512pfintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/avx512vbmiintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/avx512vbmivlintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/avx512vlbwintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/avx512vldqintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/avx512vlintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/cpuid.h  up to 1.4
external/gpl3/gcc/dist/gcc/config/i386/driver-i386.c up to 1.7
external/gpl3/gcc/dist/gcc/config/i386/gmm_malloc.h up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/i386/i386-builtin-types.def up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/i386/i386-c.c up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/i386/i386.c   up to 1.14
external/gpl3/gcc/dist/gcc/config/i386/i386.h   up to 1.6
external/gpl3/gcc/dist/gcc/config/i386/i386.md  up to 1.1.1.9
external/gpl3/gcc/dist/gcc/config/i386/i386.opt up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/i386/ia32intrin.h up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/i386/lwpintrin.h up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/i386/mmx.md   up to 1.1.1.5
external/gpl3/gcc/dist/gcc/config/i386/pmm_malloc.h up to 1.4
external/gpl3/gcc/dist/gcc/config/i386/rdseedintrin.h up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/i386/rtmintrin.h up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/i386/sse.md   up to 1.1.1.8
external/gpl3/gcc/dist/gcc/config/i386/x86-64.h up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/i386/x86intrin.h up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/nds32/nds32.md up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/pa/pa-64.h    up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/pa/pa.h       up to 1.7
external/gpl3/gcc/dist/gcc/config/rl78/rl78-expand.md up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/rl78/rl78-real.md up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/rl78/rl78-virt.md up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/rs6000/altivec.md up to 1.1.1.9
external/gpl3/gcc/dist/gcc/config/rs6000/dfp.md up to 1.1.1.5
external/gpl3/gcc/dist/gcc/config/rs6000/predicates.md up to 1.1.1.7
external/gpl3/gcc/dist/gcc/config/rs6000/rs6000-c.c up to 1.1.1.8
external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c up to 1.17
external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.md up to 1.1.1.9
external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.opt up to 1.1.1.6
external/gpl3/gcc/dist/gcc/config/rs6000/vector.md up to 1.1.1.6
external/gpl3/gcc/dist/gcc/config/rs6000/vsx.md up to 1.1.1.10
external/gpl3/gcc/dist/gcc/config/s390/s390-modes.def up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/s390/s390.c   up to 1.1.1.8
external/gpl3/gcc/dist/gcc/config/s390/s390.md  up to 1.1.1.6
external/gpl3/gcc/dist/gcc/config/s390/vx-builtins.md up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/sh/sh-mem.cc  up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/sh/sh.c       up to 1.9
external/gpl3/gcc/dist/gcc/config/sh/sh_treg_combine.cc up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/sparc/sparc.c up to 1.1.1.8
external/gpl3/gcc/dist/gcc/config/sparc/sparc.md up to 1.7
external/gpl3/gcc/dist/gcc/config/xtensa/xtensa.c up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/xtensa/xtensa.h up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/xtensa/xtensa.md up to 1.1.1.4
external/gpl3/gcc/dist/gcc/cp/ChangeLog         up to 1.1.1.11
external/gpl3/gcc/dist/gcc/cp/call.c            up to 1.1.1.8
external/gpl3/gcc/dist/gcc/cp/class.c           up to 1.1.1.6
external/gpl3/gcc/dist/gcc/cp/constexpr.c       up to 1.1.1.3
external/gpl3/gcc/dist/gcc/cp/cp-gimplify.c     up to 1.1.1.4
external/gpl3/gcc/dist/gcc/cp/decl.c            up to 1.1.1.8
external/gpl3/gcc/dist/gcc/cp/error.c           up to 1.1.1.4
external/gpl3/gcc/dist/gcc/cp/init.c            up to 1.1.1.6
external/gpl3/gcc/dist/gcc/cp/mangle.c          up to 1.1.1.7
external/gpl3/gcc/dist/gcc/cp/name-lookup.c     up to 1.1.1.6
external/gpl3/gcc/dist/gcc/cp/parser.c          up to 1.1.1.10
external/gpl3/gcc/dist/gcc/cp/pt.c              up to 1.1.1.8
external/gpl3/gcc/dist/gcc/cp/semantics.c       up to 1.1.1.9
external/gpl3/gcc/dist/gcc/cp/tree.c            up to 1.1.1.7
external/gpl3/gcc/dist/gcc/cp/typeck.c          up to 1.1.1.9
external/gpl3/gcc/dist/gcc/doc/aot-compile.1    up to 1.7
external/gpl3/gcc/dist/gcc/doc/cppinternals.info up to 1.7
external/gpl3/gcc/dist/gcc/doc/extend.texi      up to 1.1.1.8
external/gpl3/gcc/dist/gcc/doc/fsf-funding.7    up to 1.7
external/gpl3/gcc/dist/gcc/doc/gc-analyze.1     up to 1.7
external/gpl3/gcc/dist/gcc/doc/gcc.texi         up to 1.1.1.5
external/gpl3/gcc/dist/gcc/doc/gccinstall.info  up to 1.7
external/gpl3/gcc/dist/gcc/doc/gccint.info      up to 1.7
external/gpl3/gcc/dist/gcc/doc/gcj-dbtool.1     up to 1.7
external/gpl3/gcc/dist/gcc/doc/gcj.1            up to 1.7
external/gpl3/gcc/dist/gcc/doc/gcj.info         up to 1.7
external/gpl3/gcc/dist/gcc/doc/gcov-tool.1      up to 1.1.1.3
external/gpl3/gcc/dist/gcc/doc/gcov-tool.texi   up to 1.1.1.2
external/gpl3/gcc/dist/gcc/doc/gcov.texi        up to 1.6
external/gpl3/gcc/dist/gcc/doc/generic.texi     up to 1.1.1.4
external/gpl3/gcc/dist/gcc/doc/gfdl.7           up to 1.7
external/gpl3/gcc/dist/gcc/doc/gfortran.1       up to 1.7
external/gpl3/gcc/dist/gcc/doc/gij.1            up to 1.7
external/gpl3/gcc/dist/gcc/doc/gpl.7            up to 1.7
external/gpl3/gcc/dist/gcc/doc/grmic.1          up to 1.7
external/gpl3/gcc/dist/gcc/doc/install.texi     up to 1.1.1.8
external/gpl3/gcc/dist/gcc/doc/invoke.texi      up to 1.12
external/gpl3/gcc/dist/gcc/doc/jcf-dump.1       up to 1.7
external/gpl3/gcc/dist/gcc/doc/jv-convert.1     up to 1.7
external/gpl3/gcc/dist/gcc/doc/lto.texi         up to 1.1.1.3
external/gpl3/gcc/dist/gcc/doc/passes.texi      up to 1.1.1.4
external/gpl3/gcc/dist/gcc/doc/rebuild-gcj-db.1 up to 1.7
external/gpl3/gcc/dist/gcc/doc/rtl.texi         up to 1.1.1.4
external/gpl3/gcc/dist/gcc/jit/ChangeLog        up to 1.1.1.3
external/gpl3/gcc/dist/gcc/lto/ChangeLog        up to 1.1.1.9
external/gpl3/gcc/dist/gcc/lto/lto-lang.c       up to 1.1.1.4
external/gpl3/gcc/dist/gcc/objc/ChangeLog       up to 1.1.1.9
external/gpl3/gcc/dist/gcc/objcp/ChangeLog      up to 1.1.1.9
external/gpl3/gcc/dist/gnattools/ChangeLog      up to 1.1.1.7
external/gpl3/gcc/dist/gotools/ChangeLog        up to 1.1.1.3
external/gpl3/gcc/dist/include/ChangeLog        up to 1.1.1.9
external/gpl3/gcc/dist/intl/ChangeLog           up to 1.1.1.9
external/gpl3/gcc/dist/libbacktrace/ChangeLog   up to 1.1.1.8
external/gpl3/gcc/dist/libcc1/ChangeLog         up to 1.1.1.3
external/gpl3/gcc/dist/libcpp/ChangeLog         up to 1.1.1.9
external/gpl3/gcc/dist/libcpp/line-map.c        up to 1.1.1.6
external/gpl3/gcc/dist/libdecnumber/ChangeLog   up to 1.1.1.9
external/gpl3/gcc/dist/libgcc/ChangeLog         up to 1.1.1.11
external/gpl3/gcc/dist/libgcc/config.host       up to 1.16
external/gpl3/gcc/dist/libgcc/libgcc2.c         up to 1.1.1.4
external/gpl3/gcc/dist/libgcc/libgcov-driver.c  up to 1.1.1.2
external/gpl3/gcc/dist/libgcc/unwind-c.c        up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/aarch64/linux-unwind.h up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/alpha/linux-unwind.h up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/arm/unwind-arm.c up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/arm/unwind-arm.h up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/bfin/linux-unwind.h up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/i386/linux-unwind.h up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/libbid/ChangeLog up to 1.1.1.9
external/gpl3/gcc/dist/libgcc/config/m68k/linux-unwind.h up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/nios2/linux-unwind.h up to 1.1.1.2
external/gpl3/gcc/dist/libgcc/config/pa/linux-unwind.h up to 1.1.1.4
external/gpl3/gcc/dist/libgcc/config/rs6000/t-crtstuff up to 1.1.1.2
external/gpl3/gcc/dist/libgcc/config/sh/linux-unwind.h up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/sparc/lb1spc.S up to 1.1.1.2
external/gpl3/gcc/dist/libgcc/config/tilepro/linux-unwind.h up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/xtensa/ieee754-df.S up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/xtensa/ieee754-sf.S up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/xtensa/linux-unwind.h up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/xtensa/t-elf up to 1.1.1.2
external/gpl3/gcc/dist/libgcc/config/xtensa/t-linux up to 1.1.1.2
external/gpl3/gcc/dist/libgcc/config/xtensa/t-windowed up to 1.1.1.2
external/gpl3/gcc/dist/libgcc/config/xtensa/unwind-dw2-xtensa.c up to 1.4
external/gpl3/gcc/dist/libgomp/ChangeLog        up to 1.1.1.9
external/gpl3/gcc/dist/libgomp/env.c            up to 1.1.1.4
external/gpl3/gcc/dist/libgomp/hashtab.h        up to 1.1.1.2
external/gpl3/gcc/dist/libgomp/libgomp.info     up to 1.7
external/gpl3/gcc/dist/libiberty/ChangeLog      up to 1.1.1.9
external/gpl3/gcc/dist/libiberty/cp-demangle.c  up to 1.1.1.5
external/gpl3/gcc/dist/libiberty/vprintf-support.c up to 1.2
external/gpl3/gcc/dist/libitm/ChangeLog         up to 1.1.1.7
external/gpl3/gcc/dist/libitm/libitm.info       up to 1.1.1.6
external/gpl3/gcc/dist/libobjc/ChangeLog        up to 1.1.1.10
external/gpl3/gcc/dist/libsanitizer/ChangeLog   up to 1.1.1.7
external/gpl3/gcc/dist/libsanitizer/asan/asan_globals.cc up to 1.1.1.3
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc up to 1.5
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc up to 1.9
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h up to 1.3
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc up to 1.6
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h up to 1.10
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_procmaps_netbsd.cc up to 1.3
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc up to 1.1.1.2
external/gpl3/gcc/dist/libsanitizer/tsan/tsan_platform_linux.cc up to 1.3
external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl.cc up to 1.1.1.3
external/gpl3/gcc/dist/libssp/ChangeLog         up to 1.1.1.9
external/gpl3/gcc/dist/libstdc++-v3/ChangeLog   up to 1.1.1.11
external/gpl3/gcc/dist/libstdc++-v3/acinclude.m4 up to 1.4
external/gpl3/gcc/dist/libstdc++-v3/config.h.in up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/configure   up to 1.8
external/gpl3/gcc/dist/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/config/io/basic_file_stdio.cc up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/config/os/mingw32-w64/error_constants.h up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/doc/doxygen/mainpage.html up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/doc/html/api.html up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/doc/html/faq.html up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/doc/html/ext/lwg-active.html up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/doc/html/ext/lwg-closed.html up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/doc/html/ext/lwg-defects.html up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/abi.html up to 1.1.1.6
external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/bugs.html up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/ext_demangling.html up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/memory.html up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/mt_allocator_impl.html up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/source_code_style.html up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/source_organization.html up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/status.html up to 1.1.1.6
external/gpl3/gcc/dist/libstdc++-v3/doc/xml/api.xml up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/doc/xml/faq.xml up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/doc/xml/manual/abi.xml up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/doc/xml/manual/allocator.xml up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/doc/xml/manual/appendix_contributing.xml up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/doc/xml/manual/extensions.xml up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/doc/xml/manual/intro.xml up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/doc/xml/manual/mt_allocator.xml up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/doc/xml/manual/status_cxx2011.xml up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/doc/xml/manual/status_cxx2014.xml up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/Makefile.am up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/include/Makefile.in up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/include/bits/allocator.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/basic_ios.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/basic_string.h up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/include/bits/basic_string.tcc up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/c++config up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/include/bits/hashtable.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/ios_base.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/istream.tcc up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/list.tcc up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/locale_classes.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/locale_conv.h up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/bits/mask_array.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/predefined_ops.h up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/bits/regex.h up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/bits/regex.tcc up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/bits/regex_compiler.h up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/bits/shared_ptr_base.h up to 1.1.1.6
external/gpl3/gcc/dist/libstdc++-v3/include/bits/slice_array.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/sstream.tcc up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_iterator.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_map.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_multimap.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_multiset.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_set.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_stack.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_tree.h up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/include/bits/uniform_int_dist.h up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/bits/unique_ptr.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/c_global/cmath up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/include/debug/safe_iterator.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/debug/string up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/algorithm up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/any up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/chrono up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/fs_dir.h up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/fs_fwd.h up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/fs_ops.h up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/fs_path.h up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/functional up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/optional up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/ratio up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/string_view up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/string_view.tcc up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/system_error up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/tuple up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/type_traits up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/ext/new_allocator.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/ext/pointer.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/std/atomic up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/std/chrono up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/std/complex up to 1.5
external/gpl3/gcc/dist/libstdc++-v3/include/std/functional up to 1.1.1.7
external/gpl3/gcc/dist/libstdc++-v3/include/std/istream up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/include/std/scoped_allocator up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/std/sstream up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/std/thread up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/std/tuple up to 1.1.1.6
external/gpl3/gcc/dist/libstdc++-v3/include/std/utility up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/tr1/cmath up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/libsupc++/cxxabi.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/python/libstdcxx/v6/printers.py up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/python/libstdcxx/v6/xmethods.py up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/src/c++11/codecvt.cc up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/src/c++11/cxx11-shim_facets.cc up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/src/c++11/shared_ptr.cc up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/src/filesystem/Makefile.in up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/src/filesystem/dir.cc up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/src/filesystem/ops.cc up to 1.1.1.3
external/gpl3/gcc/dist/lto-plugin/ChangeLog     up to 1.1.1.9
external/gpl3/gcc/dist/lto-plugin/lto-plugin.c  up to 1.1.1.4
external/gpl3/gcc/dist/maintainer-scripts/ChangeLog up to 1.1.1.10
external/gpl3/gcc/lib/libasan/Makefile          up to 1.18
external/gpl3/gcc/lib/libgcc/arch/i386/defs.mk  up to 1.5
external/gpl3/gcc/lib/libgcc/arch/m68000/defs.mk up to 1.7
external/gpl3/gcc/lib/libgcc/arch/x86_64/defs.mk up to 1.4
external/gpl3/gcc/lib/libgcc/libgcc/Makefile    up to 1.28
external/gpl3/gcc/lib/libgcc/libgcov/arch/alpha/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/arm/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/armeb/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/earm/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmeb/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhf/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhfeb/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv4/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv4eb/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6eb/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6hf/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6hfeb/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7eb/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7hf/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7hfeb/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/hppa/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/i386/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/ia64/gcov-iov.h up to 1.5
external/gpl3/gcc/lib/libgcc/libgcov/arch/m68000/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/m68k/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/mips64eb/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/mips64el/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/mipseb/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/mipsel/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/gcov-iov.h up to 1.6
external/gpl3/gcc/lib/libgcc/libgcov/arch/sh3eb/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/sh3el/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/sparc/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/sparc64/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/vax/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/x86_64/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libiberty/defs.mk         up to 1.14
external/gpl3/gcc/lib/libiberty/arch/ia64/config.h up to 1.6
external/gpl3/gcc/lib/liblto_plugin/Makefile    up to 1.9
external/gpl3/gcc/lib/libstdc++-v3/Makefile     up to 1.28
external/gpl3/gcc/lib/libstdc++-v3/arch/alpha/c++config.h up to 1.21
external/gpl3/gcc/lib/libstdc++-v3/arch/alpha/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/alpha/gstdint.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/arm/c++config.h up to 1.23
external/gpl3/gcc/lib/libstdc++-v3/arch/arm/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/arm/gstdint.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/armeb/c++config.h up to 1.23
external/gpl3/gcc/lib/libstdc++-v3/arch/armeb/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/armeb/gstdint.h up to 1.15
external/gpl3/gcc/lib/libstdc++-v3/arch/coldfire/defs.mk up to 1.6
external/gpl3/gcc/lib/libstdc++-v3/arch/earm/c++config.h up to 1.21
external/gpl3/gcc/lib/libstdc++-v3/arch/earm/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earm/gstdint.h up to 1.15
external/gpl3/gcc/lib/libstdc++-v3/arch/earmeb/c++config.h up to 1.19
external/gpl3/gcc/lib/libstdc++-v3/arch/earmeb/defs.mk up to 1.6
external/gpl3/gcc/lib/libstdc++-v3/arch/earmeb/gstdint.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/earmhf/c++config.h up to 1.19
external/gpl3/gcc/lib/libstdc++-v3/arch/earmhf/defs.mk up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/earmhf/gstdint.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/earmhfeb/c++config.h up to 1.17
external/gpl3/gcc/lib/libstdc++-v3/arch/earmhfeb/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmhfeb/gstdint.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4/gstdint.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4eb/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4eb/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4eb/gstdint.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6/gstdint.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6eb/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6eb/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6eb/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hf/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hf/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hf/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hfeb/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hfeb/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hfeb/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7eb/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7eb/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7eb/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hf/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hf/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hf/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hfeb/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hfeb/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hfeb/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/hppa/c++config.h up to 1.21
external/gpl3/gcc/lib/libstdc++-v3/arch/hppa/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/hppa/gstdint.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/i386/c++config.h up to 1.22
external/gpl3/gcc/lib/libstdc++-v3/arch/i386/defs.mk up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/i386/gstdint.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/ia64/c++config.h up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/ia64/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/ia64/gstdint.h up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/m68000/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/m68000/defs.mk up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/m68000/gstdint.h up to 1.9
external/gpl3/gcc/lib/libstdc++-v3/arch/m68k/c++config.h up to 1.21
external/gpl3/gcc/lib/libstdc++-v3/arch/m68k/defs.mk up to 1.6
external/gpl3/gcc/lib/libstdc++-v3/arch/m68k/gstdint.h up to 1.12
external/gpl3/gcc/lib/libstdc++-v3/arch/mips64eb/c++config.h up to 1.21
external/gpl3/gcc/lib/libstdc++-v3/arch/mips64eb/defs.mk up to 1.6
external/gpl3/gcc/lib/libstdc++-v3/arch/mips64eb/gstdint.h up to 1.12
external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/c++config.h up to 1.20
external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/defs.mk up to 1.6
external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/mipseb/c++config.h up to 1.23
external/gpl3/gcc/lib/libstdc++-v3/arch/mipseb/defs.mk up to 1.6
external/gpl3/gcc/lib/libstdc++-v3/arch/mipseb/gstdint.h up to 1.12
external/gpl3/gcc/lib/libstdc++-v3/arch/mipsel/c++config.h up to 1.21
external/gpl3/gcc/lib/libstdc++-v3/arch/mipsel/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/mipsel/gstdint.h up to 1.12
external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc/c++config.h up to 1.22
external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/c++config.h up to 1.10
external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/defs.mk up to 1.6
external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/gstdint.h up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb/c++config.h up to 1.21
external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb/defs.mk up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/sh3el/c++config.h up to 1.23
external/gpl3/gcc/lib/libstdc++-v3/arch/sh3el/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/sh3el/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/sparc/c++config.h up to 1.22
external/gpl3/gcc/lib/libstdc++-v3/arch/sparc/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/sparc/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/sparc64/c++config.h up to 1.21
external/gpl3/gcc/lib/libstdc++-v3/arch/sparc64/defs.mk up to 1.6
external/gpl3/gcc/lib/libstdc++-v3/arch/sparc64/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/vax/c++config.h up to 1.23
external/gpl3/gcc/lib/libstdc++-v3/arch/vax/defs.mk up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/vax/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/c++config.h up to 1.25
external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/defs.mk up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/gstdint.h up to 1.15
external/gpl3/gcc/lib/libstdc++-v3/include/bits/Makefile up to 1.19
external/gpl3/gcc/lib/libubsan/Makefile         up to 1.3
external/gpl3/gcc/usr.bin/Makefile.backend      up to 1.6
external/gpl3/gcc/usr.bin/Makefile.inc          up to 1.29
external/gpl3/gcc/usr.bin/backend/Makefile      up to 1.39
external/gpl3/gcc/usr.bin/common/Makefile       up to 1.5
external/gpl3/gcc/usr.bin/frontend/Makefile     up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/alpha/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/alpha/configargs.h up to 1.23
external/gpl3/gcc/usr.bin/gcc/arch/alpha/defs.mk up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/alpha/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/arm/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/arm/configargs.h up to 1.26
external/gpl3/gcc/usr.bin/gcc/arch/arm/defs.mk  up to 1.12
external/gpl3/gcc/usr.bin/gcc/arch/arm/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/armeb/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/armeb/configargs.h up to 1.27
external/gpl3/gcc/usr.bin/gcc/arch/armeb/defs.mk up to 1.12
external/gpl3/gcc/usr.bin/gcc/arch/armeb/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/earm/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/earm/configargs.h up to 1.24
external/gpl3/gcc/usr.bin/gcc/arch/earm/defs.mk up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/earm/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/earmeb/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmeb/configargs.h up to 1.20
external/gpl3/gcc/usr.bin/gcc/arch/earmeb/defs.mk up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmeb/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmhf/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmhf/configargs.h up to 1.21
external/gpl3/gcc/usr.bin/gcc/arch/earmhf/defs.mk up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/earmhf/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmhfeb/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmhfeb/configargs.h up to 1.19
external/gpl3/gcc/usr.bin/gcc/arch/earmhfeb/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmhfeb/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmv4/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmv4/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/earmv4/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv4/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmv4eb/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmv4eb/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/earmv4eb/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv4eb/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmv6/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmv6/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/earmv6/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv6/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmv6eb/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmv6eb/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/earmv6eb/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv6eb/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hf/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hf/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hf/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hf/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hfeb/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hfeb/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hfeb/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hfeb/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmv7/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmv7/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/earmv7/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv7/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmv7eb/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmv7eb/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/earmv7eb/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv7eb/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hf/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hf/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hf/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hf/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hfeb/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hfeb/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hfeb/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hfeb/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/hppa/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/hppa/configargs.h up to 1.24
external/gpl3/gcc/usr.bin/gcc/arch/hppa/defs.mk up to 1.12
external/gpl3/gcc/usr.bin/gcc/arch/hppa/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/i386/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/i386/configargs.h up to 1.31
external/gpl3/gcc/usr.bin/gcc/arch/i386/defs.mk up to 1.12
external/gpl3/gcc/usr.bin/gcc/arch/i386/i386-builtin-types.inc up to 1.4
external/gpl3/gcc/usr.bin/gcc/arch/i386/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/ia64/auto-host.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/ia64/bversion.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/ia64/configargs.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/ia64/defs.mk up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/ia64/plugin-version.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/m68000/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/m68000/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/m68000/defs.mk up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/m68000/plugin-version.h up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/m68k/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/m68k/configargs.h up to 1.21
external/gpl3/gcc/usr.bin/gcc/arch/m68k/defs.mk up to 1.12
external/gpl3/gcc/usr.bin/gcc/arch/m68k/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/mips64eb/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/mips64eb/configargs.h up to 1.22
external/gpl3/gcc/usr.bin/gcc/arch/mips64eb/defs.mk up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/mips64eb/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/mips64el/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/mips64el/configargs.h up to 1.23
external/gpl3/gcc/usr.bin/gcc/arch/mips64el/defs.mk up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/mips64el/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/mipseb/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/mipseb/configargs.h up to 1.22
external/gpl3/gcc/usr.bin/gcc/arch/mipseb/defs.mk up to 1.12
external/gpl3/gcc/usr.bin/gcc/arch/mipseb/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/mipsel/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/mipsel/configargs.h up to 1.23
external/gpl3/gcc/usr.bin/gcc/arch/mipsel/defs.mk up to 1.12
external/gpl3/gcc/usr.bin/gcc/arch/mipsel/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/powerpc/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/powerpc/configargs.h up to 1.28
external/gpl3/gcc/usr.bin/gcc/arch/powerpc/defs.mk up to 1.13
external/gpl3/gcc/usr.bin/gcc/arch/powerpc/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/bversion.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/configargs.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/defs.mk up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/plugin-version.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/sh3eb/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/sh3eb/configargs.h up to 1.24
external/gpl3/gcc/usr.bin/gcc/arch/sh3eb/defs.mk up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/sh3eb/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/sh3el/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/sh3el/configargs.h up to 1.26
external/gpl3/gcc/usr.bin/gcc/arch/sh3el/defs.mk up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/sh3el/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/sparc/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/sparc/configargs.h up to 1.26
external/gpl3/gcc/usr.bin/gcc/arch/sparc/defs.mk up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/sparc/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/sparc64/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/sparc64/configargs.h up to 1.26
external/gpl3/gcc/usr.bin/gcc/arch/sparc64/defs.mk up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/sparc64/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/vax/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/vax/configargs.h up to 1.24
external/gpl3/gcc/usr.bin/gcc/arch/vax/defs.mk  up to 1.12
external/gpl3/gcc/usr.bin/gcc/arch/vax/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/x86_64/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/x86_64/configargs.h up to 1.33
external/gpl3/gcc/usr.bin/gcc/arch/x86_64/defs.mk up to 1.13
external/gpl3/gcc/usr.bin/gcc/arch/x86_64/i386-builtin-types.inc up to 1.4
external/gpl3/gcc/usr.bin/gcc/arch/x86_64/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/include/arch/i386.mk  up to 1.3
external/gpl3/gcc/usr.bin/include/arch/x86_64.mk up to 1.3
external/gpl3/gcc/usr.bin/libcpp/arch/ia64/config.h up to 1.4
distrib/sets/lists/comp/md.amd64				1.252
distrib/sets/lists/comp/md.i386					1.175
distrib/sets/lists/comp/shl.mi					1.309
distrib/sets/lists/debug/shl.mi					1.187
external/gpl3/gcc/lib/liblto_plugin/Makefile			1.6
lib/libc/stdlib/jemalloc.c					1.43

Update gcc to gcc 5.5.
Bump lib minor for liblto_plugin.so link with -liberty.
The HPPA architectures (1.1 and 2.0) both define quadruple-word
(128-bit) floating point types.  Adjust alignment to match.
@
text
@d1 2
a2 2
This is libgomp.info, produced by makeinfo version 6.1 from
libgomp.texi.
d21 3
a23 2
software.  Copies published by the Free Software Foundation raise funds
for GNU development.
d54 2
a55 2
software.  Copies published by the Free Software Foundation raise funds
for GNU development.
d63 5
a67 5
This manual documents the usage of libgomp, the GNU Offloading and Multi
Processing Runtime Library.  This includes the GNU implementation of the
OpenMP (http://www.openmp.org) Application Programming Interface (API)
for multi-platform shared-memory parallel programming in C/C++ and
Fortran, and the GNU implementation of the OpenACC
d101 11
a111 10
compile-time flag '-fopenmp' must be specified.  This enables the OpenMP
directive '#pragma omp' in C/C++ and '!$omp' directives in free form,
'c$omp', '*$omp' and '!$omp' directives in fixed form, '!$' conditional
compilation sentinels in free form and 'c$', '*$' and '!$' sentinels in
fixed form, for Fortran.  The flag also arranges for automatic linking
of the OpenMP runtime library (*note Runtime Library Routines::).

   A complete description of all OpenMP directives accepted may be found
in the OpenMP Application Program Interface (http://www.openmp.org)
manual, version 4.0.
d178 1
a178 1
2.1 'omp_get_active_level' - Number of parallel regions
d186 1
a186 1
     _Prototype_:   'int omp_get_active_level(void);'
d189 1
a189 1
     _Interface_:   'integer function omp_get_active_level()'
d201 1
a201 1
2.2 'omp_get_ancestor_thread_num' - Ancestor thread ID
d207 2
a208 2
     outside zero to 'omp_get_level' -1 is returned; if LEVEL is
     'omp_get_level' the result is identical to 'omp_get_thread_num'.
d211 1
a211 1
     _Prototype_:   'int omp_get_ancestor_thread_num(int level);'
d214 2
a215 2
     _Interface_:   'integer function omp_get_ancestor_thread_num(level)'
                    'integer level'
d227 1
a227 1
2.3 'omp_get_cancellation' - Whether cancellation support is enabled
d231 3
a233 3
     This function returns 'true' if cancellation is activated, 'false'
     otherwise.  Here, 'true' and 'false' represent their
     language-specific counterparts.  Unless 'OMP_CANCELLATION' is set
d237 1
a237 1
     _Prototype_:   'int omp_get_cancellation(void);'
d240 1
a240 1
     _Interface_:   'logical function omp_get_cancellation()'
d251 1
a251 1
2.4 'omp_get_default_device' - Get the default device for target regions
d258 1
a258 1
     _Prototype_:   'int omp_get_default_device(void);'
d261 1
a261 1
     _Interface_:   'integer function omp_get_default_device()'
d272 1
a272 1
2.5 'omp_get_dynamic' - Dynamic teams setting
d276 2
a277 2
     This function returns 'true' if enabled, 'false' otherwise.  Here,
     'true' and 'false' represent their language-specific counterparts.
d280 3
a282 3
     'OMP_DYNAMIC' environment variable or at runtime using
     'omp_set_dynamic'.  If undefined, dynamic adjustment is disabled by
     default.
d285 1
a285 1
     _Prototype_:   'int omp_get_dynamic(void);'
d288 1
a288 1
     _Interface_:   'logical function omp_get_dynamic()'
d299 1
a299 1
2.6 'omp_get_level' - Obtain the current nesting level
d307 1
a307 1
     _Prototype_:   'int omp_get_level(void);'
d310 1
a310 1
     _Interface_:   'integer function omp_level()'
d321 1
a321 1
2.7 'omp_get_max_active_levels' - Maximum number of active regions
d329 1
a329 1
     _Prototype_:   'int omp_get_max_active_levels(void);'
d332 1
a332 1
     _Interface_:   'integer function omp_get_max_active_levels()'
d343 1
a343 1
2.8 'omp_get_max_threads' - Maximum number of threads of parallel region
d348 1
a348 1
     region that does not use the clause 'num_threads'.
d351 1
a351 1
     _Prototype_:   'int omp_get_max_threads(void);'
d354 1
a354 1
     _Interface_:   'integer function omp_get_max_threads()'
d366 1
a366 1
2.9 'omp_get_nested' - Nested parallel regions
d370 2
a371 2
     This function returns 'true' if nested parallel regions are
     enabled, 'false' otherwise.  Here, 'true' and 'false' represent
d375 2
a376 2
     'OMP_NESTED' environment variable or at runtime using
     'omp_set_nested'.  If undefined, nested parallel regions are
d380 1
a380 1
     _Prototype_:   'int omp_get_nested(void);'
d383 1
a383 1
     _Interface_:   'logical function omp_get_nested()'
d394 1
a394 1
2.10 'omp_get_num_devices' - Number of target devices
d401 1
a401 1
     _Prototype_:   'int omp_get_num_devices(void);'
d404 1
a404 1
     _Interface_:   'integer function omp_get_num_devices()'
d412 1
a412 1
2.11 'omp_get_num_procs' - Number of processors online
d419 1
a419 1
     _Prototype_:   'int omp_get_num_procs(void);'
d422 1
a422 1
     _Interface_:   'integer function omp_get_num_procs()'
d430 1
a430 1
2.12 'omp_get_num_teams' - Number of teams
d437 1
a437 1
     _Prototype_:   'int omp_get_num_teams(void);'
d440 1
a440 1
     _Interface_:   'integer function omp_get_num_teams()'
d448 1
a448 1
2.13 'omp_get_num_threads' - Size of the active team
d452 2
a453 2
     Returns the number of threads in the current team.  In a sequential
     section of the program 'omp_get_num_threads' returns 1.
d456 5
a460 5
     'OMP_NUM_THREADS' environment variable.  At runtime, the size of
     the current team may be set either by the 'NUM_THREADS' clause or
     by 'omp_set_num_threads'.  If none of the above were used to define
     a specific value and 'OMP_DYNAMIC' is disabled, one thread per CPU
     online is used.
d463 1
a463 1
     _Prototype_:   'int omp_get_num_threads(void);'
d466 1
a466 1
     _Interface_:   'integer function omp_get_num_threads()'
d478 1
a478 1
2.14 'omp_get_proc_bind' - Whether theads may be moved between CPUs
d482 5
a486 5
     This functions returns the currently active thread affinity policy,
     which is set via 'OMP_PROC_BIND'.  Possible values are
     'omp_proc_bind_false', 'omp_proc_bind_true',
     'omp_proc_bind_master', 'omp_proc_bind_close' and
     'omp_proc_bind_spread'.
d489 1
a489 1
     _Prototype_:   'omp_proc_bind_t omp_get_proc_bind(void);'
d492 2
a493 2
     _Interface_:   'integer(kind=omp_proc_bind_kind) function
                    omp_get_proc_bind()'
d505 1
a505 1
2.15 'omp_get_schedule' - Obtain the runtime scheduling method
d510 2
a511 2
     set to the value 'omp_sched_static', 'omp_sched_dynamic',
     'omp_sched_guided' or 'omp_sched_auto'.  The second argument,
d515 2
a516 2
     _Prototype_:   'void omp_get_schedule(omp_sched_t *kind, int
                    *modifier);'
d519 3
a521 3
     _Interface_:   'subroutine omp_get_schedule(kind, modifier)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer modifier'
d532 1
a532 1
2.16 'omp_get_team_num' - Get team number
d539 1
a539 1
     _Prototype_:   'int omp_get_team_num(void);'
d542 1
a542 1
     _Interface_:   'integer function omp_get_team_num()'
d550 1
a550 1
2.17 'omp_get_team_size' - Number of threads in a team
d556 3
a558 3
     values of LEVEL outside zero to 'omp_get_level', -1 is returned; if
     LEVEL is zero, 1 is returned, and for 'omp_get_level', the result
     is identical to 'omp_get_num_threads'.
d561 1
a561 1
     _Prototype_:   'int omp_get_team_size(int level);'
d564 2
a565 2
     _Interface_:   'integer function omp_get_team_size(level)'
                    'integer level'
d577 1
a577 1
2.18 'omp_get_thread_limit' - Maximum number of threads
d584 1
a584 1
     _Prototype_:   'int omp_get_thread_limit(void);'
d587 1
a587 1
     _Interface_:   'integer function omp_get_thread_limit()'
d598 1
a598 1
2.19 'omp_get_thread_num' - Current thread ID
d603 4
a606 4
     team.  In a sequential parts of the program, 'omp_get_thread_num'
     always returns 0.  In parallel regions the return value varies from
     0 to 'omp_get_num_threads'-1 inclusive.  The return value of the
     master thread of a team is always 0.
d609 1
a609 1
     _Prototype_:   'int omp_get_thread_num(void);'
d612 1
a612 1
     _Interface_:   'integer function omp_get_thread_num()'
d623 1
a623 1
2.20 'omp_in_parallel' - Whether a parallel region is active
d627 2
a628 2
     This function returns 'true' if currently running in parallel,
     'false' otherwise.  Here, 'true' and 'false' represent their
d632 1
a632 1
     _Prototype_:   'int omp_in_parallel(void);'
d635 1
a635 1
     _Interface_:   'logical function omp_in_parallel()'
d643 1
a643 1
2.21 'omp_in_final' - Whether in final or included task region
d647 2
a648 2
     This function returns 'true' if currently running in a final or
     included task region, 'false' otherwise.  Here, 'true' and 'false'
d652 1
a652 1
     _Prototype_:   'int omp_in_final(void);'
d655 1
a655 1
     _Interface_:   'logical function omp_in_final()'
d663 1
a663 1
2.22 'omp_is_initial_device' - Whether executing on the host device
d667 2
a668 2
     This function returns 'true' if currently running on the host
     device, 'false' otherwise.  Here, 'true' and 'false' represent
d672 1
a672 1
     _Prototype_:   'int omp_is_initial_device(void);'
d675 1
a675 1
     _Interface_:   'logical function omp_is_initial_device()'
d683 1
a683 1
2.23 'omp_set_default_device' - Set the default device for target regions
d691 1
a691 1
     _Prototype_:   'void omp_set_default_device(int device_num);'
d694 2
a695 2
     _Interface_:   'subroutine omp_set_default_device(device_num)'
                    'integer device_num'
d706 1
a706 1
2.24 'omp_set_dynamic' - Enable/disable dynamic teams
d712 2
a713 2
     of 'true' and 'false', where 'true' enables dynamic adjustment of
     team sizes and 'false' disables it.
d716 1
a716 1
     _Prototype_:   'void omp_set_dynamic(int dynamic_threads);'
d719 2
a720 2
     _Interface_:   'subroutine omp_set_dynamic(dynamic_threads)'
                    'logical, intent(in) :: dynamic_threads'
d731 1
a731 1
2.25 'omp_set_max_active_levels' - Limits the number of active parallel regions
d739 1
a739 1
     _Prototype_:   'void omp_set_max_active_levels(int max_levels);'
d742 2
a743 2
     _Interface_:   'subroutine omp_set_max_active_levels(max_levels)'
                    'integer max_levels'
d754 1
a754 1
2.26 'omp_set_nested' - Enable/disable nested parallel regions
d760 2
a761 2
     language-specific equivalent of 'true' and 'false', where 'true'
     enables dynamic adjustment of team sizes and 'false' disables it.
d764 1
a764 1
     _Prototype_:   'void omp_set_nested(int nested);'
d767 2
a768 2
     _Interface_:   'subroutine omp_set_nested(nested)'
                    'logical, intent(in) :: nested'
d779 1
a779 1
2.27 'omp_set_num_threads' - Set upper team size limit
d784 2
a785 2
     parallel sections, if those do not specify a 'num_threads' clause.
     The argument of 'omp_set_num_threads' shall be a positive integer.
d788 1
a788 1
     _Prototype_:   'void omp_set_num_threads(int num_threads);'
d791 2
a792 2
     _Interface_:   'subroutine omp_set_num_threads(num_threads)'
                    'integer, intent(in) :: num_threads'
d804 1
a804 1
2.28 'omp_set_schedule' - Set the runtime scheduling method
d809 2
a810 2
     value 'omp_sched_static', 'omp_sched_dynamic', 'omp_sched_guided'
     or 'omp_sched_auto'.  Except for 'omp_sched_auto', the chunk size
d812 1
a812 1
     value if zero or negative.  For 'omp_sched_auto' the MODIFIER
d816 2
a817 1
     _Prototype_:   'void omp_set_schedule(omp_sched_t kind, int modifier);'
d820 3
a822 3
     _Interface_:   'subroutine omp_set_schedule(kind, modifier)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer modifier'
d833 1
a833 1
2.29 'omp_init_lock' - Initialize simple lock
d841 1
a841 1
     _Prototype_:   'void omp_init_lock(omp_lock_t *lock);'
d844 2
a845 2
     _Interface_:   'subroutine omp_init_lock(svar)'
                    'integer(omp_lock_kind), intent(out) :: svar'
d856 1
a856 1
2.30 'omp_set_lock' - Wait for and set simple lock
d860 4
a863 4
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  The calling thread is blocked until the lock
     is available.  If the lock is already held by the current thread, a
     deadlock occurs.
d866 1
a866 1
     _Prototype_:   'void omp_set_lock(omp_lock_t *lock);'
d869 2
a870 2
     _Interface_:   'subroutine omp_set_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d882 1
a882 1
2.31 'omp_test_lock' - Test and set simple lock if available
d886 5
a890 5
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  Contrary to 'omp_set_lock', 'omp_test_lock'
     does not block if the lock is not available.  This function returns
     'true' upon success, 'false' otherwise.  Here, 'true' and 'false'
     represent their language-specific counterparts.
d893 1
a893 1
     _Prototype_:   'int omp_test_lock(omp_lock_t *lock);'
d896 2
a897 2
     _Interface_:   'logical function omp_test_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d908 1
a908 1
2.32 'omp_unset_lock' - Unset simple lock
d913 4
a916 4
     'omp_set_lock' or 'omp_test_lock' before.  In addition, the lock
     must be held by the thread calling 'omp_unset_lock'.  Then, the
     lock becomes unlocked.  If one or more threads attempted to set the
     lock before, one of them is chosen to, again, set the lock to
d920 1
a920 1
     _Prototype_:   'void omp_unset_lock(omp_lock_t *lock);'
d923 2
a924 2
     _Interface_:   'subroutine omp_unset_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d935 1
a935 1
2.33 'omp_destroy_lock' - Destroy simple lock
d943 1
a943 1
     _Prototype_:   'void omp_destroy_lock(omp_lock_t *lock);'
d946 2
a947 2
     _Interface_:   'subroutine omp_destroy_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d958 1
a958 1
2.34 'omp_init_nest_lock' - Initialize nested lock
d966 1
a966 1
     _Prototype_:   'void omp_init_nest_lock(omp_nest_lock_t *lock);'
d969 2
a970 2
     _Interface_:   'subroutine omp_init_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(out) :: nvar'
d981 1
a981 1
2.35 'omp_set_nest_lock' - Wait for and set nested lock
d985 5
a989 4
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  The calling thread is blocked until the
     lock is available.  If the lock is already held by the current
     thread, the nesting count for the lock is incremented.
d992 1
a992 1
     _Prototype_:   'void omp_set_nest_lock(omp_nest_lock_t *lock);'
d995 2
a996 2
     _Interface_:   'subroutine omp_set_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1007 1
a1007 1
2.36 'omp_test_nest_lock' - Test and set nested lock if available
d1011 6
a1016 5
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  Contrary to 'omp_set_nest_lock',
     'omp_test_nest_lock' does not block if the lock is not available.
     If the lock is already held by the current thread, the new nesting
     count is returned.  Otherwise, the return value equals zero.
d1019 1
a1019 1
     _Prototype_:   'int omp_test_nest_lock(omp_nest_lock_t *lock);'
d1022 2
a1023 2
     _Interface_:   'logical function omp_test_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1034 1
a1034 1
2.37 'omp_unset_nest_lock' - Unset nested lock
d1039 1
a1039 1
     'omp_set_nested_lock' or 'omp_test_nested_lock' before.  In
d1041 1
a1041 1
     'omp_unset_nested_lock'.  If the nesting count drops to zero, the
d1047 1
a1047 1
     _Prototype_:   'void omp_unset_nest_lock(omp_nest_lock_t *lock);'
d1050 2
a1051 2
     _Interface_:   'subroutine omp_unset_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1062 1
a1062 1
2.38 'omp_destroy_nest_lock' - Destroy nested lock
d1071 1
a1071 1
     _Prototype_:   'void omp_destroy_nest_lock(omp_nest_lock_t *);'
d1074 2
a1075 2
     _Interface_:   'subroutine omp_destroy_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1086 1
a1086 1
2.39 'omp_get_wtick' - Get timer precision
d1094 1
a1094 1
     _Prototype_:   'double omp_get_wtick(void);'
d1097 1
a1097 1
     _Interface_:   'double precision function omp_get_wtick()'
d1108 1
a1108 1
2.40 'omp_get_wtime' - Elapsed wall clock time
d1119 1
a1119 1
     _Prototype_:   'double omp_get_wtime(void);'
d1122 1
a1122 1
     _Interface_:   'double precision function omp_get_wtime()'
d1136 1
a1136 1
The environment variables which beginning with 'OMP_' are defined by
d1138 1
a1138 1
beginning with 'GOMP_' are GNU extensions.
d1163 1
a1163 1
3.1 'OMP_CANCELLATION' - Set whether cancellation is activated
d1167 3
a1169 3
     If set to 'TRUE', the cancellation is activated.  If set to 'FALSE'
     or if unset, cancellation is disabled and the 'cancel' construct is
     ignored.
d1180 1
a1180 1
3.2 'OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
d1184 1
a1184 1
     If set to 'TRUE', the OpenMP version number and the values
d1186 1
a1186 1
     'stderr'.  If set to 'VERBOSE', it additionally shows the value of
d1188 1
a1188 1
     or set to 'FALSE', this information will not be shown.
d1196 1
a1196 1
3.3 'OMP_DEFAULT_DEVICE' - Set the device used in target regions
d1200 5
a1204 5
     Set to choose the device which is used in a 'target' region, unless
     the value is overridden by 'omp_set_default_device' or by a
     'device' clause.  The value shall be the nonnegative device number.
     If no device with the given device number exists, the code is
     executed on the host.  If unset, device number 0 will be used.
d1215 1
a1215 1
3.4 'OMP_DYNAMIC' - Dynamic adjustment of threads
d1221 2
a1222 2
     'TRUE' or 'FALSE'.  If undefined, dynamic adjustment is disabled by
     default.
d1233 1
a1233 1
3.5 'OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1250 1
a1250 1
3.6 'OMP_NESTED' - Nested parallel regions
d1256 1
a1256 1
     environment variable shall be 'TRUE' or 'FALSE'.  If undefined,
d1268 1
a1268 1
3.7 'OMP_NUM_THREADS' - Specifies the number of threads to use
d1272 5
a1276 5
     Specifies the default number of threads to use in parallel regions.
     The value of this variable shall be a comma-separated list of
     positive integers; the value specified the number of threads to use
     for the corresponding nested level.  If undefined one thread per
     CPU is used.
d1287 1
a1287 1
3.8 'OMP_PROC_BIND' - Whether theads may be moved between CPUs
d1292 1
a1292 1
     to 'TRUE', OpenMP theads should not be moved; if set to 'FALSE'
d1294 1
a1294 1
     values 'MASTER', 'CLOSE' and 'SPREAD' can be used to specify the
d1296 3
a1298 3
     'MASTER' the worker threads are in the same place partition as the
     master thread.  With 'CLOSE' those are kept close to the master
     thread in contiguous place partitions.  And with 'SPREAD' a sparse
d1301 2
a1302 2
     When undefined, 'OMP_PROC_BIND' defaults to 'TRUE' when
     'OMP_PLACES' or 'GOMP_CPU_AFFINITY' is set and 'FALSE' otherwise.
d1314 1
a1314 1
3.9 'OMP_PLACES' - Specifies on which CPUs the theads should be placed
d1318 3
a1320 3
     The thread placement can be either specified using an abstract name
     or by an explicit list of the places.  The abstract names
     'threads', 'cores' and 'sockets' can be optionally followed by a
d1322 3
a1324 3
     shall be created.  With 'threads' each place corresponds to a
     single hardware thread; 'cores' to a single core with the
     corresponding number of hardware threads; and with 'sockets' the
d1326 1
a1326 1
     be shown by setting the 'OMP_DISPLAY_ENV' environment variable.
d1339 2
a1340 2
     specifies the same places list: '"{0,1,2}, {3,4,6}, {7,8,9},
     {10,11,12}"'; '"{0:3}, {3:3}, {7:3}, {10:3}"'; and '"{0:2}:4:3"'.
d1342 2
a1343 2
     If 'OMP_PLACES' and 'GOMP_CPU_AFFINITY' are unset and
     'OMP_PROC_BIND' is either unset or 'false', threads may be moved
d1356 1
a1356 1
3.10 'OMP_STACKSIZE' - Set default thread stack size
d1361 7
a1367 7
     is suffixed by 'B', 'K', 'M' or 'G', in which case the size is,
     respectively, in bytes, kilobytes, megabytes or gigabytes.  This is
     different from 'pthread_attr_setstacksize' which gets the number of
     bytes as an argument.  If the stack size cannot be set due to
     system constraints, an error is reported and the initial stack size
     is left unchanged.  If undefined, the stack size is system
     dependent.
d1375 1
a1375 1
3.11 'OMP_SCHEDULE' - How threads are scheduled
d1379 5
a1383 5
     Allows to specify 'schedule type' and 'chunk size'.  The value of
     the variable shall have the form: 'type[,chunk]' where 'type' is
     one of 'static', 'dynamic', 'guided' or 'auto' The optional 'chunk'
     size shall be a positive integer.  If undefined, dynamic scheduling
     and a chunk size of 1 is used.
d1395 1
a1395 1
3.12 'OMP_THREAD_LIMIT' - Set the maximum number of threads
d1412 1
a1412 1
3.13 'OMP_WAIT_POLICY' - How waiting threads are handled
d1417 2
a1418 2
     the value is 'PASSIVE', waiting threads should not consume CPU
     power while waiting; while the value is 'ACTIVE' specifies that
d1431 1
a1431 1
3.14 'GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d1439 2
a1440 2
     (M-N:S). CPU numbers are zero based.  For example,
     'GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
d1444 1
a1444 1
     beginning of the list.  'GOMP_CPU_AFFINITY=0' binds all threads to
d1449 10
a1458 10
     language-specific library functions, e.g., 'getenv' in C or
     'GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
     setting of the 'GOMP_CPU_AFFINITY' environment variable.  A defined
     CPU affinity on startup cannot be changed or disabled during the
     runtime of the application.

     If both 'GOMP_CPU_AFFINITY' and 'OMP_PROC_BIND' are set,
     'OMP_PROC_BIND' has a higher precedence.  If neither has been set
     and 'OMP_PROC_BIND' is unset, or when 'OMP_PROC_BIND' is set to
     'FALSE', the host system will handle the assignment of threads to
d1467 1
a1467 1
3.15 'GOMP_DEBUG' - Enable debugging output
d1471 2
a1472 2
     Enable debugging output.  The variable should be set to '0'
     (disabled, also the default if not set), or '1' (enabled).
d1481 1
a1481 1
3.16 'GOMP_STACKSIZE' - Set default thread stack size
d1486 1
a1486 1
     from 'pthread_attr_setstacksize' which gets the number of bytes as
d1503 1
a1503 1
3.17 'GOMP_SPINCOUNT' - Set the busy-wait spin count
d1509 1
a1509 1
     value may be either 'INFINITE', 'INFINITY' to always wait actively
d1512 9
a1520 8
     suffixes acting as multiplication factors: 'k' (kilo, thousand),
     'M' (mega, million), 'G' (giga, billion), or 'T' (tera, trillion).
     If undefined, 0 is used when 'OMP_WAIT_POLICY' is 'PASSIVE',
     300,000 is used when 'OMP_WAIT_POLICY' is undefined and 30 billion
     is used when 'OMP_WAIT_POLICY' is 'ACTIVE'.  If there are more
     OpenMP threads than available CPUs, 1000 and 100 spins are used for
     'OMP_WAIT_POLICY' being 'ACTIVE' or undefined, respectively; unless
     the 'GOMP_SPINCOUNT' is lower or 'OMP_WAIT_POLICY' is 'PASSIVE'.
d1531 2
a1532 2
The following sections present notes on the external ABI as presented by
libgomp.  Only maintainers should need them.
d1592 1
a1592 1
The target should implement the '__sync' builtins.
d1608 1
a1608 1
Expands to the '__sync_synchronize' builtin.
d1624 4
a1627 4
In _most_ cases we can map this directly to '__thread'.  Except that OMP
allows constructors for C++ objects.  We can either refuse to support
this (how often is it used?)  or we can implement something akin to
.ctors.
d1659 2
a1660 2
   It is not clear what to do with bare FOR or SECTION blocks.  The only
thing I can figure is that we do something like:
d1678 2
a1679 2
for the two variables, i.e.  not something you could write directly in
C. Presumably this only makes sense if the "outer" x and y are global
d1692 4
a1695 4
pointer to an array of the type of the variable, indexed by the thread's
TEAM_ID.  The thread stores its final value into the array, and after
the barrier, the master thread iterates over the array to collect the
values.
d1732 3
a1734 3
   The function needs to create the appropriate number of threads and/or
launch them from the dock.  It needs to create the team structure and
assign team ids.
d1739 1
a1739 1
'omp_in_parallel()' state.
d1791 2
a1792 2
also pull it into a local variable if we like, but since its supposed to
remain unchanged, we can also not if we like.
d1794 5
a1798 5
   If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be able
to get away with no work-sharing context at all, since we can simply
perform the arithmetic directly in each thread to divide up the
iterations.  Which would mean that we wouldn't need to call any of these
routines.
d1892 2
a1893 2
"openacc", or "openmp", or both to the keywords field in the bug report,
as appropriate.
d1903 1
a1903 1
     Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
d1931 3
a1933 3
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
d1952 10
a1961 9
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
d1998 2
a1999 2
     infringement under applicable copyright law, except executing it on
     a computer or modifying a private copy.  Propagation includes
d2013 2
a2014 2
     the extent that warranties are provided), that licensees may convey
     the work under this License, and how to view a copy of this
d2022 2
a2023 2
     for making modifications to it.  "Object code" means any non-source
     form of a work.
d2034 4
a2037 4
     Major Component, and (b) serves only to enable use of the work with
     that Major Component, or to implement a Standard Interface for
     which an implementation is available to the public in source code
     form.  A "Major Component", in this context, means a major
d2045 3
a2047 3
     work) run the object code and to modify the work, including scripts
     to control those activities.  However, it does not include the
     work's System Libraries, or general-purpose tools or generally
d2050 4
a2053 4
     Corresponding Source includes interface definition files associated
     with source files for the work, and the source code for shared
     libraries and dynamically linked subprograms that the work is
     specifically designed to require, such as by intimate data
d2070 4
a2073 4
     a covered work is covered by this License only if the output, given
     its content, constitutes a covered work.  This License acknowledges
     your rights of fair use or other equivalent, as provided by
     copyright law.
d2078 8
a2085 8
     sole purpose of having them make modifications exclusively for you,
     or provide you with facilities for running those works, provided
     that you comply with the terms of this License in conveying all
     material for which you do not control copyright.  Those thus making
     or running the covered works for you must do so exclusively on your
     behalf, under your direction and control, on terms that prohibit
     them from making any copies of your copyrighted material outside
     their relationship with you.
d2102 2
a2103 2
     with respect to the covered work, and you disclaim any intention to
     limit operation or modification of the work as a means of
d2173 2
a2174 2
          written offer, valid for at least three years and valid for as
          long as you offer spare parts or customer support for that
d2184 2
a2185 2
       c. Convey individual copies of the object code with a copy of the
          written offer to provide the Corresponding Source.  This
d2191 2
a2192 2
          place (gratis or for a charge), and offer equivalent access to
          the Corresponding Source in the same way through the same
d2196 4
a2199 4
          Corresponding Source may be on a different server (operated by
          you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to the
          object code saying where to find the Corresponding Source.
d2201 2
a2202 2
          remain obligated to ensure that it is available for as long as
          needed to satisfy these requirements.
d2209 1
d2217 2
a2218 2
     incorporation into a dwelling.  In determining whether a product is
     a consumer product, doubtful cases shall be resolved in favor of
d2249 5
a2253 5
     warranty, or updates for a work that has been modified or installed
     by the recipient, or for the User Product in which it has been
     modified or installed.  Access to a network may be denied when the
     modification itself materially and adversely affects the operation
     of the network or violates the rules and protocols for
d2283 2
a2284 2
     holders of that material) supplement the terms of this License with
     terms:
d2294 3
a2296 2
          or requiring that modified versions of such material be marked
          in reasonable ways as different from the original version; or
d2315 5
a2319 4
     contains a further restriction but permits relicensing or conveying
     under this License, you may add to a covered work material governed
     by the terms of that license document, provided that the further
     restriction does not survive such relicensing or conveying.
d2335 2
a2336 2
     under this License (including any patent licenses granted under the
     third paragraph of section 11).
d2340 2
a2341 2
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
d2353 4
a2356 4
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, you do not qualify to receive new licenses
     for the same material under section 10.
d2370 1
a2370 1
  10. Automatic Licensing of Downstream Recipients.
d2384 4
a2387 4
     could give under the previous paragraph, plus a right to possession
     of the Corresponding Source of the work from the predecessor in
     interest, if the predecessor has it or can get it with reasonable
     efforts.
d2391 6
a2396 6
     may not impose a license fee, royalty, or other charge for exercise
     of rights granted under this License, and you may not initiate
     litigation (including a cross-claim or counterclaim in a lawsuit)
     alleging that any patent claim is infringed by making, using,
     selling, offering for sale, or importing the Program or any portion
     of it.
d2398 1
a2398 1
  11. Patents.
d2418 2
a2419 2
     otherwise run, modify and propagate the contents of its contributor
     version.
d2424 3
a2426 3
     patent or covenant not to sue for patent infringement).  To "grant"
     such a patent license to a party means to make such an agreement or
     commitment not to enforce a patent against the party.
d2456 10
a2465 10
     party that is in the business of distributing software, under which
     you make payment to the third party based on the extent of your
     activity of conveying the work, and under which the third party
     grants, to any of the parties who would receive the covered work
     from you, a discriminatory patent license (a) in connection with
     copies of the covered work conveyed by you (or copies made from
     those copies), or (b) primarily for and in connection with specific
     products or compilations that contain the covered work, unless you
     entered into that arrangement, or that patent license was granted,
     prior to 28 March 2007.
d2471 1
a2471 1
  12. No Surrender of Others' Freedom.
d2473 11
a2483 10
     If conditions are imposed on you (whether by court order, agreement
     or otherwise) that contradict the conditions of this License, they
     do not excuse you from the conditions of this License.  If you
     cannot convey a covered work so as to satisfy simultaneously your
     obligations under this License and any other pertinent obligations,
     then as a consequence you may not convey it at all.  For example,
     if you agree to terms that obligate you to collect a royalty for
     further conveying from those to whom you convey the Program, the
     only way you could satisfy both those terms and this License would
     be to refrain entirely from conveying the Program.
d2485 1
a2485 1
  13. Use with the GNU Affero General Public License.
d2496 1
a2496 1
  14. Revised Versions of this License.
d2499 4
a2502 3
     versions of the GNU General Public License from time to time.  Such
     new versions will be similar in spirit to the present version, but
     may differ in detail to address new problems or concerns.
d2508 4
a2511 4
     that numbered version or of any later version published by the Free
     Software Foundation.  If the Program does not specify a version
     number of the GNU General Public License, you may choose any
     version ever published by the Free Software Foundation.
d2523 1
a2523 1
  15. Disclaimer of Warranty.
d2526 1
a2526 1
     APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
d2530 1
a2530 1
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
d2535 1
a2535 1
  16. Limitation of Liability.
d2539 2
a2540 2
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
     DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
d2548 1
a2548 1
  17. Interpretation of Sections 15 and 16.
d2557 1
d2588 1
a2588 1
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
d2597 1
a2597 1
     This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
d2599 1
a2599 1
     under certain conditions; type 'show c' for details.
d2601 1
a2601 1
   The hypothetical commands 'show w' and 'show c' should show the
d2609 1
a2609 1
the GNU GPL, see <http://www.gnu.org/licenses/>.
d2616 1
a2616 1
please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
d2627 1
a2627 1
     <http://fsf.org/>
d2652 2
a2653 2
     of subject matter or whether it is published as a printed book.  We
     recommend this License principally for works whose purpose is
d2659 2
a2660 2
     that contains a notice placed by the copyright holder saying it can
     be distributed under the terms of this License.  Such a notice
d2664 3
a2666 3
     of the public is a licensee, and is addressed as "you".  You accept
     the license if you copy, modify or distribute the work in a way
     requiring permission under copyright law.
d2684 6
a2689 6
     titles are designated, as being those of Invariant Sections, in the
     notice that says that the Document is released under this License.
     If a section does not fit the above definition of Secondary then it
     is not allowed to be designated as Invariant.  The Document may
     contain zero Invariant Sections.  If the Document does not identify
     any Invariant Sections then there are none.
d2700 10
a2709 10
     straightforwardly with generic text editors or (for images composed
     of pixels) generic paint programs or (for drawings) some widely
     available drawing editor, and that is suitable for input to text
     formatters or for automatic translation to a variety of formats
     suitable for input to text formatters.  A copy made in an otherwise
     Transparent file format whose markup, or absence of markup, has
     been arranged to thwart or discourage subsequent modification by
     readers is not Transparent.  An image format is not Transparent if
     used for any substantial amount of text.  A copy that is not
     "Transparent" is called "Opaque".
d2713 8
a2720 8
     SGML or XML using a publicly available DTD, and standard-conforming
     simple HTML, PostScript or PDF designed for human modification.
     Examples of transparent image formats include PNG, XCF and JPG.
     Opaque formats include proprietary formats that can be read and
     edited only by proprietary word processors, SGML or XML for which
     the DTD and/or processing tools are not generally available, and
     the machine-generated HTML, PostScript or PDF produced by some word
     processors for output purposes only.
d2758 2
a2759 2
     distribute a large enough number of copies you must also follow the
     conditions in section 3.
d2773 6
a2778 5
     front cover must present the full title with all words of the title
     equally prominent and visible.  You may add other material on the
     covers in addition.  Copying with changes limited to the covers, as
     long as they preserve the title of the Document and satisfy these
     conditions, can be treated as verbatim copying in other respects.
d2786 12
a2797 11
     numbering more than 100, you must either include a machine-readable
     Transparent copy along with each Opaque copy, or state in or with
     each Opaque copy a computer-network location from which the general
     network-using public has access to download using public-standard
     network protocols a complete Transparent copy of the Document, free
     of added material.  If you use the latter option, you must take
     reasonably prudent steps, when you begin distribution of Opaque
     copies in quantity, to ensure that this Transparent copy will
     remain thus accessible at the stated location until at least one
     year after the last time you distribute an Opaque copy (directly or
     through your agents or retailers) of that edition to the public.
d2800 3
a2802 3
     the Document well before redistributing any large number of copies,
     to give them a chance to provide you with an updated version of the
     Document.
d2808 5
a2812 5
     release the Modified Version under precisely this License, with the
     Modified Version filling the role of the Document, thus licensing
     distribution and modification of the Modified Version to whoever
     possesses a copy of it.  In addition, you must do these things in
     the Modified Version:
d2815 5
a2819 5
          distinct from that of the Document, and from those of previous
          versions (which should, if there were any, be listed in the
          History section of the Document).  You may use the same title
          as a previous version if the original publisher of that
          version gives permission.
d2849 6
a2854 6
          authors, and publisher of the Modified Version as given on the
          Title Page.  If there is no section Entitled "History" in the
          Document, create one stating the title, year, authors, and
          publisher of the Document as given on its Title Page, then add
          an item describing the Modified Version as stated in the
          previous sentence.
d2859 5
a2863 5
          previous versions it was based on.  These may be placed in the
          "History" section.  You may omit a network location for a work
          that was published at least four years before the Document
          itself, or if the original publisher of the version it refers
          to gives permission.
d2866 2
a2867 2
          Preserve the Title of the section, and preserve in the section
          all the substance and tone of each of the contributor
d2870 4
a2873 3
       L. Preserve all the Invariant Sections of the Document, unaltered
          in their text and in their titles.  Section numbers or the
          equivalent are not considered part of the section titles.
d2886 5
a2890 5
     material copied from the Document, you may at your option designate
     some or all of these sections as invariant.  To do this, add their
     titles to the list of Invariant Sections in the Modified Version's
     license notice.  These titles must be distinct from any other
     section titles.
d2899 9
a2907 9
     and a passage of up to 25 words as a Back-Cover Text, to the end of
     the list of Cover Texts in the Modified Version.  Only one passage
     of Front-Cover Text and one of Back-Cover Text may be added by (or
     through arrangements made by) any one entity.  If the Document
     already includes a cover text for the same cover, previously added
     by you or by arrangement made by the same entity you are acting on
     behalf of, you may not add another; but you may replace the old
     one, on explicit permission from the previous publisher that added
     the old one.
d2917 2
a2918 2
     modified versions, provided that you include in the combination all
     of the Invariant Sections of all of the original documents,
d2945 2
a2946 2
     rules of this License for verbatim copying of each of the documents
     in all other respects.
d2950 3
a2952 3
     a copy of this License into the extracted document, and follow this
     License in all other respects regarding verbatim copying of that
     document.
d2957 2
a2958 2
     separate and independent documents or works, in or on a volume of a
     storage or distribution medium, is called an "aggregate" if the
d3003 2
a3004 2
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
d3016 4
a3019 4
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, receipt of a copy of some or all of the
     same material does not give you any rights to use it.
d3021 1
a3021 1
  10. FUTURE REVISIONS OF THIS LICENSE
d3027 1
a3027 1
     <http://www.gnu.org/copyleft/>.
d3034 5
a3038 5
     published (not as a draft) by the Free Software Foundation.  If the
     Document does not specify a version number of this License, you may
     choose any version ever published (not as a draft) by the Free
     Software Foundation.  If the Document specifies that a proxy can
     decide which future versions of this License can be used, that
d3042 1
a3042 1
  11. RELICENSING
d3072 1
d3089 1
a3089 1
Texts, replace the "with...Texts."  line with this:
d3100 3
a3102 3
recommend releasing these examples in parallel under your choice of free
software license, such as the GNU General Public License, to permit
their use in free software.
d3132 2
a3133 2
can greatly alter what fraction of the sales price counts as profit.  If
the price you pay is $50, ten percent of the profit is probably less
d3143 2
a3144 2
ports such as adding a new CPU to the GNU Compiler Collection contribute
more; major new features or packages contribute the most.
d3163 16
a3179 16
* Environment Variable <1>:              OMP_DISPLAY_ENV.       (line 6)
* Environment Variable <2>:              OMP_DEFAULT_DEVICE.    (line 6)
* Environment Variable <3>:              OMP_DYNAMIC.           (line 6)
* Environment Variable <4>:              OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable <5>:              OMP_NESTED.            (line 6)
* Environment Variable <6>:              OMP_NUM_THREADS.       (line 6)
* Environment Variable <7>:              OMP_PROC_BIND.         (line 6)
* Environment Variable <8>:              OMP_PLACES.            (line 6)
* Environment Variable <9>:              OMP_STACKSIZE.         (line 6)
* Environment Variable <10>:             OMP_SCHEDULE.          (line 6)
* Environment Variable <11>:             OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <12>:             OMP_WAIT_POLICY.       (line 6)
* Environment Variable <13>:             GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <14>:             GOMP_DEBUG.            (line 6)
* Environment Variable <15>:             GOMP_STACKSIZE.        (line 6)
* Environment Variable <16>:             GOMP_SPINCOUNT.        (line 6)
d3182 4
a3186 4
* Implementation specific setting <1>:   OMP_NUM_THREADS.       (line 6)
* Implementation specific setting <2>:   OMP_SCHEDULE.          (line 6)
* Implementation specific setting <3>:   GOMP_STACKSIZE.        (line 6)
* Implementation specific setting <4>:   GOMP_SPINCOUNT.        (line 6)
d3192 81
a3272 81
Node: Top2083
Node: Enabling OpenMP3878
Node: Runtime Library Routines4665
Node: omp_get_active_level7652
Node: omp_get_ancestor_thread_num8352
Node: omp_get_cancellation9282
Node: omp_get_default_device10096
Node: omp_get_dynamic10772
Node: omp_get_level11647
Node: omp_get_max_active_levels12267
Node: omp_get_max_threads12966
Node: omp_get_nested13723
Node: omp_get_num_devices14635
Node: omp_get_num_procs15156
Node: omp_get_num_teams15695
Node: omp_get_num_threads16211
Node: omp_get_proc_bind17300
Node: omp_get_schedule18221
Node: omp_get_team_num19167
Node: omp_get_team_size19666
Node: omp_get_thread_limit20626
Node: omp_get_thread_num21245
Node: omp_in_parallel22116
Node: omp_in_final22765
Node: omp_is_initial_device23439
Node: omp_set_default_device24132
Node: omp_set_dynamic24923
Node: omp_set_max_active_levels25809
Node: omp_set_nested26586
Node: omp_set_num_threads27478
Node: omp_set_schedule28346
Node: omp_init_lock29397
Node: omp_set_lock30050
Node: omp_test_lock30905
Node: omp_unset_lock31881
Node: omp_destroy_lock32812
Node: omp_init_nest_lock33489
Node: omp_set_nest_lock34224
Node: omp_test_nest_lock35139
Node: omp_unset_nest_lock36166
Node: omp_destroy_nest_lock37181
Node: omp_get_wtick37932
Node: omp_get_wtime38524
Node: Environment Variables39300
Node: OMP_CANCELLATION40692
Node: OMP_DISPLAY_ENV41225
Node: OMP_DEFAULT_DEVICE41928
Node: OMP_DYNAMIC42708
Node: OMP_MAX_ACTIVE_LEVELS43304
Node: OMP_NESTED43943
Node: OMP_NUM_THREADS44548
Node: OMP_PROC_BIND45236
Node: OMP_PLACES46428
Node: OMP_STACKSIZE48603
Node: OMP_SCHEDULE49427
Node: OMP_THREAD_LIMIT50123
Node: OMP_WAIT_POLICY50723
Node: GOMP_CPU_AFFINITY51415
Node: GOMP_DEBUG53145
Node: GOMP_STACKSIZE53652
Node: GOMP_SPINCOUNT54481
Node: The libgomp ABI55653
Node: Implementing MASTER construct56452
Node: Implementing CRITICAL construct56866
Node: Implementing ATOMIC construct57605
Node: Implementing FLUSH construct58086
Node: Implementing BARRIER construct58357
Node: Implementing THREADPRIVATE construct58626
Node: Implementing PRIVATE clause59279
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses59860
Node: Implementing REDUCTION clause61184
Node: Implementing PARALLEL construct61741
Node: Implementing FOR construct62998
Node: Implementing ORDERED construct64996
Node: Implementing SECTIONS construct65302
Node: Implementing SINGLE construct66068
Node: Reporting Bugs66730
Node: Copying67090
Node: GNU Free Documentation License104637
Node: Funding129760
Node: Library Index132286
@


1.5
log
@merge GCC 5.3.  round 1.  this probably won't work  :-)

libsanitizer likely needs to be re-ported, though i've done most of
the updating we'll need i think already.
@
text
@d2 1
a2 1
/space/rguenther/gcc-5.3.0/gcc-5.3.0/libgomp/libgomp.texi.
@


1.4
log
@merge GCC 4.8.5 (final round)
@
text
@d2 1
a2 1
/space/rguenther/gcc-4.8.5/gcc-4.8.5/libgomp/libgomp.texi.
d4 1
a4 1
Copyright (C) 2006-2013 Free Software Foundation, Inc.
d26 1
a26 1
* libgomp: (libgomp).                    GNU OpenMP runtime library
d29 4
a32 2
   This manual documents the GNU implementation of the OpenMP API for
multi-platform shared-memory parallel programming in C/C++ and Fortran.
d37 1
a37 1
   Copyright (C) 2006-2013 Free Software Foundation, Inc.
d63 3
a65 2
This manual documents the usage of libgomp, the GNU implementation of
the OpenMP (http://www.openmp.org) Application Programming Interface
d67 8
a74 1
and Fortran.
d84 2
a85 1
* Reporting Bugs::             How to report bugs in GNU OpenMP.
d101 7
a107 6
compile-time flag `-fopenmp' must be specified. This enables the OpenMP
directive `#pragma omp' in C/C++ and `!$omp' directives in free form,
`c$omp', `*$omp' and `!$omp' directives in fixed form, `!$' conditional
compilation sentinels in free form and `c$', `*$' and `!$' sentinels in
fixed form, for Fortran. The flag also arranges for automatic linking
of the OpenMP runtime library (*note Runtime Library Routines::).
d111 1
a111 1
(http://www.openmp.org) manual, version 3.1.
d119 2
a120 2
The runtime routines described here are defined by section 3 of the
OpenMP specifications in version 3.1. The routines are structured in
d123 1
a123 1
   Control threads, processors and the parallel environment.
d125 2
a126 1
* Menu:
d130 2
d137 1
d139 1
d141 1
d143 1
d149 2
d157 1
a157 3
   Initialize, set, test, unset and destroy simple and nested locks.

* Menu:
d170 1
a170 3
   Portable, thread-based, wall clock timer.

* Menu:
d196 1
a196 2
     OpenMP specifications v3.1 (http://www.openmp.org/), section
     3.2.19.
d199 1
a199 1
File: libgomp.info,  Node: omp_get_ancestor_thread_num,  Next: omp_get_dynamic,  Prev: omp_get_active_level,  Up: Runtime Library Routines
d206 1
a206 1
     given nesting level of the current thread. For values of LEVEL
d222 1
a222 2
     OpenMP specifications v3.1 (http://www.openmp.org/), section
     3.2.17.
d225 34
a258 1
File: libgomp.info,  Node: omp_get_dynamic,  Next: omp_get_level,  Prev: omp_get_ancestor_thread_num,  Up: Runtime Library Routines
d260 13
a272 1
2.3 `omp_get_dynamic' - Dynamic teams setting
d281 2
a282 2
     `omp_set_dynamic'. If undefined, dynamic adjustment is disabled by
     default.
d294 1
a294 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.8.
d299 1
a299 1
2.4 `omp_get_level' - Obtain the current nesting level
d316 1
a316 2
     OpenMP specifications v3.1 (http://www.openmp.org/), section
     3.2.16.
d321 1
a321 1
2.5 `omp_get_max_active_levels' - Maximum number of active regions
d338 1
a338 2
     OpenMP specifications v3.1 (http://www.openmp.org/), section
     3.2.15.
d343 1
a343 1
2.6 `omp_get_max_threads' - Maximum number of threads of parallel region
d361 1
a361 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.3.
d364 1
a364 1
File: libgomp.info,  Node: omp_get_nested,  Next: omp_get_num_procs,  Prev: omp_get_max_threads,  Up: Runtime Library Routines
d366 1
a366 1
2.7 `omp_get_nested' - Nested parallel regions
d371 1
a371 1
     enabled, `false' otherwise. Here, `true' and `false' represent
d376 1
a376 1
     `omp_set_nested'. If undefined, nested parallel regions are
d389 1
a389 2
     OpenMP specifications v3.1 (http://www.openmp.org/), section
     3.2.10.
d392 1
a392 1
File: libgomp.info,  Node: omp_get_num_procs,  Next: omp_get_num_threads,  Prev: omp_get_nested,  Up: Runtime Library Routines
d394 1
a394 1
2.8 `omp_get_num_procs' - Number of processors online
d398 19
a416 1
     Returns the number of processors online.
d425 1
a425 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.5.
d428 1
a428 1
File: libgomp.info,  Node: omp_get_num_threads,  Next: omp_get_schedule,  Prev: omp_get_num_procs,  Up: Runtime Library Routines
d430 2
a431 2
2.9 `omp_get_num_threads' - Size of the active team
===================================================
d434 20
a453 2
     Returns the number of threads in the current team. In a sequential
     section of the program `omp_get_num_threads' returns 1.
d456 1
a456 1
     `OMP_NUM_THREADS' environment variable. At runtime, the size of
d458 3
a460 3
     by `omp_set_num_threads'. If none of the above were used to define
     a specific value and `OMP_DYNAMIC' is disabled, one thread per CPU
     online is used.
d473 28
a500 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.2.
d503 1
a503 1
File: libgomp.info,  Node: omp_get_schedule,  Next: omp_get_team_size,  Prev: omp_get_num_threads,  Up: Runtime Library Routines
d505 1
a505 1
2.10 `omp_get_schedule' - Obtain the runtime scheduling method
d509 1
a509 1
     Obtain the runtime scheduling method. The KIND argument will be
d511 1
a511 1
     `omp_sched_guided' or `omp_sched_auto'. The second argument,
d515 2
a516 1
     _Prototype_:  `void omp_schedule(omp_sched_t *kind, int *modifier);'
d519 1
a519 1
     _Interface_:  `subroutine omp_schedule(kind, modifier)'
d527 19
a545 2
     OpenMP specifications v3.1 (http://www.openmp.org/), section
     3.2.12.
d548 1
a548 1
File: libgomp.info,  Node: omp_get_team_size,  Next: omp_get_thread_limit,  Prev: omp_get_schedule,  Up: Runtime Library Routines
d550 1
a550 1
2.11 `omp_get_team_size' - Number of threads in a team
d555 1
a555 1
     which either the current thread or its ancestor belongs. For
d572 1
a572 2
     OpenMP specifications v3.1 (http://www.openmp.org/), section
     3.2.18.
d577 1
a577 1
2.12 `omp_get_thread_limit' - Maximum number of threads
d593 1
a593 2
     OpenMP specifications v3.1 (http://www.openmp.org/), section
     3.2.13.
d598 1
a598 1
2.13 `omp_get_thread_num' - Current thread ID
d604 3
a606 3
     always returns 0. In parallel regions the return value varies from
     0 to `omp_get_num_threads'-1 inclusive. The return value of the
     master thread of a team is always 0.
d618 1
a618 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.4.
d623 1
a623 1
2.14 `omp_in_parallel' - Whether a parallel region is active
d628 1
a628 1
     `false' otherwise. Here, `true' and `false' represent their
d638 1
a638 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.6.
d641 1
a641 1
File: libgomp.info,  Node: omp_in_final,  Next: omp_set_dynamic,  Prev: omp_in_parallel,  Up: Runtime Library Routines
d643 1
a643 1
2.15 `omp_in_final' - Whether in final or included task region
d648 1
a648 1
     included task region, `false' otherwise. Here, `true' and `false'
d658 44
a701 2
     OpenMP specifications v3.1 (http://www.openmp.org/), section
     3.2.20.
d704 1
a704 1
File: libgomp.info,  Node: omp_set_dynamic,  Next: omp_set_max_active_levels,  Prev: omp_in_final,  Up: Runtime Library Routines
d706 1
a706 1
2.16 `omp_set_dynamic' - Enable/disable dynamic teams
d711 1
a711 1
     within a team. The function takes the language-specific equivalent
d716 1
a716 1
     _Prototype_:  `void omp_set_dynamic(int set);'
d719 2
a720 2
     _Interface_:  `subroutine omp_set_dynamic(set)'
                   `logical, intent(in) :: set'
d726 1
a726 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.7.
d731 1
a731 1
2.17 `omp_set_max_active_levels' - Limits the number of active parallel regions
d749 1
a749 2
     OpenMP specifications v3.1 (http://www.openmp.org/), section
     3.2.14.
d754 1
a754 1
2.18 `omp_set_nested' - Enable/disable nested parallel regions
d759 1
a759 1
     members are allowed to create new teams. The function takes the
d764 1
a764 1
     _Prototype_:  `void omp_set_nested(int set);'
d767 2
a768 2
     _Interface_:  `subroutine omp_set_nested(set)'
                   `logical, intent(in) :: set'
d774 1
a774 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.9.
d779 1
a779 1
2.19 `omp_set_num_threads' - Set upper team size limit
d788 1
a788 1
     _Prototype_:  `void omp_set_num_threads(int n);'
d791 2
a792 2
     _Interface_:  `subroutine omp_set_num_threads(n)'
                   `integer, intent(in) :: n'
d799 1
a799 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.1.
d804 1
a804 1
2.20 `omp_set_schedule' - Set the runtime scheduling method
d808 1
a808 1
     Sets the runtime scheduling method. The KIND argument can have the
d810 1
a810 1
     or `omp_sched_auto'. Except for `omp_sched_auto', the chunk size
d816 2
a817 2
     _Prototype_:  `void omp_set_schedule(omp_sched_t *kind, int
                   *modifier);'
d828 1
a828 2
     OpenMP specifications v3.1 (http://www.openmp.org/), section
     3.2.11.
d833 1
a833 1
2.21 `omp_init_lock' - Initialize simple lock
d844 2
a845 2
     _Interface_:  `subroutine omp_init_lock(lock)'
                   `integer(omp_lock_kind), intent(out) :: lock'
d851 1
a851 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.1.
d856 1
a856 1
2.22 `omp_set_lock' - Wait for and set simple lock
d861 2
a862 2
     initialized by `omp_init_lock'. The calling thread is blocked
     until the lock is available. If the lock is already held by the
d869 2
a870 2
     _Interface_:  `subroutine omp_set_lock(lock)'
                   `integer(omp_lock_kind), intent(inout) :: lock'
d877 1
a877 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.3.
d882 1
a882 1
2.23 `omp_test_lock' - Test and set simple lock if available
d887 3
a889 3
     initialized by `omp_init_lock'. Contrary to `omp_set_lock',
     `omp_test_lock' does not block if the lock is not available. This
     function returns `true' upon success, `false' otherwise. Here,
d896 2
a897 2
     _Interface_:  `logical function omp_test_lock(lock)'
                   `integer(omp_lock_kind), intent(inout) :: lock'
d903 1
a903 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.5.
d908 1
a908 1
2.24 `omp_unset_lock' - Unset simple lock
d913 4
a916 4
     `omp_set_lock' or `omp_test_lock' before. In addition, the lock
     must be held by the thread calling `omp_unset_lock'. Then, the
     lock becomes unlocked. If one or more threads attempted to set the
     lock before, one of them is chosen to, again, set the lock to
d923 2
a924 2
     _Interface_:  `subroutine omp_unset_lock(lock)'
                   `integer(omp_lock_kind), intent(inout) :: lock'
d930 1
a930 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.4.
d935 1
a935 1
2.25 `omp_destroy_lock' - Destroy simple lock
d939 1
a939 1
     Destroy a simple lock. In order to be destroyed, a simple lock
d946 2
a947 2
     _Interface_:  `subroutine omp_destroy_lock(lock)'
                   `integer(omp_lock_kind), intent(inout) :: lock'
d953 1
a953 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.2.
d958 1
a958 1
2.26 `omp_init_nest_lock' - Initialize nested lock
d969 2
a970 2
     _Interface_:  `subroutine omp_init_nest_lock(lock)'
                   `integer(omp_nest_lock_kind), intent(out) :: lock'
d976 1
a976 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.1.
d981 1
a981 1
2.27 `omp_set_nest_lock' - Wait for and set nested lock
d986 4
a989 3
     initialized by `omp_init_nest_lock'. The calling thread is blocked
     until the lock is available. If the lock is already held by the
     current thread, the nesting count for the lock is incremented.
d995 2
a996 2
     _Interface_:  `subroutine omp_set_nest_lock(lock)'
                   `integer(omp_nest_lock_kind), intent(inout) :: lock'
d1002 1
a1002 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.3.
d1007 1
a1007 1
2.28 `omp_test_nest_lock' - Test and set nested lock if available
d1012 1
a1012 1
     initialized by `omp_init_nest_lock'. Contrary to
d1015 1
a1015 1
     thread, the new nesting count is returned. Otherwise, the return
d1022 2
a1023 2
     _Interface_:  `logical function omp_test_nest_lock(lock)'
                   `integer(omp_nest_lock_kind), intent(inout) :: lock'
d1029 1
a1029 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.5.
d1034 1
a1034 1
2.29 `omp_unset_nest_lock' - Unset nested lock
d1039 1
a1039 1
     `omp_set_nested_lock' or `omp_test_nested_lock' before. In
d1041 2
a1042 2
     `omp_unset_nested_lock'. If the nesting count drops to zero, the
     lock becomes unlocked. If one ore more threads attempted to set
d1050 2
a1051 2
     _Interface_:  `subroutine omp_unset_nest_lock(lock)'
                   `integer(omp_nest_lock_kind), intent(inout) :: lock'
d1057 1
a1057 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.4.
d1062 1
a1062 1
2.30 `omp_destroy_nest_lock' - Destroy nested lock
d1066 1
a1066 1
     Destroy a nested lock. In order to be destroyed, a nested lock
d1074 2
a1075 2
     _Interface_:  `subroutine omp_destroy_nest_lock(lock)'
                   `integer(omp_nest_lock_kind), intent(inout) :: lock'
d1081 1
a1081 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.2.
d1086 1
a1086 1
2.31 `omp_get_wtick' - Get timer precision
d1103 1
a1103 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.4.2.
d1108 1
a1108 1
2.32 `omp_get_wtime' - Elapsed wall clock time
d1112 1
a1112 1
     Elapsed wall clock time in seconds. The time is measured per
d1128 1
a1128 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.4.1.
d1136 3
a1138 5
The variables `OMP_DYNAMIC', `OMP_MAX_ACTIVE_LEVELS', `OMP_NESTED',
`OMP_NUM_THREADS', `OMP_SCHEDULE', `OMP_STACKSIZE',`OMP_THREAD_LIMIT'
and `OMP_WAIT_POLICY' are defined by section 4 of the OpenMP
specifications in version 3.1, while `GOMP_CPU_AFFINITY' and
`GOMP_STACKSIZE' are GNU extensions.
d1142 3
d1149 2
a1154 1
* OMP_PROC_BIND::         Whether theads may be moved between CPUs
d1156 1
d1158 1
d1161 12
a1172 1
File: libgomp.info,  Node: OMP_DYNAMIC,  Next: OMP_MAX_ACTIVE_LEVELS,  Up: Environment Variables
d1174 42
a1215 1
3.1 `OMP_DYNAMIC' - Dynamic adjustment of threads
d1220 3
a1222 3
     within a team. The value of this environment variable shall be
     `TRUE' or `FALSE'. If undefined, dynamic adjustment is disabled by
     default.
d1228 1
a1228 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 4.3
d1233 1
a1233 1
3.2 `OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1238 1
a1238 1
     parallel regions. The value of this variable shall be a positive
d1245 1
a1245 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 4.8
d1250 1
a1250 1
3.3 `OMP_NESTED' - Nested parallel regions
d1255 2
a1256 2
     members are allowed to create new teams. The value of this
     environment variable shall be `TRUE' or `FALSE'. If undefined,
d1263 1
a1263 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 4.5
d1266 1
a1266 1
File: libgomp.info,  Node: OMP_NUM_THREADS,  Next: OMP_STACKSIZE,  Prev: OMP_NESTED,  Up: Environment Variables
d1268 1
a1268 1
3.4 `OMP_NUM_THREADS' - Specifies the number of threads to use
d1273 1
a1273 1
     regions. The value of this variable shall be a comma-separated
d1275 1
a1275 1
     threads to use for the corresponding nested level. If undefined
d1282 1
a1282 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 4.2
d1285 28
a1312 1
File: libgomp.info,  Node: OMP_SCHEDULE,  Next: OMP_THREAD_LIMIT,  Prev: OMP_STACKSIZE,  Up: Environment Variables
d1314 2
a1315 2
3.5 `OMP_SCHEDULE' - How threads are scheduled
==============================================
d1318 27
a1344 5
     Allows to specify `schedule type' and `chunk size'.  The value of
     the variable shall have the form: `type[,chunk]' where `type' is
     one of `static', `dynamic', `guided' or `auto' The optional
     `chunk' size shall be a positive integer. If undefined, dynamic
     scheduling and a chunk size of 1 is used.
d1347 2
a1348 1
     *note omp_set_schedule::
d1351 1
a1351 2
     OpenMP specifications v3.1 (http://www.openmp.org/), sections
     2.5.1 and 4.1
d1354 1
a1354 1
File: libgomp.info,  Node: OMP_STACKSIZE,  Next: OMP_SCHEDULE,  Prev: OMP_NUM_THREADS,  Up: Environment Variables
d1356 2
a1357 2
3.6 `OMP_STACKSIZE' - Set default thread stack size
===================================================
d1362 6
a1367 6
     respectively, in bytes, kilobytes, megabytes or gigabytes. This is
     different from `pthread_attr_setstacksize' which gets the number
     of bytes as an argument. If the stack size cannot be set due to
     system constraints, an error is reported and the initial stack
     size is left unchanged. If undefined, the stack size is system
     dependent.
d1370 1
a1370 1
     OpenMP specifications v3.1 (http://www.openmp.org/), sections 4.6
d1373 1
a1373 1
File: libgomp.info,  Node: OMP_THREAD_LIMIT,  Next: OMP_WAIT_POLICY,  Prev: OMP_SCHEDULE,  Up: Environment Variables
d1375 2
a1376 2
3.7 `OMP_THREAD_LIMIT' - Set the maximum number of threads
==========================================================
d1379 5
a1383 3
     Specifies the number of threads to use for the whole program. The
     value of this variable shall be a positive integer. If undefined,
     the number of threads is not limited.
d1386 1
a1386 1
     *note OMP_NUM_THREADS:: *note omp_get_thread_limit::
d1389 2
a1390 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 4.9
d1393 1
a1393 1
File: libgomp.info,  Node: OMP_WAIT_POLICY,  Next: OMP_PROC_BIND,  Prev: OMP_THREAD_LIMIT,  Up: Environment Variables
d1395 2
a1396 2
3.8 `OMP_WAIT_POLICY' - How waiting threads are handled
=======================================================
d1399 6
a1404 4
     Specifies whether waiting threads should be active or passive. If
     the value is `PASSIVE', waiting threads should not consume CPU
     power while waiting; while the value is `ACTIVE' specifies that
     they should.
d1407 1
a1407 1
     OpenMP specifications v3.1 (http://www.openmp.org/), sections 4.7
d1410 1
a1410 1
File: libgomp.info,  Node: OMP_PROC_BIND,  Next: GOMP_CPU_AFFINITY,  Prev: OMP_WAIT_POLICY,  Up: Environment Variables
d1412 2
a1413 2
3.9 `OMP_PROC_BIND' - Whether theads may be moved between CPUs
==============================================================
d1416 5
a1420 3
     Specifies whether threads may be moved between processors. If set
     to `true', OpenMP theads should not be moved, if set to `false'
     they may be moved.
d1423 1
a1423 1
     *note GOMP_CPU_AFFINITY::
d1426 1
a1426 1
     OpenMP specifications v3.1 (http://www.openmp.org/), sections 4.4
d1429 1
a1429 1
File: libgomp.info,  Node: GOMP_CPU_AFFINITY,  Next: GOMP_STACKSIZE,  Prev: OMP_PROC_BIND,  Up: Environment Variables
d1431 1
a1431 1
3.10 `GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d1435 2
a1436 2
     Binds threads to specific CPUs. The variable should contain a
     space-separated or comma-separated list of CPUs. This list may
d1439 1
a1439 1
     (M-N:S).  CPU numbers are zero based. For example,
d1447 2
a1448 2
     There is no GNU OpenMP library routine to determine whether a CPU
     affinity specification is in effect. As a workaround,
d1451 3
a1453 3
     setting of the `GOMP_CPU_AFFINITY' environment variable. A defined
     CPU affinity on startup cannot be changed or disabled during the
     runtime of the application.
d1455 5
a1459 2
     If this environment variable is omitted, the host system will
     handle the assignment of threads to CPUs.
d1462 15
a1476 1
     *note OMP_PROC_BIND::
d1479 1
a1479 1
File: libgomp.info,  Node: GOMP_STACKSIZE,  Prev: GOMP_CPU_AFFINITY,  Up: Environment Variables
d1481 1
a1481 1
3.11 `GOMP_STACKSIZE' - Set default thread stack size
d1485 1
a1485 1
     Set the default thread stack size in kilobytes. This is different
d1487 1
a1487 1
     an argument. If the stack size cannot be set due to system
d1489 1
a1489 1
     left unchanged. If undefined, the stack size is system dependent.
d1501 25
d1890 4
a1893 3
Bugs in the GNU OpenMP implementation should be reported via bugzilla
(http://gcc.gnu.org/bugzilla/).  For all cases, please add "openmp" to
the keywords field in the bug report.
d3163 6
a3168 6
* Environment Variable <1>:              GOMP_STACKSIZE.        (line 6)
* Environment Variable <2>:              GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <3>:              OMP_PROC_BIND.         (line 6)
* Environment Variable <4>:              OMP_WAIT_POLICY.       (line 6)
* Environment Variable <5>:              OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <6>:              OMP_STACKSIZE.         (line 6)
d3170 10
a3179 4
* Environment Variable <8>:              OMP_NUM_THREADS.       (line 6)
* Environment Variable <9>:              OMP_NESTED.            (line 6)
* Environment Variable <10>:             OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable:                  OMP_DYNAMIC.           (line 6)
d3182 4
a3185 3
* Implementation specific setting <1>:   GOMP_STACKSIZE.        (line 6)
* Implementation specific setting <2>:   OMP_SCHEDULE.          (line 6)
* Implementation specific setting <3>:   OMP_NUM_THREADS.       (line 6)
d3192 81
a3272 67
Node: Top2039
Node: Enabling OpenMP3233
Node: Runtime Library Routines4018
Node: omp_get_active_level6466
Node: omp_get_ancestor_thread_num7170
Node: omp_get_dynamic8097
Node: omp_get_level8975
Node: omp_get_max_active_levels9599
Node: omp_get_max_threads10302
Node: omp_get_nested11058
Node: omp_get_num_procs11970
Node: omp_get_num_threads12488
Node: omp_get_schedule13570
Node: omp_get_team_size14491
Node: omp_get_thread_limit15453
Node: omp_get_thread_num16076
Node: omp_in_parallel16944
Node: omp_in_final17591
Node: omp_set_dynamic18262
Node: omp_set_max_active_levels19099
Node: omp_set_nested19879
Node: omp_set_num_threads20758
Node: omp_set_schedule21594
Node: omp_init_lock22666
Node: omp_set_lock23317
Node: omp_test_lock24168
Node: omp_unset_lock25139
Node: omp_destroy_lock26065
Node: omp_init_nest_lock26739
Node: omp_set_nest_lock27472
Node: omp_test_nest_lock28383
Node: omp_unset_nest_lock29412
Node: omp_destroy_nest_lock30422
Node: omp_get_wtick31170
Node: omp_get_wtime31761
Node: Environment Variables32535
Node: OMP_DYNAMIC33663
Node: OMP_MAX_ACTIVE_LEVELS34231
Node: OMP_NESTED34870
Node: OMP_NUM_THREADS35474
Node: OMP_SCHEDULE36162
Node: OMP_STACKSIZE36856
Node: OMP_THREAD_LIMIT37682
Node: OMP_WAIT_POLICY38277
Node: OMP_PROC_BIND38838
Node: GOMP_CPU_AFFINITY39396
Node: GOMP_STACKSIZE40937
Node: The libgomp ABI41747
Node: Implementing MASTER construct42546
Node: Implementing CRITICAL construct42960
Node: Implementing ATOMIC construct43699
Node: Implementing FLUSH construct44180
Node: Implementing BARRIER construct44451
Node: Implementing THREADPRIVATE construct44720
Node: Implementing PRIVATE clause45372
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses45953
Node: Implementing REDUCTION clause47277
Node: Implementing PARALLEL construct47834
Node: Implementing FOR construct49091
Node: Implementing ORDERED construct51089
Node: Implementing SECTIONS construct51395
Node: Implementing SINGLE construct52161
Node: Reporting Bugs52823
Node: Copying53133
Node: GNU Free Documentation License90698
Node: Funding115840
Node: Library Index118365
@


1.3
log
@Resolve conflicts
@
text
@d2 1
a2 1
/space/rguenther/gcc-4.8.3/gcc-4.8.3/libgomp/libgomp.texi.
@


1.3.2.1
log
@Apply patch (requested by mrg in ticket #1005):
Update gcc to 4.8.5.
@
text
@d2 1
a2 1
/space/rguenther/gcc-4.8.5/gcc-4.8.5/libgomp/libgomp.texi.
d2828 94
@


1.2
log
@merge gcc 4.8.2 r206687 (part 1).
@
text
@d2 1
a2 1
/space/rguenther/gcc-4.5.3/gcc-4.5.3/libgomp/libgomp.texi.
d4 1
a4 1
Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
d7 1
a7 1
under the terms of the GNU Free Documentation License, Version 1.2 or
d35 1
a35 1
   Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
d38 1
a38 1
under the terms of the GNU Free Documentation License, Version 1.2 or
d81 1
a81 1
* Index::                      Index of this documentation.
d99 1
a99 1
(http://www.openmp.org) manual, version 3.0.
d108 1
a108 1
OpenMP specifications in version 3.0. The routines are structured in
d119 2
a120 2
* omp_get_max_active_levels::   Maximal number of active regions
* omp_get_max_threads::         Maximal number of threads of parallel region
d126 1
a126 1
* omp_get_thread_limit::        Maximal number of threads
d129 1
d169 1
a169 1
     _Prototype_:  `int omp_get_active_level();'
d172 1
a172 1
     _Interface_:  `integer omp_get_active_level()'
d179 1
a179 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section
d198 1
a198 1
     _Interface_:  `integer omp_ancestor_thread_num(level)'
d206 1
a206 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section
d225 1
a225 1
     _Prototype_:  `int omp_get_dynamic();'
d234 1
a234 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 3.2.8.
d247 1
a247 1
     _Prototype_:  `int omp_get level();'
d250 1
a250 1
     _Interface_:  `integer omp_level()'
d256 1
a256 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section
d262 1
a262 1
2.5 `omp_set_max_active_levels' - Maximal number of active regions
d266 2
a267 2
     This function obtains the maximally allowed number of nested,
     active parallel regions.
d270 1
a270 1
     _Prototype_:  `int omp_get_max_active_levels();'
d273 1
a273 1
     _Interface_:  `int omp_get_max_active_levels()'
d279 2
a280 2
     OpenMP specifications v3.0 (http://www.openmp.org/), section
     3.2.14.
d285 1
a285 1
2.6 `omp_get_max_threads' - Maximal number of threads of parallel region
d289 1
a289 1
     Return the maximal number of threads used for the current parallel
d293 1
a293 1
     _Prototype_:  `int omp_get_max_threads();'
d303 1
a303 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 3.2.3.
d322 1
a322 1
     _Prototype_:  `int omp_get_nested();'
d325 1
a325 1
     _Interface_:  `integer function omp_get_nested()'
d331 1
a331 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section
d344 1
a344 1
     _Prototype_:  `int omp_get_num_procs();'
d350 1
a350 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 3.2.5.
d359 2
a360 2
     The number of threads in the current team. In a sequential section
     of the program `omp_get_num_threads' returns 1.
d370 1
a370 1
     _Prototype_:  `int omp_get_num_threads();'
d380 1
a380 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 3.2.2.
d389 1
a389 1
     Obtain runtime the scheduling method. The KIND argument will be
d391 2
a392 2
     `opm_sched_guided' or `auto'. The second argument, MODIFIER, is
     set to the chunk size.
d395 1
a395 1
     _Prototype_:  `omp_schedule(omp_sched_t * kind, int *modifier);'
d406 1
a406 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section
d418 3
a420 3
     values of LEVEL outside zero to `omp_get_level' -1 is returned; if
     LEVEL is zero 1 is returned and for `omp_get_level' the result is
     identical to `omp_get_num_threads'.
d423 1
a423 1
     _Prototype_:  `int omp_get_time_size(int level);'
d434 1
a434 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section
d440 1
a440 1
2.12 `omp_get_thread_limit' - Maximal number of threads
d444 1
a444 1
     Return the maximal number of threads of the program.
d447 1
a447 1
     _Prototype_:  `int omp_get_thread_limit();'
d456 1
a456 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section
d466 5
a470 5
     Unique thread identification number within the current team.  In a
     sequential parts of the program, `omp_get_thread_num' always
     returns 0. In parallel regions the return value varies from 0 to
     `omp_get_num_threads'-1 inclusive. The return value of the master
     thread of a team is always 0.
d473 1
a473 1
     _Prototype_:  `int omp_get_thread_num();'
d482 1
a482 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 3.2.4.
d485 1
a485 1
File: libgomp.info,  Node: omp_in_parallel,  Next: omp_set_dynamic,  Prev: omp_get_thread_num,  Up: Runtime Library Routines
d496 1
a496 1
     _Prototype_:  `int omp_in_parallel();'
d502 1
a502 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 3.2.6.
d505 12
a516 1
File: libgomp.info,  Node: omp_set_dynamic,  Next: omp_set_max_active_levels,  Prev: omp_in_parallel,  Up: Runtime Library Routines
d518 11
a528 1
2.15 `omp_set_dynamic' - Enable/disable dynamic teams
d538 1
a538 1
     _Prototype_:  `void omp_set_dynamic(int);'
d542 1
a542 1
                   `integer, intent(in) :: set'
d548 1
a548 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 3.2.7.
d553 1
a553 1
2.16 `omp_set_max_active_levels' - Limits the number of active parallel regions
d557 2
a558 2
     This function limits the maximally allowed number of nested,
     active parallel regions.
d561 1
a561 1
     _Prototype_:  `omp_set_max_active_levels(int max_levels);'
d564 1
a564 1
     _Interface_:  `omp_max_active_levels(max_levels)'
d571 1
a571 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section
d577 1
a577 1
2.17 `omp_set_nested' - Enable/disable nested parallel regions
d587 1
a587 1
     _Prototype_:  `void omp_set_dynamic(int);'
d590 2
a591 2
     _Interface_:  `subroutine omp_set_dynamic(set)'
                   `integer, intent(in) :: set'
d597 1
a597 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 3.2.9.
d602 1
a602 1
2.18 `omp_set_num_threads' - Set upper team size limit
d611 1
a611 1
     _Prototype_:  `void omp_set_num_threads(int);'
d614 2
a615 2
     _Interface_:  `subroutine omp_set_num_threads(set)'
                   `integer, intent(in) :: set'
d622 1
a622 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 3.2.1.
d627 1
a627 1
2.19 `omp_set_schedule' - Set the runtime scheduling method
d632 1
a632 1
     value `omp_sched_static', `omp_sched_dynamic', `opm_sched_guided'
d634 1
a634 1
     is set to the value of MODIFIER if positive or to the default
d639 2
a640 1
     _Prototype_:  `int omp_schedule(omp_sched_t * kind, int *modifier);'
d643 1
a643 1
     _Interface_:  `subroutine omp_schedule(kind, modifier)'
d651 1
a651 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section
d657 1
a657 1
2.20 `omp_init_lock' - Initialize simple lock
d661 1
a661 1
     Initialize a simple lock. After initialization, the lock is in an
d675 1
a675 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 3.3.1.
d680 1
a680 1
2.21 `omp_set_lock' - Wait for and set simple lock
d694 1
a694 1
                   `integer(omp_lock_kind), intent(out) :: lock'
d701 1
a701 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 3.3.3.
d706 1
a706 1
2.22 `omp_test_lock' - Test and set simple lock if available
d720 2
a721 3
     _Interface_:  `subroutine omp_test_lock(lock)'
                   `logical(omp_logical_kind) :: omp_test_lock'
                   `integer(omp_lock_kind), intent(out) :: lock'
d727 1
a727 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 3.3.5.
d732 1
a732 1
2.23 `omp_unset_lock' - Unset simple lock
d739 2
a740 2
     lock becomes unlocked. If one ore more threads attempted to set
     the lock before, one of them is chosen to, again, set the lock for
d748 1
a748 1
                   `integer(omp_lock_kind), intent(out) :: lock'
d754 1
a754 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 3.3.4.
d759 1
a759 1
2.24 `omp_destroy_lock' - Destroy simple lock
d767 1
a767 1
     _Prototype_:  `void omp_destroy_lock(omp_lock_t *);'
d777 1
a777 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 3.3.2.
d782 1
a782 1
2.25 `omp_init_nest_lock' - Initialize nested lock
d786 1
a786 1
     Initialize a nested lock. After initialization, the lock is in an
d800 1
a800 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 3.3.1.
d805 1
a805 1
2.26 `omp_set_nest_lock' - Wait for and set simple lock
d812 1
a812 1
     current thread, the nesting count for the lock in incremented.
d819 1
a819 1
                   `integer(omp_nest_lock_kind), intent(out) :: lock'
d825 1
a825 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 3.3.3.
d830 1
a830 1
2.27 `omp_test_nest_lock' - Test and set nested lock if available
d845 1
a845 2
     _Interface_:  `integer function omp_test_nest_lock(lock)'
                   `integer(omp_integer_kind) :: omp_test_nest_lock'
d852 1
a852 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 3.3.5.
d857 1
a857 1
2.28 `omp_unset_nest_lock' - Unset nested lock
d866 1
a866 1
     the lock before, one of them is chosen to, again, set the lock for
d874 1
a874 1
                   `integer(omp_nest_lock_kind), intent(out) :: lock'
d880 1
a880 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 3.3.4.
d885 1
a885 1
2.29 `omp_destroy_nest_lock' - Destroy nested lock
d904 1
a904 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 3.3.2.
d909 1
a909 1
2.30 `omp_get_wtick' - Get timer precision
d917 1
a917 1
     _Prototype_:  `double omp_get_wtick();'
d926 1
a926 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 3.4.2.
d931 1
a931 1
2.31 `omp_get_wtime' - Elapsed wall clock time
d936 4
a939 4
     thread, no guarantee can bee made that two distinct threads
     measure the same time.  Time is measured from some "time in the
     past". On POSIX compliant systems the seconds since the Epoch
     (00:00:00 UTC, January 1, 1970) are returned.
d942 1
a942 1
     _Prototype_:  `double omp_get_wtime();'
d951 1
a951 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 3.4.1.
d962 1
a962 1
specifications in version 3.0, while `GOMP_CPU_AFFINITY' and
d968 1
a968 1
* OMP_MAX_ACTIVE_LEVELS:: Set the maximal number of nested parallel regions
d973 1
a973 1
* OMP_THREAD_LIMIT::      Set the maximal number of threads
d975 1
d995 1
a995 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 4.3
d1000 1
a1000 1
3.2 `OMP_MAX_ACTIVE_LEVELS' - Set the maximal number of nested parallel regions
d1004 2
a1005 2
     Specifies the initial value for the maximal number of nested
     parallel regions. The value of this variable shall be positive
d1012 1
a1012 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 4.7
d1030 1
a1030 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 4.4
d1040 4
a1043 2
     regions. The value of this variable shall be positive integer. If
     undefined one thread per CPU online is used.
d1049 1
a1049 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 4.2
d1068 1
a1068 1
     OpenMP specifications v3.0 (http://www.openmp.org/), sections
d1082 3
a1084 3
     of bytes as an argument. If the stacksize can not be set due to
     system constraints, an error is reported and the initial stacksize
     is left unchanged. If undefined, the stack size is system
d1088 1
a1088 1
     OpenMP specifications v3.0 (http://www.openmp.org/), sections 4.5
d1093 1
a1093 1
3.7 `OMP_THREAD_LIMIT' - Set the maximal number of threads
d1098 1
a1098 1
     value of this variable shall be positive integer. If undefined,
d1105 1
a1105 1
     OpenMP specifications v3.0 (http://www.openmp.org/), section 4.8
d1108 1
a1108 1
File: libgomp.info,  Node: OMP_WAIT_POLICY,  Next: GOMP_CPU_AFFINITY,  Prev: OMP_THREAD_LIMIT,  Up: Environment Variables
d1120 18
a1137 1
     OpenMP specifications v3.0 (http://www.openmp.org/), sections 4.6
d1140 1
a1140 1
File: libgomp.info,  Node: GOMP_CPU_AFFINITY,  Next: GOMP_STACKSIZE,  Prev: OMP_WAIT_POLICY,  Up: Environment Variables
d1142 2
a1143 2
3.9 `GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
=======================================================
d1147 10
a1156 9
     space- or comma-separated list of CPUs. This list may contain
     different kind of entries: either single CPU numbers in any order,
     a range of CPUs (M-N) or a range with some stride (M-N:S). CPU
     numbers are zero based. For example, `GOMP_CPU_AFFINITY="0 3 1-2
     4-15:2"' will bind the initial thread to CPU 0, the second to CPU
     3, the third to CPU 1, the fourth to CPU 2, the fifth to CPU 4,
     the sixth through tenth to CPUs 6, 8, 10, 12, and 14 respectively
     and then start assigning back from the beginning of the list.
     `GOMP_CPU_AFFINITY=0' binds all threads to CPU 0.
d1169 3
d1175 1
a1175 1
3.10 `GOMP_STACKSIZE' - Set default thread stack size
d1181 2
a1182 2
     an argument. If the stacksize can not be set due to system
     constraints, an error is reported and the initial stacksize is
d1186 1
a1186 1
     *note GOMP_STACKSIZE::
d1201 1
a1201 1
by libgomp. Only maintainers should need them.
d1230 2
a1231 2
only include this in the version run by the master thread.  Surely
that's not worthwhile though...
d1253 1
a1253 1
state, and so we wouldn't actually need to initialize this at startup.
d1322 5
a1326 5
Seems simple enough for PARALLEL blocks.  Create a private struct for
communicating between parent and subfunction.  In the parent, copy in
values for scalar and "small" structs; copy in addresses for others
TREE_ADDRESSABLE types.  In the subfunction, copy the value into the
local variable.
d1328 2
a1329 2
   Not clear at all what to do with bare FOR or SECTION blocks.  The
only thing I can figure is that we do something like
d1363 1
a1363 1
and after the barrier the master thread iterates over the array to
d1455 1
a1455 1
   Note that while it looks like there is trickyness to propagating a
d1560 1
a1560 1
(http://gcc.gnu.org/bugzilla/). In all cases, please add "openmp" to
d1566 1
a1566 1
GNU GENERAL PUBLIC LICENSE
d1569 1
a1569 1
                         Version 2, June 1991
d1571 1
a1571 2
     Copyright (C) 1989, 1991 Free Software Foundation, Inc.
     51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
d1573 2
a1574 2
     Everyone is permitted to copy and distribute verbatim copies
     of this license document, but changing it is not allowed.
d1579 10
a1588 8
The licenses for most software are designed to take away your freedom
to share and change it.  By contrast, the GNU General Public License is
intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.)  You can apply it to
d1594 8
a1601 8
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it in
new free programs; and that you know you can do these things.

   To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
d1604 33
a1636 21
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

   We protect your rights with two steps: (1) copyright the software,
and (2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

   Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

   Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
d1641 7
a1647 116
    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  0. This License applies to any program or other work which contains a
     notice placed by the copyright holder saying it may be distributed
     under the terms of this General Public License.  The "Program",
     below, refers to any such program or work, and a "work based on
     the Program" means either the Program or any derivative work under
     copyright law: that is to say, a work containing the Program or a
     portion of it, either verbatim or with modifications and/or
     translated into another language.  (Hereinafter, translation is
     included without limitation in the term "modification".)  Each
     licensee is addressed as "you".

     Activities other than copying, distribution and modification are
     not covered by this License; they are outside its scope.  The act
     of running the Program is not restricted, and the output from the
     Program is covered only if its contents constitute a work based on
     the Program (independent of having been made by running the
     Program).  Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
     source code as you receive it, in any medium, provided that you
     conspicuously and appropriately publish on each copy an appropriate
     copyright notice and disclaimer of warranty; keep intact all the
     notices that refer to this License and to the absence of any
     warranty; and give any other recipients of the Program a copy of
     this License along with the Program.

     You may charge a fee for the physical act of transferring a copy,
     and you may at your option offer warranty protection in exchange
     for a fee.

  2. You may modify your copy or copies of the Program or any portion
     of it, thus forming a work based on the Program, and copy and
     distribute such modifications or work under the terms of Section 1
     above, provided that you also meet all of these conditions:

       a. You must cause the modified files to carry prominent notices
          stating that you changed the files and the date of any change.

       b. You must cause any work that you distribute or publish, that
          in whole or in part contains or is derived from the Program
          or any part thereof, to be licensed as a whole at no charge
          to all third parties under the terms of this License.

       c. If the modified program normally reads commands interactively
          when run, you must cause it, when started running for such
          interactive use in the most ordinary way, to print or display
          an announcement including an appropriate copyright notice and
          a notice that there is no warranty (or else, saying that you
          provide a warranty) and that users may redistribute the
          program under these conditions, and telling the user how to
          view a copy of this License.  (Exception: if the Program
          itself is interactive but does not normally print such an
          announcement, your work based on the Program is not required
          to print an announcement.)

     These requirements apply to the modified work as a whole.  If
     identifiable sections of that work are not derived from the
     Program, and can be reasonably considered independent and separate
     works in themselves, then this License, and its terms, do not
     apply to those sections when you distribute them as separate
     works.  But when you distribute the same sections as part of a
     whole which is a work based on the Program, the distribution of
     the whole must be on the terms of this License, whose permissions
     for other licensees extend to the entire whole, and thus to each
     and every part regardless of who wrote it.

     Thus, it is not the intent of this section to claim rights or
     contest your rights to work written entirely by you; rather, the
     intent is to exercise the right to control the distribution of
     derivative or collective works based on the Program.

     In addition, mere aggregation of another work not based on the
     Program with the Program (or with a work based on the Program) on
     a volume of a storage or distribution medium does not bring the
     other work under the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
     under Section 2) in object code or executable form under the terms
     of Sections 1 and 2 above provided that you also do one of the
     following:

       a. Accompany it with the complete corresponding machine-readable
          source code, which must be distributed under the terms of
          Sections 1 and 2 above on a medium customarily used for
          software interchange; or,

       b. Accompany it with a written offer, valid for at least three
          years, to give any third party, for a charge no more than your
          cost of physically performing source distribution, a complete
          machine-readable copy of the corresponding source code, to be
          distributed under the terms of Sections 1 and 2 above on a
          medium customarily used for software interchange; or,

       c. Accompany it with the information you received as to the offer
          to distribute corresponding source code.  (This alternative is
          allowed only for noncommercial distribution and only if you
          received the program in object code or executable form with
          such an offer, in accord with Subsection b above.)

     The source code for a work means the preferred form of the work for
     making modifications to it.  For an executable work, complete
     source code means all the source code for all modules it contains,
     plus any associated interface definition files, plus the scripts
     used to control compilation and installation of the executable.
     However, as a special exception, the source code distributed need
     not include anything that is normally distributed (in either
     source or binary form) with the major components (compiler,
     kernel, and so on) of the operating system on which the executable
     runs, unless that component itself accompanies the executable.

     If distribution of executable or object code is made by offering
     access to copy from a designated place, then offering equivalent
     access to copy the source code from the same place counts as
     distribution of the source code, even though third parties are not
     compelled to copy the source along with the object code.
d1649 493
a2141 28
  4. You may not copy, modify, sublicense, or distribute the Program
     except as expressly provided under this License.  Any attempt
     otherwise to copy, modify, sublicense or distribute the Program is
     void, and will automatically terminate your rights under this
     License.  However, parties who have received copies, or rights,
     from you under this License will not have their licenses
     terminated so long as such parties remain in full compliance.

  5. You are not required to accept this License, since you have not
     signed it.  However, nothing else grants you permission to modify
     or distribute the Program or its derivative works.  These actions
     are prohibited by law if you do not accept this License.
     Therefore, by modifying or distributing the Program (or any work
     based on the Program), you indicate your acceptance of this
     License to do so, and all its terms and conditions for copying,
     distributing or modifying the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
     Program), the recipient automatically receives a license from the
     original licensor to copy, distribute or modify the Program
     subject to these terms and conditions.  You may not impose any
     further restrictions on the recipients' exercise of the rights
     granted herein.  You are not responsible for enforcing compliance
     by third parties to this License.

  7. If, as a consequence of a court judgment or allegation of patent
     infringement or for any other reason (not limited to patent
     issues), conditions are imposed on you (whether by court order,
d2144 27
a2170 41
     License.  If you cannot distribute so as to satisfy simultaneously
     your obligations under this License and any other pertinent
     obligations, then as a consequence you may not distribute the
     Program at all.  For example, if a patent license would not permit
     royalty-free redistribution of the Program by all those who
     receive copies directly or indirectly through you, then the only
     way you could satisfy both it and this License would be to refrain
     entirely from distribution of the Program.

     If any portion of this section is held invalid or unenforceable
     under any particular circumstance, the balance of the section is
     intended to apply and the section as a whole is intended to apply
     in other circumstances.

     It is not the purpose of this section to induce you to infringe any
     patents or other property right claims or to contest validity of
     any such claims; this section has the sole purpose of protecting
     the integrity of the free software distribution system, which is
     implemented by public license practices.  Many people have made
     generous contributions to the wide range of software distributed
     through that system in reliance on consistent application of that
     system; it is up to the author/donor to decide if he or she is
     willing to distribute software through any other system and a
     licensee cannot impose that choice.

     This section is intended to make thoroughly clear what is believed
     to be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
     certain countries either by patents or by copyrighted interfaces,
     the original copyright holder who places the Program under this
     License may add an explicit geographical distribution limitation
     excluding those countries, so that distribution is permitted only
     in or among countries not thus excluded.  In such case, this
     License incorporates the limitation as if written in the body of
     this License.

  9. The Free Software Foundation may publish revised and/or new
     versions of the General Public License from time to time.  Such
     new versions will be similar in spirit to the present version, but
     may differ in detail to address new problems or concerns.
d2173 6
a2178 5
     Program specifies a version number of this License which applies
     to it and "any later version", you have the option of following
     the terms and conditions either of that version or of any later
     version published by the Free Software Foundation.  If the Program
     does not specify a version number of this License, you may choose
d2181 43
a2223 31
 10. If you wish to incorporate parts of the Program into other free
     programs whose distribution conditions are different, write to the
     author to ask for permission.  For software which is copyrighted
     by the Free Software Foundation, write to the Free Software
     Foundation; we sometimes make exceptions for this.  Our decision
     will be guided by the two goals of preserving the free status of
     all derivatives of our free software and of promoting the sharing
     and reuse of software generally.

                                NO WARRANTY
 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
     WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
     LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
     HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
     WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
     NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
     FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE
     QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
     PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
     SERVICING, REPAIR OR CORRECTION.

 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
     WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
     MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
     LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
     INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
     INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
     DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
     OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
     OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
     ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
d2225 6
a2230 3
                      END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
=======================================================
d2239 2
a2240 2
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
d2243 1
a2243 1
     Copyright (C) YEAR  NAME OF AUTHOR
d2245 1
a2245 1
     This program is free software; you can redistribute it and/or modify
d2247 2
a2248 2
     the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.
d2250 4
a2253 4
     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.
d2256 1
a2256 2
     along with this program; if not, write to the Free Software
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
d2261 2
a2262 2
   If the program is interactive, make it output a short notice like
this when it starts in an interactive mode:
d2264 2
a2265 3
     Gnomovision version 69, Copyright (C) YEAR NAME OF AUTHOR
     Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
     type `show w'.
d2270 3
a2272 4
appropriate parts of the General Public License.  Of course, the
commands you use may be called something other than `show w' and `show
c'; they could even be mouse-clicks or menu items--whatever suits your
program.
d2275 3
a2277 5
your school, if any, to sign a "copyright disclaimer" for the program,
if necessary.  Here is a sample; alter the names:

     Yoyodyne, Inc., hereby disclaims all copyright interest in the program
     `Gnomovision' (which makes passes at compilers) written by James Hacker.
d2279 1
a2279 4
     SIGNATURE OF TY COON, 1 April 1989
     Ty Coon, President of Vice

   This General Public License does not permit incorporating your
d2283 2
a2284 1
GNU Library General Public License instead of this License.
d2292 1
a2292 1
                      Version 1.2, November 2002
d2294 2
a2295 2
     Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
     51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
d2397 3
d2665 23
a2687 6
     except as expressly provided for under this License.  Any other
     attempt to copy, modify, sublicense or distribute the Document is
     void, and will automatically terminate your rights under this
     License.  However, parties who have received copies, or rights,
     from you under this License will not have their licenses
     terminated so long as such parties remain in full compliance.
d2705 35
a2739 1
     Free Software Foundation.
d2750 1
a2750 1
       under the terms of the GNU Free Documentation License, Version 1.2
d2773 1
a2773 1
File: libgomp.info,  Node: Funding,  Next: Index,  Prev: GNU Free Documentation License,  Up: Top
d2823 1
a2823 1
File: libgomp.info,  Node: Index,  Prev: Funding,  Up: Top
d2825 2
a2826 2
Index
*****
d2833 8
a2840 7
* Environment Variable <3>:              OMP_WAIT_POLICY.       (line 6)
* Environment Variable <4>:              OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <5>:              OMP_STACKSIZE.         (line 6)
* Environment Variable <6>:              OMP_SCHEDULE.          (line 6)
* Environment Variable <7>:              OMP_NUM_THREADS.       (line 6)
* Environment Variable <8>:              OMP_NESTED.            (line 6)
* Environment Variable <9>:              OMP_MAX_ACTIVE_LEVELS. (line 6)
d2853 67
a2919 65
Node: Top2053
Node: Enabling OpenMP3247
Node: Runtime Library Routines4032
Node: omp_get_active_level6407
Node: omp_get_ancestor_thread_num7098
Node: omp_get_dynamic8012
Node: omp_get_level8886
Node: omp_get_max_active_levels9497
Node: omp_get_max_threads10185
Node: omp_get_nested10937
Node: omp_get_num_procs11845
Node: omp_get_num_threads12359
Node: omp_get_schedule13429
Node: omp_get_team_size14336
Node: omp_get_thread_limit15294
Node: omp_get_thread_num15913
Node: omp_in_parallel16767
Node: omp_set_dynamic17413
Node: omp_set_max_active_levels18249
Node: omp_set_nested19011
Node: omp_set_num_threads19888
Node: omp_set_schedule20726
Node: omp_init_lock21770
Node: omp_set_lock22420
Node: omp_test_lock23269
Node: omp_unset_lock24296
Node: omp_destroy_lock25222
Node: omp_init_nest_lock25892
Node: omp_set_nest_lock26624
Node: omp_test_nest_lock27533
Node: omp_unset_nest_lock28631
Node: omp_destroy_nest_lock29640
Node: omp_get_wtick30388
Node: omp_get_wtime30975
Node: Environment Variables31758
Node: OMP_DYNAMIC32819
Node: OMP_MAX_ACTIVE_LEVELS33387
Node: OMP_NESTED34024
Node: OMP_NUM_THREADS34628
Node: OMP_SCHEDULE35201
Node: OMP_STACKSIZE35895
Node: OMP_THREAD_LIMIT36720
Node: OMP_WAIT_POLICY37313
Node: GOMP_CPU_AFFINITY37878
Node: GOMP_STACKSIZE39362
Node: The libgomp ABI40172
Node: Implementing MASTER construct40970
Node: Implementing CRITICAL construct41383
Node: Implementing ATOMIC construct42131
Node: Implementing FLUSH construct42612
Node: Implementing BARRIER construct42883
Node: Implementing THREADPRIVATE construct43152
Node: Implementing PRIVATE clause43804
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses44385
Node: Implementing REDUCTION clause45700
Node: Implementing PARALLEL construct46256
Node: Implementing FOR construct47513
Node: Implementing ORDERED construct49511
Node: Implementing SECTIONS construct49817
Node: Implementing SINGLE construct50583
Node: Reporting Bugs51245
Node: Copying51553
Node: GNU Free Documentation License70763
Node: Funding93174
Node: Index95691
@


1.2.2.1
log
@Rebase.
@
text
@d2 1
a2 1
/space/rguenther/gcc-4.8.3/gcc-4.8.3/libgomp/libgomp.texi.
d4 1
a4 1
Copyright (C) 2006-2013 Free Software Foundation, Inc.
d7 1
a7 1
under the terms of the GNU Free Documentation License, Version 1.3 or
d35 1
a35 1
   Copyright (C) 2006-2013 Free Software Foundation, Inc.
d38 1
a38 1
under the terms of the GNU Free Documentation License, Version 1.3 or
d81 1
a81 1
* Library Index::              Index of this documentation.
d99 1
a99 1
(http://www.openmp.org) manual, version 3.1.
d108 1
a108 1
OpenMP specifications in version 3.1. The routines are structured in
d119 2
a120 2
* omp_get_max_active_levels::   Maximum number of active regions
* omp_get_max_threads::         Maximum number of threads of parallel region
d126 1
a126 1
* omp_get_thread_limit::        Maximum number of threads
a128 1
* omp_in_final::                Whether in final or included task region
d168 1
a168 1
     _Prototype_:  `int omp_get_active_level(void);'
d171 1
a171 1
     _Interface_:  `integer function omp_get_active_level()'
d178 1
a178 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d197 1
a197 1
     _Interface_:  `integer function omp_get_ancestor_thread_num(level)'
d205 1
a205 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d224 1
a224 1
     _Prototype_:  `int omp_get_dynamic(void);'
d233 1
a233 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.8.
d246 1
a246 1
     _Prototype_:  `int omp_get_level(void);'
d249 1
a249 1
     _Interface_:  `integer function omp_level()'
d255 1
a255 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d261 1
a261 1
2.5 `omp_get_max_active_levels' - Maximum number of active regions
d265 2
a266 2
     This function obtains the maximum allowed number of nested, active
     parallel regions.
d269 1
a269 1
     _Prototype_:  `int omp_get_max_active_levels(void);'
d272 1
a272 1
     _Interface_:  `integer function omp_get_max_active_levels()'
d278 2
a279 2
     OpenMP specifications v3.1 (http://www.openmp.org/), section
     3.2.15.
d284 1
a284 1
2.6 `omp_get_max_threads' - Maximum number of threads of parallel region
d288 1
a288 1
     Return the maximum number of threads used for the current parallel
d292 1
a292 1
     _Prototype_:  `int omp_get_max_threads(void);'
d302 1
a302 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.3.
d321 1
a321 1
     _Prototype_:  `int omp_get_nested(void);'
d324 1
a324 1
     _Interface_:  `logical function omp_get_nested()'
d330 1
a330 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d343 1
a343 1
     _Prototype_:  `int omp_get_num_procs(void);'
d349 1
a349 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.5.
d358 2
a359 2
     Returns the number of threads in the current team. In a sequential
     section of the program `omp_get_num_threads' returns 1.
d369 1
a369 1
     _Prototype_:  `int omp_get_num_threads(void);'
d379 1
a379 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.2.
d388 1
a388 1
     Obtain the runtime scheduling method. The KIND argument will be
d390 2
a391 2
     `omp_sched_guided' or `omp_sched_auto'. The second argument,
     MODIFIER, is set to the chunk size.
d394 1
a394 1
     _Prototype_:  `void omp_schedule(omp_sched_t *kind, int *modifier);'
d405 1
a405 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d417 3
a419 3
     values of LEVEL outside zero to `omp_get_level', -1 is returned;
     if LEVEL is zero, 1 is returned, and for `omp_get_level', the
     result is identical to `omp_get_num_threads'.
d422 1
a422 1
     _Prototype_:  `int omp_get_team_size(int level);'
d433 1
a433 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d439 1
a439 1
2.12 `omp_get_thread_limit' - Maximum number of threads
d443 1
a443 1
     Return the maximum number of threads of the program.
d446 1
a446 1
     _Prototype_:  `int omp_get_thread_limit(void);'
d455 1
a455 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d465 5
a469 5
     Returns a unique thread identification number within the current
     team.  In a sequential parts of the program, `omp_get_thread_num'
     always returns 0. In parallel regions the return value varies from
     0 to `omp_get_num_threads'-1 inclusive. The return value of the
     master thread of a team is always 0.
d472 1
a472 1
     _Prototype_:  `int omp_get_thread_num(void);'
d481 1
a481 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.4.
d484 1
a484 1
File: libgomp.info,  Node: omp_in_parallel,  Next: omp_in_final,  Prev: omp_get_thread_num,  Up: Runtime Library Routines
d495 1
a495 1
     _Prototype_:  `int omp_in_parallel(void);'
d501 1
a501 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.6.
d504 1
a504 12
File: libgomp.info,  Node: omp_in_final,  Next: omp_set_dynamic,  Prev: omp_in_parallel,  Up: Runtime Library Routines

2.15 `omp_in_final' - Whether in final or included task region
==============================================================

_Description_:
     This function returns `true' if currently running in a final or
     included task region, `false' otherwise. Here, `true' and `false'
     represent their language-specific counterparts.

_C/C++_:
     _Prototype_:  `int omp_in_final(void);'
d506 1
a506 11
_Fortran_:
     _Interface_:  `logical function omp_in_final()'

_Reference_:
     OpenMP specifications v3.1 (http://www.openmp.org/), section
     3.2.20.


File: libgomp.info,  Node: omp_set_dynamic,  Next: omp_set_max_active_levels,  Prev: omp_in_final,  Up: Runtime Library Routines

2.16 `omp_set_dynamic' - Enable/disable dynamic teams
d516 1
a516 1
     _Prototype_:  `void omp_set_dynamic(int set);'
d520 1
a520 1
                   `logical, intent(in) :: set'
d526 1
a526 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.7.
d531 1
a531 1
2.17 `omp_set_max_active_levels' - Limits the number of active parallel regions
d535 2
a536 2
     This function limits the maximum allowed number of nested, active
     parallel regions.
d539 1
a539 1
     _Prototype_:  `void omp_set_max_active_levels(int max_levels);'
d542 1
a542 1
     _Interface_:  `subroutine omp_set_max_active_levels(max_levels)'
d549 1
a549 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d555 1
a555 1
2.18 `omp_set_nested' - Enable/disable nested parallel regions
d565 1
a565 1
     _Prototype_:  `void omp_set_nested(int set);'
d568 2
a569 2
     _Interface_:  `subroutine omp_set_nested(set)'
                   `logical, intent(in) :: set'
d575 1
a575 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.9.
d580 1
a580 1
2.19 `omp_set_num_threads' - Set upper team size limit
d589 1
a589 1
     _Prototype_:  `void omp_set_num_threads(int n);'
d592 2
a593 2
     _Interface_:  `subroutine omp_set_num_threads(n)'
                   `integer, intent(in) :: n'
d600 1
a600 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.1.
d605 1
a605 1
2.20 `omp_set_schedule' - Set the runtime scheduling method
d610 1
a610 1
     value `omp_sched_static', `omp_sched_dynamic', `omp_sched_guided'
d612 1
a612 1
     is set to the value of MODIFIER if positive, or to the default
d617 1
a617 2
     _Prototype_:  `void omp_set_schedule(omp_sched_t *kind, int
                   *modifier);'
d620 1
a620 1
     _Interface_:  `subroutine omp_set_schedule(kind, modifier)'
d628 1
a628 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d634 1
a634 1
2.21 `omp_init_lock' - Initialize simple lock
d638 1
a638 1
     Initialize a simple lock.  After initialization, the lock is in an
d652 1
a652 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.1.
d657 1
a657 1
2.22 `omp_set_lock' - Wait for and set simple lock
d671 1
a671 1
                   `integer(omp_lock_kind), intent(inout) :: lock'
d678 1
a678 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.3.
d683 1
a683 1
2.23 `omp_test_lock' - Test and set simple lock if available
d697 3
a699 2
     _Interface_:  `logical function omp_test_lock(lock)'
                   `integer(omp_lock_kind), intent(inout) :: lock'
d705 1
a705 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.5.
d710 1
a710 1
2.24 `omp_unset_lock' - Unset simple lock
d717 2
a718 2
     lock becomes unlocked. If one or more threads attempted to set the
     lock before, one of them is chosen to, again, set the lock to
d726 1
a726 1
                   `integer(omp_lock_kind), intent(inout) :: lock'
d732 1
a732 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.4.
d737 1
a737 1
2.25 `omp_destroy_lock' - Destroy simple lock
d745 1
a745 1
     _Prototype_:  `void omp_destroy_lock(omp_lock_t *lock);'
d755 1
a755 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.2.
d760 1
a760 1
2.26 `omp_init_nest_lock' - Initialize nested lock
d764 1
a764 1
     Initialize a nested lock.  After initialization, the lock is in an
d778 1
a778 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.1.
d783 1
a783 1
2.27 `omp_set_nest_lock' - Wait for and set nested lock
d790 1
a790 1
     current thread, the nesting count for the lock is incremented.
d797 1
a797 1
                   `integer(omp_nest_lock_kind), intent(inout) :: lock'
d803 1
a803 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.3.
d808 1
a808 1
2.28 `omp_test_nest_lock' - Test and set nested lock if available
d823 2
a824 1
     _Interface_:  `logical function omp_test_nest_lock(lock)'
d831 1
a831 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.5.
d836 1
a836 1
2.29 `omp_unset_nest_lock' - Unset nested lock
d845 1
a845 1
     the lock before, one of them is chosen to, again, set the lock to
d853 1
a853 1
                   `integer(omp_nest_lock_kind), intent(inout) :: lock'
d859 1
a859 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.4.
d864 1
a864 1
2.30 `omp_destroy_nest_lock' - Destroy nested lock
d883 1
a883 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.2.
d888 1
a888 1
2.31 `omp_get_wtick' - Get timer precision
d896 1
a896 1
     _Prototype_:  `double omp_get_wtick(void);'
d905 1
a905 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.4.2.
d910 1
a910 1
2.32 `omp_get_wtime' - Elapsed wall clock time
d915 4
a918 4
     thread, no guarantee can be made that two distinct threads measure
     the same time.  Time is measured from some "time in the past",
     which is an arbitrary time guaranteed not to change during the
     execution of the program.
d921 1
a921 1
     _Prototype_:  `double omp_get_wtime(void);'
d930 1
a930 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.4.1.
d941 1
a941 1
specifications in version 3.1, while `GOMP_CPU_AFFINITY' and
d947 1
a947 1
* OMP_MAX_ACTIVE_LEVELS:: Set the maximum number of nested parallel regions
d952 1
a952 1
* OMP_THREAD_LIMIT::      Set the maximum number of threads
a953 1
* OMP_PROC_BIND::         Whether theads may be moved between CPUs
d973 1
a973 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 4.3
d978 1
a978 1
3.2 `OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d982 2
a983 2
     Specifies the initial value for the maximum number of nested
     parallel regions. The value of this variable shall be a positive
d990 1
a990 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 4.8
d1008 1
a1008 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 4.5
d1018 2
a1019 4
     regions. The value of this variable shall be a comma-separated
     list of positive integers; the value specified the number of
     threads to use for the corresponding nested level. If undefined
     one thread per CPU is used.
d1025 1
a1025 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 4.2
d1044 1
a1044 1
     OpenMP specifications v3.1 (http://www.openmp.org/), sections
d1058 3
a1060 3
     of bytes as an argument. If the stack size cannot be set due to
     system constraints, an error is reported and the initial stack
     size is left unchanged. If undefined, the stack size is system
d1064 1
a1064 1
     OpenMP specifications v3.1 (http://www.openmp.org/), sections 4.6
d1069 1
a1069 1
3.7 `OMP_THREAD_LIMIT' - Set the maximum number of threads
d1074 1
a1074 1
     value of this variable shall be a positive integer. If undefined,
d1081 1
a1081 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 4.9
d1084 1
a1084 1
File: libgomp.info,  Node: OMP_WAIT_POLICY,  Next: OMP_PROC_BIND,  Prev: OMP_THREAD_LIMIT,  Up: Environment Variables
d1096 1
a1096 1
     OpenMP specifications v3.1 (http://www.openmp.org/), sections 4.7
d1099 1
a1099 1
File: libgomp.info,  Node: OMP_PROC_BIND,  Next: GOMP_CPU_AFFINITY,  Prev: OMP_WAIT_POLICY,  Up: Environment Variables
d1101 2
a1102 19
3.9 `OMP_PROC_BIND' - Whether theads may be moved between CPUs
==============================================================

_Description_:
     Specifies whether threads may be moved between processors. If set
     to `true', OpenMP theads should not be moved, if set to `false'
     they may be moved.

_See also_:
     *note GOMP_CPU_AFFINITY::

_Reference_:
     OpenMP specifications v3.1 (http://www.openmp.org/), sections 4.4


File: libgomp.info,  Node: GOMP_CPU_AFFINITY,  Next: GOMP_STACKSIZE,  Prev: OMP_PROC_BIND,  Up: Environment Variables

3.10 `GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
========================================================
d1106 9
a1114 10
     space-separated or comma-separated list of CPUs. This list may
     contain different kinds of entries: either single CPU numbers in
     any order, a range of CPUs (M-N) or a range with some stride
     (M-N:S).  CPU numbers are zero based. For example,
     `GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
     to CPU 0, the second to CPU 3, the third to CPU 1, the fourth to
     CPU 2, the fifth to CPU 4, the sixth through tenth to CPUs 6, 8,
     10, 12, and 14 respectively and then start assigning back from the
     beginning of the list.  `GOMP_CPU_AFFINITY=0' binds all threads to
     CPU 0.
a1126 3
_See also_:
     *note OMP_PROC_BIND::

d1130 1
a1130 1
3.11 `GOMP_STACKSIZE' - Set default thread stack size
d1136 2
a1137 2
     an argument. If the stack size cannot be set due to system
     constraints, an error is reported and the initial stack size is
d1141 1
a1141 1
     *note OMP_STACKSIZE::
d1156 1
a1156 1
by libgomp.  Only maintainers should need them.
d1185 2
a1186 2
only include this in the version run by the master thread.  Surely this
is not worthwhile though...
d1208 1
a1208 1
state, and so we wouldn't need to initialize this at startup.
d1277 5
a1281 5
This seems simple enough for PARALLEL blocks.  Create a private struct
for communicating between the parent and subfunction.  In the parent,
copy in values for scalar and "small" structs; copy in addresses for
others TREE_ADDRESSABLE types.  In the subfunction, copy the value into
the local variable.
d1283 2
a1284 2
   It is not clear what to do with bare FOR or SECTION blocks.  The
only thing I can figure is that we do something like:
d1318 1
a1318 1
and after the barrier, the master thread iterates over the array to
d1410 1
a1410 1
   Note that while it looks like there is trickiness to propagating a
d1515 1
a1515 1
(http://gcc.gnu.org/bugzilla/).  For all cases, please add "openmp" to
d1521 1
a1521 1
GNU General Public License
d1524 1
a1524 1
                        Version 3, 29 June 2007
d1526 2
a1527 1
     Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/'
d1529 2
a1530 2
     Everyone is permitted to copy and distribute verbatim copies of this
     license document, but changing it is not allowed.
d1535 8
a1542 10
The GNU General Public License is a free, copyleft license for software
and other kinds of works.

   The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program-to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
d1548 8
a1555 8
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

   To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you
have certain responsibilities if you distribute copies of the software,
or if you modify it: responsibilities to respect the freedom of others.
d1558 21
a1578 33
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

   Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

   For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

   Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the
manufacturer can do so.  This is fundamentally incompatible with the
aim of protecting users' freedom to change the software.  The
systematic pattern of such abuse occurs in the area of products for
individuals to use, which is precisely where it is most unacceptable.
Therefore, we have designed this version of the GPL to prohibit the
practice for those products.  If such problems arise substantially in
other domains, we stand ready to extend this provision to those domains
in future versions of the GPL, as needed to protect the freedom of
users.

   Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
d1583 116
a1698 2
TERMS AND CONDITIONS
====================
d1700 28
a1727 498
  0. Definitions.

     "This License" refers to version 3 of the GNU General Public
     License.

     "Copyright" also means copyright-like laws that apply to other
     kinds of works, such as semiconductor masks.

     "The Program" refers to any copyrightable work licensed under this
     License.  Each licensee is addressed as "you".  "Licensees" and
     "recipients" may be individuals or organizations.

     To "modify" a work means to copy from or adapt all or part of the
     work in a fashion requiring copyright permission, other than the
     making of an exact copy.  The resulting work is called a "modified
     version" of the earlier work or a work "based on" the earlier work.

     A "covered work" means either the unmodified Program or a work
     based on the Program.

     To "propagate" a work means to do anything with it that, without
     permission, would make you directly or secondarily liable for
     infringement under applicable copyright law, except executing it
     on a computer or modifying a private copy.  Propagation includes
     copying, distribution (with or without modification), making
     available to the public, and in some countries other activities as
     well.

     To "convey" a work means any kind of propagation that enables other
     parties to make or receive copies.  Mere interaction with a user
     through a computer network, with no transfer of a copy, is not
     conveying.

     An interactive user interface displays "Appropriate Legal Notices"
     to the extent that it includes a convenient and prominently visible
     feature that (1) displays an appropriate copyright notice, and (2)
     tells the user that there is no warranty for the work (except to
     the extent that warranties are provided), that licensees may
     convey the work under this License, and how to view a copy of this
     License.  If the interface presents a list of user commands or
     options, such as a menu, a prominent item in the list meets this
     criterion.

  1. Source Code.

     The "source code" for a work means the preferred form of the work
     for making modifications to it.  "Object code" means any
     non-source form of a work.

     A "Standard Interface" means an interface that either is an
     official standard defined by a recognized standards body, or, in
     the case of interfaces specified for a particular programming
     language, one that is widely used among developers working in that
     language.

     The "System Libraries" of an executable work include anything,
     other than the work as a whole, that (a) is included in the normal
     form of packaging a Major Component, but which is not part of that
     Major Component, and (b) serves only to enable use of the work
     with that Major Component, or to implement a Standard Interface
     for which an implementation is available to the public in source
     code form.  A "Major Component", in this context, means a major
     essential component (kernel, window system, and so on) of the
     specific operating system (if any) on which the executable work
     runs, or a compiler used to produce the work, or an object code
     interpreter used to run it.

     The "Corresponding Source" for a work in object code form means all
     the source code needed to generate, install, and (for an executable
     work) run the object code and to modify the work, including
     scripts to control those activities.  However, it does not include
     the work's System Libraries, or general-purpose tools or generally
     available free programs which are used unmodified in performing
     those activities but which are not part of the work.  For example,
     Corresponding Source includes interface definition files
     associated with source files for the work, and the source code for
     shared libraries and dynamically linked subprograms that the work
     is specifically designed to require, such as by intimate data
     communication or control flow between those subprograms and other
     parts of the work.

     The Corresponding Source need not include anything that users can
     regenerate automatically from other parts of the Corresponding
     Source.

     The Corresponding Source for a work in source code form is that
     same work.

  2. Basic Permissions.

     All rights granted under this License are granted for the term of
     copyright on the Program, and are irrevocable provided the stated
     conditions are met.  This License explicitly affirms your unlimited
     permission to run the unmodified Program.  The output from running
     a covered work is covered by this License only if the output,
     given its content, constitutes a covered work.  This License
     acknowledges your rights of fair use or other equivalent, as
     provided by copyright law.

     You may make, run and propagate covered works that you do not
     convey, without conditions so long as your license otherwise
     remains in force.  You may convey covered works to others for the
     sole purpose of having them make modifications exclusively for
     you, or provide you with facilities for running those works,
     provided that you comply with the terms of this License in
     conveying all material for which you do not control copyright.
     Those thus making or running the covered works for you must do so
     exclusively on your behalf, under your direction and control, on
     terms that prohibit them from making any copies of your
     copyrighted material outside their relationship with you.

     Conveying under any other circumstances is permitted solely under
     the conditions stated below.  Sublicensing is not allowed; section
     10 makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

     No covered work shall be deemed part of an effective technological
     measure under any applicable law fulfilling obligations under
     article 11 of the WIPO copyright treaty adopted on 20 December
     1996, or similar laws prohibiting or restricting circumvention of
     such measures.

     When you convey a covered work, you waive any legal power to forbid
     circumvention of technological measures to the extent such
     circumvention is effected by exercising rights under this License
     with respect to the covered work, and you disclaim any intention
     to limit operation or modification of the work as a means of
     enforcing, against the work's users, your or third parties' legal
     rights to forbid circumvention of technological measures.

  4. Conveying Verbatim Copies.

     You may convey verbatim copies of the Program's source code as you
     receive it, in any medium, provided that you conspicuously and
     appropriately publish on each copy an appropriate copyright notice;
     keep intact all notices stating that this License and any
     non-permissive terms added in accord with section 7 apply to the
     code; keep intact all notices of the absence of any warranty; and
     give all recipients a copy of this License along with the Program.

     You may charge any price or no price for each copy that you convey,
     and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

     You may convey a work based on the Program, or the modifications to
     produce it from the Program, in the form of source code under the
     terms of section 4, provided that you also meet all of these
     conditions:

       a. The work must carry prominent notices stating that you
          modified it, and giving a relevant date.

       b. The work must carry prominent notices stating that it is
          released under this License and any conditions added under
          section 7.  This requirement modifies the requirement in
          section 4 to "keep intact all notices".

       c. You must license the entire work, as a whole, under this
          License to anyone who comes into possession of a copy.  This
          License will therefore apply, along with any applicable
          section 7 additional terms, to the whole of the work, and all
          its parts, regardless of how they are packaged.  This License
          gives no permission to license the work in any other way, but
          it does not invalidate such permission if you have separately
          received it.

       d. If the work has interactive user interfaces, each must display
          Appropriate Legal Notices; however, if the Program has
          interactive interfaces that do not display Appropriate Legal
          Notices, your work need not make them do so.

     A compilation of a covered work with other separate and independent
     works, which are not by their nature extensions of the covered
     work, and which are not combined with it such as to form a larger
     program, in or on a volume of a storage or distribution medium, is
     called an "aggregate" if the compilation and its resulting
     copyright are not used to limit the access or legal rights of the
     compilation's users beyond what the individual works permit.
     Inclusion of a covered work in an aggregate does not cause this
     License to apply to the other parts of the aggregate.

  6. Conveying Non-Source Forms.

     You may convey a covered work in object code form under the terms
     of sections 4 and 5, provided that you also convey the
     machine-readable Corresponding Source under the terms of this
     License, in one of these ways:

       a. Convey the object code in, or embodied in, a physical product
          (including a physical distribution medium), accompanied by the
          Corresponding Source fixed on a durable physical medium
          customarily used for software interchange.

       b. Convey the object code in, or embodied in, a physical product
          (including a physical distribution medium), accompanied by a
          written offer, valid for at least three years and valid for
          as long as you offer spare parts or customer support for that
          product model, to give anyone who possesses the object code
          either (1) a copy of the Corresponding Source for all the
          software in the product that is covered by this License, on a
          durable physical medium customarily used for software
          interchange, for a price no more than your reasonable cost of
          physically performing this conveying of source, or (2) access
          to copy the Corresponding Source from a network server at no
          charge.

       c. Convey individual copies of the object code with a copy of
          the written offer to provide the Corresponding Source.  This
          alternative is allowed only occasionally and noncommercially,
          and only if you received the object code with such an offer,
          in accord with subsection 6b.

       d. Convey the object code by offering access from a designated
          place (gratis or for a charge), and offer equivalent access
          to the Corresponding Source in the same way through the same
          place at no further charge.  You need not require recipients
          to copy the Corresponding Source along with the object code.
          If the place to copy the object code is a network server, the
          Corresponding Source may be on a different server (operated
          by you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to
          the object code saying where to find the Corresponding Source.
          Regardless of what server hosts the Corresponding Source, you
          remain obligated to ensure that it is available for as long
          as needed to satisfy these requirements.

       e. Convey the object code using peer-to-peer transmission,
          provided you inform other peers where the object code and
          Corresponding Source of the work are being offered to the
          general public at no charge under subsection 6d.


     A separable portion of the object code, whose source code is
     excluded from the Corresponding Source as a System Library, need
     not be included in conveying the object code work.

     A "User Product" is either (1) a "consumer product", which means
     any tangible personal property which is normally used for personal,
     family, or household purposes, or (2) anything designed or sold for
     incorporation into a dwelling.  In determining whether a product
     is a consumer product, doubtful cases shall be resolved in favor of
     coverage.  For a particular product received by a particular user,
     "normally used" refers to a typical or common use of that class of
     product, regardless of the status of the particular user or of the
     way in which the particular user actually uses, or expects or is
     expected to use, the product.  A product is a consumer product
     regardless of whether the product has substantial commercial,
     industrial or non-consumer uses, unless such uses represent the
     only significant mode of use of the product.

     "Installation Information" for a User Product means any methods,
     procedures, authorization keys, or other information required to
     install and execute modified versions of a covered work in that
     User Product from a modified version of its Corresponding Source.
     The information must suffice to ensure that the continued
     functioning of the modified object code is in no case prevented or
     interfered with solely because modification has been made.

     If you convey an object code work under this section in, or with,
     or specifically for use in, a User Product, and the conveying
     occurs as part of a transaction in which the right of possession
     and use of the User Product is transferred to the recipient in
     perpetuity or for a fixed term (regardless of how the transaction
     is characterized), the Corresponding Source conveyed under this
     section must be accompanied by the Installation Information.  But
     this requirement does not apply if neither you nor any third party
     retains the ability to install modified object code on the User
     Product (for example, the work has been installed in ROM).

     The requirement to provide Installation Information does not
     include a requirement to continue to provide support service,
     warranty, or updates for a work that has been modified or
     installed by the recipient, or for the User Product in which it
     has been modified or installed.  Access to a network may be denied
     when the modification itself materially and adversely affects the
     operation of the network or violates the rules and protocols for
     communication across the network.

     Corresponding Source conveyed, and Installation Information
     provided, in accord with this section must be in a format that is
     publicly documented (and with an implementation available to the
     public in source code form), and must require no special password
     or key for unpacking, reading or copying.

  7. Additional Terms.

     "Additional permissions" are terms that supplement the terms of
     this License by making exceptions from one or more of its
     conditions.  Additional permissions that are applicable to the
     entire Program shall be treated as though they were included in
     this License, to the extent that they are valid under applicable
     law.  If additional permissions apply only to part of the Program,
     that part may be used separately under those permissions, but the
     entire Program remains governed by this License without regard to
     the additional permissions.

     When you convey a copy of a covered work, you may at your option
     remove any additional permissions from that copy, or from any part
     of it.  (Additional permissions may be written to require their own
     removal in certain cases when you modify the work.)  You may place
     additional permissions on material, added by you to a covered work,
     for which you have or can give appropriate copyright permission.

     Notwithstanding any other provision of this License, for material
     you add to a covered work, you may (if authorized by the copyright
     holders of that material) supplement the terms of this License
     with terms:

       a. Disclaiming warranty or limiting liability differently from
          the terms of sections 15 and 16 of this License; or

       b. Requiring preservation of specified reasonable legal notices
          or author attributions in that material or in the Appropriate
          Legal Notices displayed by works containing it; or

       c. Prohibiting misrepresentation of the origin of that material,
          or requiring that modified versions of such material be
          marked in reasonable ways as different from the original
          version; or

       d. Limiting the use for publicity purposes of names of licensors
          or authors of the material; or

       e. Declining to grant rights under trademark law for use of some
          trade names, trademarks, or service marks; or

       f. Requiring indemnification of licensors and authors of that
          material by anyone who conveys the material (or modified
          versions of it) with contractual assumptions of liability to
          the recipient, for any liability that these contractual
          assumptions directly impose on those licensors and authors.

     All other non-permissive additional terms are considered "further
     restrictions" within the meaning of section 10.  If the Program as
     you received it, or any part of it, contains a notice stating that
     it is governed by this License along with a term that is a further
     restriction, you may remove that term.  If a license document
     contains a further restriction but permits relicensing or
     conveying under this License, you may add to a covered work
     material governed by the terms of that license document, provided
     that the further restriction does not survive such relicensing or
     conveying.

     If you add terms to a covered work in accord with this section, you
     must place, in the relevant source files, a statement of the
     additional terms that apply to those files, or a notice indicating
     where to find the applicable terms.

     Additional terms, permissive or non-permissive, may be stated in
     the form of a separately written license, or stated as exceptions;
     the above requirements apply either way.

  8. Termination.

     You may not propagate or modify a covered work except as expressly
     provided under this License.  Any attempt otherwise to propagate or
     modify it is void, and will automatically terminate your rights
     under this License (including any patent licenses granted under
     the third paragraph of section 11).

     However, if you cease all violation of this License, then your
     license from a particular copyright holder is reinstated (a)
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
     copyright holder fails to notify you of the violation by some
     reasonable means prior to 60 days after the cessation.

     Moreover, your license from a particular copyright holder is
     reinstated permanently if the copyright holder notifies you of the
     violation by some reasonable means, this is the first time you have
     received notice of violation of this License (for any work) from
     that copyright holder, and you cure the violation prior to 30 days
     after your receipt of the notice.

     Termination of your rights under this section does not terminate
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, you do not qualify to receive new
     licenses for the same material under section 10.

  9. Acceptance Not Required for Having Copies.

     You are not required to accept this License in order to receive or
     run a copy of the Program.  Ancillary propagation of a covered work
     occurring solely as a consequence of using peer-to-peer
     transmission to receive a copy likewise does not require
     acceptance.  However, nothing other than this License grants you
     permission to propagate or modify any covered work.  These actions
     infringe copyright if you do not accept this License.  Therefore,
     by modifying or propagating a covered work, you indicate your
     acceptance of this License to do so.

 10. Automatic Licensing of Downstream Recipients.

     Each time you convey a covered work, the recipient automatically
     receives a license from the original licensors, to run, modify and
     propagate that work, subject to this License.  You are not
     responsible for enforcing compliance by third parties with this
     License.

     An "entity transaction" is a transaction transferring control of an
     organization, or substantially all assets of one, or subdividing an
     organization, or merging organizations.  If propagation of a
     covered work results from an entity transaction, each party to that
     transaction who receives a copy of the work also receives whatever
     licenses to the work the party's predecessor in interest had or
     could give under the previous paragraph, plus a right to
     possession of the Corresponding Source of the work from the
     predecessor in interest, if the predecessor has it or can get it
     with reasonable efforts.

     You may not impose any further restrictions on the exercise of the
     rights granted or affirmed under this License.  For example, you
     may not impose a license fee, royalty, or other charge for
     exercise of rights granted under this License, and you may not
     initiate litigation (including a cross-claim or counterclaim in a
     lawsuit) alleging that any patent claim is infringed by making,
     using, selling, offering for sale, or importing the Program or any
     portion of it.

 11. Patents.

     A "contributor" is a copyright holder who authorizes use under this
     License of the Program or a work on which the Program is based.
     The work thus licensed is called the contributor's "contributor
     version".

     A contributor's "essential patent claims" are all patent claims
     owned or controlled by the contributor, whether already acquired or
     hereafter acquired, that would be infringed by some manner,
     permitted by this License, of making, using, or selling its
     contributor version, but do not include claims that would be
     infringed only as a consequence of further modification of the
     contributor version.  For purposes of this definition, "control"
     includes the right to grant patent sublicenses in a manner
     consistent with the requirements of this License.

     Each contributor grants you a non-exclusive, worldwide,
     royalty-free patent license under the contributor's essential
     patent claims, to make, use, sell, offer for sale, import and
     otherwise run, modify and propagate the contents of its
     contributor version.

     In the following three paragraphs, a "patent license" is any
     express agreement or commitment, however denominated, not to
     enforce a patent (such as an express permission to practice a
     patent or covenant not to sue for patent infringement).  To
     "grant" such a patent license to a party means to make such an
     agreement or commitment not to enforce a patent against the party.

     If you convey a covered work, knowingly relying on a patent
     license, and the Corresponding Source of the work is not available
     for anyone to copy, free of charge and under the terms of this
     License, through a publicly available network server or other
     readily accessible means, then you must either (1) cause the
     Corresponding Source to be so available, or (2) arrange to deprive
     yourself of the benefit of the patent license for this particular
     work, or (3) arrange, in a manner consistent with the requirements
     of this License, to extend the patent license to downstream
     recipients.  "Knowingly relying" means you have actual knowledge
     that, but for the patent license, your conveying the covered work
     in a country, or your recipient's use of the covered work in a
     country, would infringe one or more identifiable patents in that
     country that you have reason to believe are valid.

     If, pursuant to or in connection with a single transaction or
     arrangement, you convey, or propagate by procuring conveyance of, a
     covered work, and grant a patent license to some of the parties
     receiving the covered work authorizing them to use, propagate,
     modify or convey a specific copy of the covered work, then the
     patent license you grant is automatically extended to all
     recipients of the covered work and works based on it.

     A patent license is "discriminatory" if it does not include within
     the scope of its coverage, prohibits the exercise of, or is
     conditioned on the non-exercise of one or more of the rights that
     are specifically granted under this License.  You may not convey a
     covered work if you are a party to an arrangement with a third
     party that is in the business of distributing software, under
     which you make payment to the third party based on the extent of
     your activity of conveying the work, and under which the third
     party grants, to any of the parties who would receive the covered
     work from you, a discriminatory patent license (a) in connection
     with copies of the covered work conveyed by you (or copies made
     from those copies), or (b) primarily for and in connection with
     specific products or compilations that contain the covered work,
     unless you entered into that arrangement, or that patent license
     was granted, prior to 28 March 2007.

     Nothing in this License shall be construed as excluding or limiting
     any implied license or other defenses to infringement that may
     otherwise be available to you under applicable patent law.

 12. No Surrender of Others' Freedom.

     If conditions are imposed on you (whether by court order,
d1730 41
a1770 27
     License.  If you cannot convey a covered work so as to satisfy
     simultaneously your obligations under this License and any other
     pertinent obligations, then as a consequence you may not convey it
     at all.  For example, if you agree to terms that obligate you to
     collect a royalty for further conveying from those to whom you
     convey the Program, the only way you could satisfy both those
     terms and this License would be to refrain entirely from conveying
     the Program.

 13. Use with the GNU Affero General Public License.

     Notwithstanding any other provision of this License, you have
     permission to link or combine any covered work with a work licensed
     under version 3 of the GNU Affero General Public License into a
     single combined work, and to convey the resulting work.  The terms
     of this License will continue to apply to the part which is the
     covered work, but the special requirements of the GNU Affero
     General Public License, section 13, concerning interaction through
     a network will apply to the combination as such.

 14. Revised Versions of this License.

     The Free Software Foundation may publish revised and/or new
     versions of the GNU General Public License from time to time.
     Such new versions will be similar in spirit to the present
     version, but may differ in detail to address new problems or
     concerns.
d1773 5
a1777 6
     Program specifies that a certain numbered version of the GNU
     General Public License "or any later version" applies to it, you
     have the option of following the terms and conditions either of
     that numbered version or of any later version published by the
     Free Software Foundation.  If the Program does not specify a
     version number of the GNU General Public License, you may choose
d1780 31
a1810 43
     If the Program specifies that a proxy can decide which future
     versions of the GNU General Public License can be used, that
     proxy's public statement of acceptance of a version permanently
     authorizes you to choose that version for the Program.

     Later license versions may give you additional or different
     permissions.  However, no additional obligations are imposed on any
     author or copyright holder as a result of your choosing to follow a
     later version.

 15. Disclaimer of Warranty.

     THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
     APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE
     COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS"
     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
     INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE
     RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.
     SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
     NECESSARY SERVICING, REPAIR OR CORRECTION.

 16. Limitation of Liability.

     IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
     WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
     FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
     CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
     THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
     BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
     PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
     PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF
     THE POSSIBILITY OF SUCH DAMAGES.

 17. Interpretation of Sections 15 and 16.

     If the disclaimer of warranty and limitation of liability provided
     above cannot be given local legal effect according to their terms,
     reviewing courts shall apply local law that most closely
     approximates an absolute waiver of all civil liability in
     connection with the Program, unless a warranty or assumption of
     liability accompanies a copy of the Program in return for a fee.
d1812 3
a1814 6

END OF TERMS AND CONDITIONS
===========================

How to Apply These Terms to Your New Programs
=============================================
d1823 2
a1824 2
state the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
d1827 1
a1827 1
     Copyright (C) YEAR NAME OF AUTHOR
d1829 1
a1829 1
     This program is free software: you can redistribute it and/or modify
d1831 2
a1832 2
     the Free Software Foundation, either version 3 of the License, or (at
     your option) any later version.
d1834 4
a1837 4
     This program is distributed in the hope that it will be useful, but
     WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     General Public License for more details.
d1840 2
a1841 1
     along with this program.  If not, see `http://www.gnu.org/licenses/'.
d1846 2
a1847 2
   If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
d1849 3
a1851 2
     PROGRAM Copyright (C) YEAR NAME OF AUTHOR
     This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
d1856 4
a1859 3
appropriate parts of the General Public License.  Of course, your
program's commands might be different; for a GUI interface, you would
use an "about box".
d1862 5
a1866 3
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  For more information on this, and how to apply and follow
the GNU GPL, see `http://www.gnu.org/licenses/'.
d1868 4
a1871 1
   The GNU General Public License does not permit incorporating your
d1875 1
a1875 2
GNU Lesser General Public License instead of this License.  But first,
please read `http://www.gnu.org/philosophy/why-not-lgpl.html'.
d1883 1
a1883 1
                     Version 1.3, 3 November 2008
d1885 2
a1886 2
     Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
     `http://fsf.org/'
a1987 3
     The "publisher" means any person or entity that distributes copies
     of the Document to the public.

d2253 6
a2258 23
     except as expressly provided under this License.  Any attempt
     otherwise to copy, modify, sublicense, or distribute it is void,
     and will automatically terminate your rights under this License.

     However, if you cease all violation of this License, then your
     license from a particular copyright holder is reinstated (a)
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
     copyright holder fails to notify you of the violation by some
     reasonable means prior to 60 days after the cessation.

     Moreover, your license from a particular copyright holder is
     reinstated permanently if the copyright holder notifies you of the
     violation by some reasonable means, this is the first time you have
     received notice of violation of this License (for any work) from
     that copyright holder, and you cure the violation prior to 30 days
     after your receipt of the notice.

     Termination of your rights under this section does not terminate
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, receipt of a copy of some or all of
     the same material does not give you any rights to use it.
d2276 1
a2276 35
     Free Software Foundation.  If the Document specifies that a proxy
     can decide which future versions of this License can be used, that
     proxy's public statement of acceptance of a version permanently
     authorizes you to choose that version for the Document.

 11. RELICENSING

     "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
     World Wide Web server that publishes copyrightable works and also
     provides prominent facilities for anybody to edit those works.  A
     public wiki that anybody can edit is an example of such a server.
     A "Massive Multiauthor Collaboration" (or "MMC") contained in the
     site means any set of copyrightable works thus published on the MMC
     site.

     "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
     license published by Creative Commons Corporation, a not-for-profit
     corporation with a principal place of business in San Francisco,
     California, as well as future copyleft versions of that license
     published by that same organization.

     "Incorporate" means to publish or republish a Document, in whole or
     in part, as part of another Document.

     An MMC is "eligible for relicensing" if it is licensed under this
     License, and if all works that were first published under this
     License somewhere other than this MMC, and subsequently
     incorporated in whole or in part into the MMC, (1) had no cover
     texts or invariant sections, and (2) were thus incorporated prior
     to November 1, 2008.

     The operator of an MMC Site may republish an MMC contained in the
     site under CC-BY-SA on the same site at any time before August 1,
     2009, provided the MMC is eligible for relicensing.

d2287 1
a2287 1
       under the terms of the GNU Free Documentation License, Version 1.3
d2310 1
a2310 1
File: libgomp.info,  Node: Funding,  Next: Library Index,  Prev: GNU Free Documentation License,  Up: Top
d2360 1
a2360 1
File: libgomp.info,  Node: Library Index,  Prev: Funding,  Up: Top
d2362 2
a2363 2
Library Index
*************
d2370 7
a2376 8
* Environment Variable <3>:              OMP_PROC_BIND.         (line 6)
* Environment Variable <4>:              OMP_WAIT_POLICY.       (line 6)
* Environment Variable <5>:              OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <6>:              OMP_STACKSIZE.         (line 6)
* Environment Variable <7>:              OMP_SCHEDULE.          (line 6)
* Environment Variable <8>:              OMP_NUM_THREADS.       (line 6)
* Environment Variable <9>:              OMP_NESTED.            (line 6)
* Environment Variable <10>:             OMP_MAX_ACTIVE_LEVELS. (line 6)
d2389 65
a2453 67
Node: Top2039
Node: Enabling OpenMP3233
Node: Runtime Library Routines4018
Node: omp_get_active_level6466
Node: omp_get_ancestor_thread_num7170
Node: omp_get_dynamic8097
Node: omp_get_level8975
Node: omp_get_max_active_levels9599
Node: omp_get_max_threads10302
Node: omp_get_nested11058
Node: omp_get_num_procs11970
Node: omp_get_num_threads12488
Node: omp_get_schedule13570
Node: omp_get_team_size14491
Node: omp_get_thread_limit15453
Node: omp_get_thread_num16076
Node: omp_in_parallel16944
Node: omp_in_final17591
Node: omp_set_dynamic18262
Node: omp_set_max_active_levels19099
Node: omp_set_nested19879
Node: omp_set_num_threads20758
Node: omp_set_schedule21594
Node: omp_init_lock22666
Node: omp_set_lock23317
Node: omp_test_lock24168
Node: omp_unset_lock25139
Node: omp_destroy_lock26065
Node: omp_init_nest_lock26739
Node: omp_set_nest_lock27472
Node: omp_test_nest_lock28383
Node: omp_unset_nest_lock29412
Node: omp_destroy_nest_lock30422
Node: omp_get_wtick31170
Node: omp_get_wtime31761
Node: Environment Variables32535
Node: OMP_DYNAMIC33663
Node: OMP_MAX_ACTIVE_LEVELS34231
Node: OMP_NESTED34870
Node: OMP_NUM_THREADS35474
Node: OMP_SCHEDULE36162
Node: OMP_STACKSIZE36856
Node: OMP_THREAD_LIMIT37682
Node: OMP_WAIT_POLICY38277
Node: OMP_PROC_BIND38838
Node: GOMP_CPU_AFFINITY39396
Node: GOMP_STACKSIZE40937
Node: The libgomp ABI41747
Node: Implementing MASTER construct42546
Node: Implementing CRITICAL construct42960
Node: Implementing ATOMIC construct43699
Node: Implementing FLUSH construct44180
Node: Implementing BARRIER construct44451
Node: Implementing THREADPRIVATE construct44720
Node: Implementing PRIVATE clause45372
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses45953
Node: Implementing REDUCTION clause47277
Node: Implementing PARALLEL construct47834
Node: Implementing FOR construct49091
Node: Implementing ORDERED construct51089
Node: Implementing SECTIONS construct51395
Node: Implementing SINGLE construct52161
Node: Reporting Bugs52823
Node: Copying53133
Node: GNU Free Documentation License90698
Node: Funding115840
Node: Library Index118365
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@initial import of GCC 4.5.3 sources.  changes since 4.1 are way too numerous
to review, please see http://gcc.gnu.org/gcc-4.5/changes.html (and the 4.2,
4.3 and 4.4 versions, too.)

this includes the core, c++, objc and the non java/ada/fortran parts of the
testsuite.
@
text
@@


1.1.1.1.8.1
log
@Resync to 2012-11-19 00:00:00 UTC
@
text
@d2 1
a2 1
/space/rguenther/gcc-4.5.4/gcc-4.5.4/libgomp/libgomp.texi.
@


1.1.1.1.8.2
log
@Rebase to HEAD as of a few days ago.
@
text
@d2 1
a2 1
/space/rguenther/gcc-4.8.3/gcc-4.8.3/libgomp/libgomp.texi.
d4 1
a4 1
Copyright (C) 2006-2013 Free Software Foundation, Inc.
d7 1
a7 1
under the terms of the GNU Free Documentation License, Version 1.3 or
d35 1
a35 1
   Copyright (C) 2006-2013 Free Software Foundation, Inc.
d38 1
a38 1
under the terms of the GNU Free Documentation License, Version 1.3 or
d81 1
a81 1
* Library Index::              Index of this documentation.
d99 1
a99 1
(http://www.openmp.org) manual, version 3.1.
d108 1
a108 1
OpenMP specifications in version 3.1. The routines are structured in
d119 2
a120 2
* omp_get_max_active_levels::   Maximum number of active regions
* omp_get_max_threads::         Maximum number of threads of parallel region
d126 1
a126 1
* omp_get_thread_limit::        Maximum number of threads
a128 1
* omp_in_final::                Whether in final or included task region
d168 1
a168 1
     _Prototype_:  `int omp_get_active_level(void);'
d171 1
a171 1
     _Interface_:  `integer function omp_get_active_level()'
d178 1
a178 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d197 1
a197 1
     _Interface_:  `integer function omp_get_ancestor_thread_num(level)'
d205 1
a205 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d224 1
a224 1
     _Prototype_:  `int omp_get_dynamic(void);'
d233 1
a233 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.8.
d246 1
a246 1
     _Prototype_:  `int omp_get_level(void);'
d249 1
a249 1
     _Interface_:  `integer function omp_level()'
d255 1
a255 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d261 1
a261 1
2.5 `omp_get_max_active_levels' - Maximum number of active regions
d265 2
a266 2
     This function obtains the maximum allowed number of nested, active
     parallel regions.
d269 1
a269 1
     _Prototype_:  `int omp_get_max_active_levels(void);'
d272 1
a272 1
     _Interface_:  `integer function omp_get_max_active_levels()'
d278 2
a279 2
     OpenMP specifications v3.1 (http://www.openmp.org/), section
     3.2.15.
d284 1
a284 1
2.6 `omp_get_max_threads' - Maximum number of threads of parallel region
d288 1
a288 1
     Return the maximum number of threads used for the current parallel
d292 1
a292 1
     _Prototype_:  `int omp_get_max_threads(void);'
d302 1
a302 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.3.
d321 1
a321 1
     _Prototype_:  `int omp_get_nested(void);'
d324 1
a324 1
     _Interface_:  `logical function omp_get_nested()'
d330 1
a330 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d343 1
a343 1
     _Prototype_:  `int omp_get_num_procs(void);'
d349 1
a349 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.5.
d358 2
a359 2
     Returns the number of threads in the current team. In a sequential
     section of the program `omp_get_num_threads' returns 1.
d369 1
a369 1
     _Prototype_:  `int omp_get_num_threads(void);'
d379 1
a379 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.2.
d388 1
a388 1
     Obtain the runtime scheduling method. The KIND argument will be
d390 2
a391 2
     `omp_sched_guided' or `omp_sched_auto'. The second argument,
     MODIFIER, is set to the chunk size.
d394 1
a394 1
     _Prototype_:  `void omp_schedule(omp_sched_t *kind, int *modifier);'
d405 1
a405 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d417 3
a419 3
     values of LEVEL outside zero to `omp_get_level', -1 is returned;
     if LEVEL is zero, 1 is returned, and for `omp_get_level', the
     result is identical to `omp_get_num_threads'.
d422 1
a422 1
     _Prototype_:  `int omp_get_team_size(int level);'
d433 1
a433 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d439 1
a439 1
2.12 `omp_get_thread_limit' - Maximum number of threads
d443 1
a443 1
     Return the maximum number of threads of the program.
d446 1
a446 1
     _Prototype_:  `int omp_get_thread_limit(void);'
d455 1
a455 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d465 5
a469 5
     Returns a unique thread identification number within the current
     team.  In a sequential parts of the program, `omp_get_thread_num'
     always returns 0. In parallel regions the return value varies from
     0 to `omp_get_num_threads'-1 inclusive. The return value of the
     master thread of a team is always 0.
d472 1
a472 1
     _Prototype_:  `int omp_get_thread_num(void);'
d481 1
a481 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.4.
d484 1
a484 1
File: libgomp.info,  Node: omp_in_parallel,  Next: omp_in_final,  Prev: omp_get_thread_num,  Up: Runtime Library Routines
d495 1
a495 1
     _Prototype_:  `int omp_in_parallel(void);'
d501 1
a501 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.6.
d504 1
a504 12
File: libgomp.info,  Node: omp_in_final,  Next: omp_set_dynamic,  Prev: omp_in_parallel,  Up: Runtime Library Routines

2.15 `omp_in_final' - Whether in final or included task region
==============================================================

_Description_:
     This function returns `true' if currently running in a final or
     included task region, `false' otherwise. Here, `true' and `false'
     represent their language-specific counterparts.

_C/C++_:
     _Prototype_:  `int omp_in_final(void);'
d506 1
a506 11
_Fortran_:
     _Interface_:  `logical function omp_in_final()'

_Reference_:
     OpenMP specifications v3.1 (http://www.openmp.org/), section
     3.2.20.


File: libgomp.info,  Node: omp_set_dynamic,  Next: omp_set_max_active_levels,  Prev: omp_in_final,  Up: Runtime Library Routines

2.16 `omp_set_dynamic' - Enable/disable dynamic teams
d516 1
a516 1
     _Prototype_:  `void omp_set_dynamic(int set);'
d520 1
a520 1
                   `logical, intent(in) :: set'
d526 1
a526 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.7.
d531 1
a531 1
2.17 `omp_set_max_active_levels' - Limits the number of active parallel regions
d535 2
a536 2
     This function limits the maximum allowed number of nested, active
     parallel regions.
d539 1
a539 1
     _Prototype_:  `void omp_set_max_active_levels(int max_levels);'
d542 1
a542 1
     _Interface_:  `subroutine omp_set_max_active_levels(max_levels)'
d549 1
a549 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d555 1
a555 1
2.18 `omp_set_nested' - Enable/disable nested parallel regions
d565 1
a565 1
     _Prototype_:  `void omp_set_nested(int set);'
d568 2
a569 2
     _Interface_:  `subroutine omp_set_nested(set)'
                   `logical, intent(in) :: set'
d575 1
a575 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.9.
d580 1
a580 1
2.19 `omp_set_num_threads' - Set upper team size limit
d589 1
a589 1
     _Prototype_:  `void omp_set_num_threads(int n);'
d592 2
a593 2
     _Interface_:  `subroutine omp_set_num_threads(n)'
                   `integer, intent(in) :: n'
d600 1
a600 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.1.
d605 1
a605 1
2.20 `omp_set_schedule' - Set the runtime scheduling method
d610 1
a610 1
     value `omp_sched_static', `omp_sched_dynamic', `omp_sched_guided'
d612 1
a612 1
     is set to the value of MODIFIER if positive, or to the default
d617 1
a617 2
     _Prototype_:  `void omp_set_schedule(omp_sched_t *kind, int
                   *modifier);'
d620 1
a620 1
     _Interface_:  `subroutine omp_set_schedule(kind, modifier)'
d628 1
a628 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d634 1
a634 1
2.21 `omp_init_lock' - Initialize simple lock
d638 1
a638 1
     Initialize a simple lock.  After initialization, the lock is in an
d652 1
a652 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.1.
d657 1
a657 1
2.22 `omp_set_lock' - Wait for and set simple lock
d671 1
a671 1
                   `integer(omp_lock_kind), intent(inout) :: lock'
d678 1
a678 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.3.
d683 1
a683 1
2.23 `omp_test_lock' - Test and set simple lock if available
d697 3
a699 2
     _Interface_:  `logical function omp_test_lock(lock)'
                   `integer(omp_lock_kind), intent(inout) :: lock'
d705 1
a705 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.5.
d710 1
a710 1
2.24 `omp_unset_lock' - Unset simple lock
d717 2
a718 2
     lock becomes unlocked. If one or more threads attempted to set the
     lock before, one of them is chosen to, again, set the lock to
d726 1
a726 1
                   `integer(omp_lock_kind), intent(inout) :: lock'
d732 1
a732 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.4.
d737 1
a737 1
2.25 `omp_destroy_lock' - Destroy simple lock
d745 1
a745 1
     _Prototype_:  `void omp_destroy_lock(omp_lock_t *lock);'
d755 1
a755 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.2.
d760 1
a760 1
2.26 `omp_init_nest_lock' - Initialize nested lock
d764 1
a764 1
     Initialize a nested lock.  After initialization, the lock is in an
d778 1
a778 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.1.
d783 1
a783 1
2.27 `omp_set_nest_lock' - Wait for and set nested lock
d790 1
a790 1
     current thread, the nesting count for the lock is incremented.
d797 1
a797 1
                   `integer(omp_nest_lock_kind), intent(inout) :: lock'
d803 1
a803 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.3.
d808 1
a808 1
2.28 `omp_test_nest_lock' - Test and set nested lock if available
d823 2
a824 1
     _Interface_:  `logical function omp_test_nest_lock(lock)'
d831 1
a831 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.5.
d836 1
a836 1
2.29 `omp_unset_nest_lock' - Unset nested lock
d845 1
a845 1
     the lock before, one of them is chosen to, again, set the lock to
d853 1
a853 1
                   `integer(omp_nest_lock_kind), intent(inout) :: lock'
d859 1
a859 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.4.
d864 1
a864 1
2.30 `omp_destroy_nest_lock' - Destroy nested lock
d883 1
a883 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.2.
d888 1
a888 1
2.31 `omp_get_wtick' - Get timer precision
d896 1
a896 1
     _Prototype_:  `double omp_get_wtick(void);'
d905 1
a905 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.4.2.
d910 1
a910 1
2.32 `omp_get_wtime' - Elapsed wall clock time
d915 4
a918 4
     thread, no guarantee can be made that two distinct threads measure
     the same time.  Time is measured from some "time in the past",
     which is an arbitrary time guaranteed not to change during the
     execution of the program.
d921 1
a921 1
     _Prototype_:  `double omp_get_wtime(void);'
d930 1
a930 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.4.1.
d941 1
a941 1
specifications in version 3.1, while `GOMP_CPU_AFFINITY' and
d947 1
a947 1
* OMP_MAX_ACTIVE_LEVELS:: Set the maximum number of nested parallel regions
d952 1
a952 1
* OMP_THREAD_LIMIT::      Set the maximum number of threads
a953 1
* OMP_PROC_BIND::         Whether theads may be moved between CPUs
d973 1
a973 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 4.3
d978 1
a978 1
3.2 `OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d982 2
a983 2
     Specifies the initial value for the maximum number of nested
     parallel regions. The value of this variable shall be a positive
d990 1
a990 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 4.8
d1008 1
a1008 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 4.5
d1018 2
a1019 4
     regions. The value of this variable shall be a comma-separated
     list of positive integers; the value specified the number of
     threads to use for the corresponding nested level. If undefined
     one thread per CPU is used.
d1025 1
a1025 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 4.2
d1044 1
a1044 1
     OpenMP specifications v3.1 (http://www.openmp.org/), sections
d1058 3
a1060 3
     of bytes as an argument. If the stack size cannot be set due to
     system constraints, an error is reported and the initial stack
     size is left unchanged. If undefined, the stack size is system
d1064 1
a1064 1
     OpenMP specifications v3.1 (http://www.openmp.org/), sections 4.6
d1069 1
a1069 1
3.7 `OMP_THREAD_LIMIT' - Set the maximum number of threads
d1074 1
a1074 1
     value of this variable shall be a positive integer. If undefined,
d1081 1
a1081 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 4.9
d1084 1
a1084 1
File: libgomp.info,  Node: OMP_WAIT_POLICY,  Next: OMP_PROC_BIND,  Prev: OMP_THREAD_LIMIT,  Up: Environment Variables
d1096 1
a1096 1
     OpenMP specifications v3.1 (http://www.openmp.org/), sections 4.7
d1099 1
a1099 1
File: libgomp.info,  Node: OMP_PROC_BIND,  Next: GOMP_CPU_AFFINITY,  Prev: OMP_WAIT_POLICY,  Up: Environment Variables
d1101 2
a1102 19
3.9 `OMP_PROC_BIND' - Whether theads may be moved between CPUs
==============================================================

_Description_:
     Specifies whether threads may be moved between processors. If set
     to `true', OpenMP theads should not be moved, if set to `false'
     they may be moved.

_See also_:
     *note GOMP_CPU_AFFINITY::

_Reference_:
     OpenMP specifications v3.1 (http://www.openmp.org/), sections 4.4


File: libgomp.info,  Node: GOMP_CPU_AFFINITY,  Next: GOMP_STACKSIZE,  Prev: OMP_PROC_BIND,  Up: Environment Variables

3.10 `GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
========================================================
d1106 9
a1114 10
     space-separated or comma-separated list of CPUs. This list may
     contain different kinds of entries: either single CPU numbers in
     any order, a range of CPUs (M-N) or a range with some stride
     (M-N:S).  CPU numbers are zero based. For example,
     `GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
     to CPU 0, the second to CPU 3, the third to CPU 1, the fourth to
     CPU 2, the fifth to CPU 4, the sixth through tenth to CPUs 6, 8,
     10, 12, and 14 respectively and then start assigning back from the
     beginning of the list.  `GOMP_CPU_AFFINITY=0' binds all threads to
     CPU 0.
a1126 3
_See also_:
     *note OMP_PROC_BIND::

d1130 1
a1130 1
3.11 `GOMP_STACKSIZE' - Set default thread stack size
d1136 2
a1137 2
     an argument. If the stack size cannot be set due to system
     constraints, an error is reported and the initial stack size is
d1141 1
a1141 1
     *note OMP_STACKSIZE::
d1156 1
a1156 1
by libgomp.  Only maintainers should need them.
d1185 2
a1186 2
only include this in the version run by the master thread.  Surely this
is not worthwhile though...
d1208 1
a1208 1
state, and so we wouldn't need to initialize this at startup.
d1277 5
a1281 5
This seems simple enough for PARALLEL blocks.  Create a private struct
for communicating between the parent and subfunction.  In the parent,
copy in values for scalar and "small" structs; copy in addresses for
others TREE_ADDRESSABLE types.  In the subfunction, copy the value into
the local variable.
d1283 2
a1284 2
   It is not clear what to do with bare FOR or SECTION blocks.  The
only thing I can figure is that we do something like:
d1318 1
a1318 1
and after the barrier, the master thread iterates over the array to
d1410 1
a1410 1
   Note that while it looks like there is trickiness to propagating a
d1515 1
a1515 1
(http://gcc.gnu.org/bugzilla/).  For all cases, please add "openmp" to
d1521 1
a1521 1
GNU General Public License
d1524 1
a1524 1
                        Version 3, 29 June 2007
d1526 2
a1527 1
     Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/'
d1529 2
a1530 2
     Everyone is permitted to copy and distribute verbatim copies of this
     license document, but changing it is not allowed.
d1535 8
a1542 10
The GNU General Public License is a free, copyleft license for software
and other kinds of works.

   The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program-to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
d1548 8
a1555 8
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

   To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you
have certain responsibilities if you distribute copies of the software,
or if you modify it: responsibilities to respect the freedom of others.
d1558 21
a1578 33
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

   Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

   For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

   Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the
manufacturer can do so.  This is fundamentally incompatible with the
aim of protecting users' freedom to change the software.  The
systematic pattern of such abuse occurs in the area of products for
individuals to use, which is precisely where it is most unacceptable.
Therefore, we have designed this version of the GPL to prohibit the
practice for those products.  If such problems arise substantially in
other domains, we stand ready to extend this provision to those domains
in future versions of the GPL, as needed to protect the freedom of
users.

   Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
d1583 116
a1698 2
TERMS AND CONDITIONS
====================
d1700 28
a1727 498
  0. Definitions.

     "This License" refers to version 3 of the GNU General Public
     License.

     "Copyright" also means copyright-like laws that apply to other
     kinds of works, such as semiconductor masks.

     "The Program" refers to any copyrightable work licensed under this
     License.  Each licensee is addressed as "you".  "Licensees" and
     "recipients" may be individuals or organizations.

     To "modify" a work means to copy from or adapt all or part of the
     work in a fashion requiring copyright permission, other than the
     making of an exact copy.  The resulting work is called a "modified
     version" of the earlier work or a work "based on" the earlier work.

     A "covered work" means either the unmodified Program or a work
     based on the Program.

     To "propagate" a work means to do anything with it that, without
     permission, would make you directly or secondarily liable for
     infringement under applicable copyright law, except executing it
     on a computer or modifying a private copy.  Propagation includes
     copying, distribution (with or without modification), making
     available to the public, and in some countries other activities as
     well.

     To "convey" a work means any kind of propagation that enables other
     parties to make or receive copies.  Mere interaction with a user
     through a computer network, with no transfer of a copy, is not
     conveying.

     An interactive user interface displays "Appropriate Legal Notices"
     to the extent that it includes a convenient and prominently visible
     feature that (1) displays an appropriate copyright notice, and (2)
     tells the user that there is no warranty for the work (except to
     the extent that warranties are provided), that licensees may
     convey the work under this License, and how to view a copy of this
     License.  If the interface presents a list of user commands or
     options, such as a menu, a prominent item in the list meets this
     criterion.

  1. Source Code.

     The "source code" for a work means the preferred form of the work
     for making modifications to it.  "Object code" means any
     non-source form of a work.

     A "Standard Interface" means an interface that either is an
     official standard defined by a recognized standards body, or, in
     the case of interfaces specified for a particular programming
     language, one that is widely used among developers working in that
     language.

     The "System Libraries" of an executable work include anything,
     other than the work as a whole, that (a) is included in the normal
     form of packaging a Major Component, but which is not part of that
     Major Component, and (b) serves only to enable use of the work
     with that Major Component, or to implement a Standard Interface
     for which an implementation is available to the public in source
     code form.  A "Major Component", in this context, means a major
     essential component (kernel, window system, and so on) of the
     specific operating system (if any) on which the executable work
     runs, or a compiler used to produce the work, or an object code
     interpreter used to run it.

     The "Corresponding Source" for a work in object code form means all
     the source code needed to generate, install, and (for an executable
     work) run the object code and to modify the work, including
     scripts to control those activities.  However, it does not include
     the work's System Libraries, or general-purpose tools or generally
     available free programs which are used unmodified in performing
     those activities but which are not part of the work.  For example,
     Corresponding Source includes interface definition files
     associated with source files for the work, and the source code for
     shared libraries and dynamically linked subprograms that the work
     is specifically designed to require, such as by intimate data
     communication or control flow between those subprograms and other
     parts of the work.

     The Corresponding Source need not include anything that users can
     regenerate automatically from other parts of the Corresponding
     Source.

     The Corresponding Source for a work in source code form is that
     same work.

  2. Basic Permissions.

     All rights granted under this License are granted for the term of
     copyright on the Program, and are irrevocable provided the stated
     conditions are met.  This License explicitly affirms your unlimited
     permission to run the unmodified Program.  The output from running
     a covered work is covered by this License only if the output,
     given its content, constitutes a covered work.  This License
     acknowledges your rights of fair use or other equivalent, as
     provided by copyright law.

     You may make, run and propagate covered works that you do not
     convey, without conditions so long as your license otherwise
     remains in force.  You may convey covered works to others for the
     sole purpose of having them make modifications exclusively for
     you, or provide you with facilities for running those works,
     provided that you comply with the terms of this License in
     conveying all material for which you do not control copyright.
     Those thus making or running the covered works for you must do so
     exclusively on your behalf, under your direction and control, on
     terms that prohibit them from making any copies of your
     copyrighted material outside their relationship with you.

     Conveying under any other circumstances is permitted solely under
     the conditions stated below.  Sublicensing is not allowed; section
     10 makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

     No covered work shall be deemed part of an effective technological
     measure under any applicable law fulfilling obligations under
     article 11 of the WIPO copyright treaty adopted on 20 December
     1996, or similar laws prohibiting or restricting circumvention of
     such measures.

     When you convey a covered work, you waive any legal power to forbid
     circumvention of technological measures to the extent such
     circumvention is effected by exercising rights under this License
     with respect to the covered work, and you disclaim any intention
     to limit operation or modification of the work as a means of
     enforcing, against the work's users, your or third parties' legal
     rights to forbid circumvention of technological measures.

  4. Conveying Verbatim Copies.

     You may convey verbatim copies of the Program's source code as you
     receive it, in any medium, provided that you conspicuously and
     appropriately publish on each copy an appropriate copyright notice;
     keep intact all notices stating that this License and any
     non-permissive terms added in accord with section 7 apply to the
     code; keep intact all notices of the absence of any warranty; and
     give all recipients a copy of this License along with the Program.

     You may charge any price or no price for each copy that you convey,
     and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

     You may convey a work based on the Program, or the modifications to
     produce it from the Program, in the form of source code under the
     terms of section 4, provided that you also meet all of these
     conditions:

       a. The work must carry prominent notices stating that you
          modified it, and giving a relevant date.

       b. The work must carry prominent notices stating that it is
          released under this License and any conditions added under
          section 7.  This requirement modifies the requirement in
          section 4 to "keep intact all notices".

       c. You must license the entire work, as a whole, under this
          License to anyone who comes into possession of a copy.  This
          License will therefore apply, along with any applicable
          section 7 additional terms, to the whole of the work, and all
          its parts, regardless of how they are packaged.  This License
          gives no permission to license the work in any other way, but
          it does not invalidate such permission if you have separately
          received it.

       d. If the work has interactive user interfaces, each must display
          Appropriate Legal Notices; however, if the Program has
          interactive interfaces that do not display Appropriate Legal
          Notices, your work need not make them do so.

     A compilation of a covered work with other separate and independent
     works, which are not by their nature extensions of the covered
     work, and which are not combined with it such as to form a larger
     program, in or on a volume of a storage or distribution medium, is
     called an "aggregate" if the compilation and its resulting
     copyright are not used to limit the access or legal rights of the
     compilation's users beyond what the individual works permit.
     Inclusion of a covered work in an aggregate does not cause this
     License to apply to the other parts of the aggregate.

  6. Conveying Non-Source Forms.

     You may convey a covered work in object code form under the terms
     of sections 4 and 5, provided that you also convey the
     machine-readable Corresponding Source under the terms of this
     License, in one of these ways:

       a. Convey the object code in, or embodied in, a physical product
          (including a physical distribution medium), accompanied by the
          Corresponding Source fixed on a durable physical medium
          customarily used for software interchange.

       b. Convey the object code in, or embodied in, a physical product
          (including a physical distribution medium), accompanied by a
          written offer, valid for at least three years and valid for
          as long as you offer spare parts or customer support for that
          product model, to give anyone who possesses the object code
          either (1) a copy of the Corresponding Source for all the
          software in the product that is covered by this License, on a
          durable physical medium customarily used for software
          interchange, for a price no more than your reasonable cost of
          physically performing this conveying of source, or (2) access
          to copy the Corresponding Source from a network server at no
          charge.

       c. Convey individual copies of the object code with a copy of
          the written offer to provide the Corresponding Source.  This
          alternative is allowed only occasionally and noncommercially,
          and only if you received the object code with such an offer,
          in accord with subsection 6b.

       d. Convey the object code by offering access from a designated
          place (gratis or for a charge), and offer equivalent access
          to the Corresponding Source in the same way through the same
          place at no further charge.  You need not require recipients
          to copy the Corresponding Source along with the object code.
          If the place to copy the object code is a network server, the
          Corresponding Source may be on a different server (operated
          by you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to
          the object code saying where to find the Corresponding Source.
          Regardless of what server hosts the Corresponding Source, you
          remain obligated to ensure that it is available for as long
          as needed to satisfy these requirements.

       e. Convey the object code using peer-to-peer transmission,
          provided you inform other peers where the object code and
          Corresponding Source of the work are being offered to the
          general public at no charge under subsection 6d.


     A separable portion of the object code, whose source code is
     excluded from the Corresponding Source as a System Library, need
     not be included in conveying the object code work.

     A "User Product" is either (1) a "consumer product", which means
     any tangible personal property which is normally used for personal,
     family, or household purposes, or (2) anything designed or sold for
     incorporation into a dwelling.  In determining whether a product
     is a consumer product, doubtful cases shall be resolved in favor of
     coverage.  For a particular product received by a particular user,
     "normally used" refers to a typical or common use of that class of
     product, regardless of the status of the particular user or of the
     way in which the particular user actually uses, or expects or is
     expected to use, the product.  A product is a consumer product
     regardless of whether the product has substantial commercial,
     industrial or non-consumer uses, unless such uses represent the
     only significant mode of use of the product.

     "Installation Information" for a User Product means any methods,
     procedures, authorization keys, or other information required to
     install and execute modified versions of a covered work in that
     User Product from a modified version of its Corresponding Source.
     The information must suffice to ensure that the continued
     functioning of the modified object code is in no case prevented or
     interfered with solely because modification has been made.

     If you convey an object code work under this section in, or with,
     or specifically for use in, a User Product, and the conveying
     occurs as part of a transaction in which the right of possession
     and use of the User Product is transferred to the recipient in
     perpetuity or for a fixed term (regardless of how the transaction
     is characterized), the Corresponding Source conveyed under this
     section must be accompanied by the Installation Information.  But
     this requirement does not apply if neither you nor any third party
     retains the ability to install modified object code on the User
     Product (for example, the work has been installed in ROM).

     The requirement to provide Installation Information does not
     include a requirement to continue to provide support service,
     warranty, or updates for a work that has been modified or
     installed by the recipient, or for the User Product in which it
     has been modified or installed.  Access to a network may be denied
     when the modification itself materially and adversely affects the
     operation of the network or violates the rules and protocols for
     communication across the network.

     Corresponding Source conveyed, and Installation Information
     provided, in accord with this section must be in a format that is
     publicly documented (and with an implementation available to the
     public in source code form), and must require no special password
     or key for unpacking, reading or copying.

  7. Additional Terms.

     "Additional permissions" are terms that supplement the terms of
     this License by making exceptions from one or more of its
     conditions.  Additional permissions that are applicable to the
     entire Program shall be treated as though they were included in
     this License, to the extent that they are valid under applicable
     law.  If additional permissions apply only to part of the Program,
     that part may be used separately under those permissions, but the
     entire Program remains governed by this License without regard to
     the additional permissions.

     When you convey a copy of a covered work, you may at your option
     remove any additional permissions from that copy, or from any part
     of it.  (Additional permissions may be written to require their own
     removal in certain cases when you modify the work.)  You may place
     additional permissions on material, added by you to a covered work,
     for which you have or can give appropriate copyright permission.

     Notwithstanding any other provision of this License, for material
     you add to a covered work, you may (if authorized by the copyright
     holders of that material) supplement the terms of this License
     with terms:

       a. Disclaiming warranty or limiting liability differently from
          the terms of sections 15 and 16 of this License; or

       b. Requiring preservation of specified reasonable legal notices
          or author attributions in that material or in the Appropriate
          Legal Notices displayed by works containing it; or

       c. Prohibiting misrepresentation of the origin of that material,
          or requiring that modified versions of such material be
          marked in reasonable ways as different from the original
          version; or

       d. Limiting the use for publicity purposes of names of licensors
          or authors of the material; or

       e. Declining to grant rights under trademark law for use of some
          trade names, trademarks, or service marks; or

       f. Requiring indemnification of licensors and authors of that
          material by anyone who conveys the material (or modified
          versions of it) with contractual assumptions of liability to
          the recipient, for any liability that these contractual
          assumptions directly impose on those licensors and authors.

     All other non-permissive additional terms are considered "further
     restrictions" within the meaning of section 10.  If the Program as
     you received it, or any part of it, contains a notice stating that
     it is governed by this License along with a term that is a further
     restriction, you may remove that term.  If a license document
     contains a further restriction but permits relicensing or
     conveying under this License, you may add to a covered work
     material governed by the terms of that license document, provided
     that the further restriction does not survive such relicensing or
     conveying.

     If you add terms to a covered work in accord with this section, you
     must place, in the relevant source files, a statement of the
     additional terms that apply to those files, or a notice indicating
     where to find the applicable terms.

     Additional terms, permissive or non-permissive, may be stated in
     the form of a separately written license, or stated as exceptions;
     the above requirements apply either way.

  8. Termination.

     You may not propagate or modify a covered work except as expressly
     provided under this License.  Any attempt otherwise to propagate or
     modify it is void, and will automatically terminate your rights
     under this License (including any patent licenses granted under
     the third paragraph of section 11).

     However, if you cease all violation of this License, then your
     license from a particular copyright holder is reinstated (a)
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
     copyright holder fails to notify you of the violation by some
     reasonable means prior to 60 days after the cessation.

     Moreover, your license from a particular copyright holder is
     reinstated permanently if the copyright holder notifies you of the
     violation by some reasonable means, this is the first time you have
     received notice of violation of this License (for any work) from
     that copyright holder, and you cure the violation prior to 30 days
     after your receipt of the notice.

     Termination of your rights under this section does not terminate
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, you do not qualify to receive new
     licenses for the same material under section 10.

  9. Acceptance Not Required for Having Copies.

     You are not required to accept this License in order to receive or
     run a copy of the Program.  Ancillary propagation of a covered work
     occurring solely as a consequence of using peer-to-peer
     transmission to receive a copy likewise does not require
     acceptance.  However, nothing other than this License grants you
     permission to propagate or modify any covered work.  These actions
     infringe copyright if you do not accept this License.  Therefore,
     by modifying or propagating a covered work, you indicate your
     acceptance of this License to do so.

 10. Automatic Licensing of Downstream Recipients.

     Each time you convey a covered work, the recipient automatically
     receives a license from the original licensors, to run, modify and
     propagate that work, subject to this License.  You are not
     responsible for enforcing compliance by third parties with this
     License.

     An "entity transaction" is a transaction transferring control of an
     organization, or substantially all assets of one, or subdividing an
     organization, or merging organizations.  If propagation of a
     covered work results from an entity transaction, each party to that
     transaction who receives a copy of the work also receives whatever
     licenses to the work the party's predecessor in interest had or
     could give under the previous paragraph, plus a right to
     possession of the Corresponding Source of the work from the
     predecessor in interest, if the predecessor has it or can get it
     with reasonable efforts.

     You may not impose any further restrictions on the exercise of the
     rights granted or affirmed under this License.  For example, you
     may not impose a license fee, royalty, or other charge for
     exercise of rights granted under this License, and you may not
     initiate litigation (including a cross-claim or counterclaim in a
     lawsuit) alleging that any patent claim is infringed by making,
     using, selling, offering for sale, or importing the Program or any
     portion of it.

 11. Patents.

     A "contributor" is a copyright holder who authorizes use under this
     License of the Program or a work on which the Program is based.
     The work thus licensed is called the contributor's "contributor
     version".

     A contributor's "essential patent claims" are all patent claims
     owned or controlled by the contributor, whether already acquired or
     hereafter acquired, that would be infringed by some manner,
     permitted by this License, of making, using, or selling its
     contributor version, but do not include claims that would be
     infringed only as a consequence of further modification of the
     contributor version.  For purposes of this definition, "control"
     includes the right to grant patent sublicenses in a manner
     consistent with the requirements of this License.

     Each contributor grants you a non-exclusive, worldwide,
     royalty-free patent license under the contributor's essential
     patent claims, to make, use, sell, offer for sale, import and
     otherwise run, modify and propagate the contents of its
     contributor version.

     In the following three paragraphs, a "patent license" is any
     express agreement or commitment, however denominated, not to
     enforce a patent (such as an express permission to practice a
     patent or covenant not to sue for patent infringement).  To
     "grant" such a patent license to a party means to make such an
     agreement or commitment not to enforce a patent against the party.

     If you convey a covered work, knowingly relying on a patent
     license, and the Corresponding Source of the work is not available
     for anyone to copy, free of charge and under the terms of this
     License, through a publicly available network server or other
     readily accessible means, then you must either (1) cause the
     Corresponding Source to be so available, or (2) arrange to deprive
     yourself of the benefit of the patent license for this particular
     work, or (3) arrange, in a manner consistent with the requirements
     of this License, to extend the patent license to downstream
     recipients.  "Knowingly relying" means you have actual knowledge
     that, but for the patent license, your conveying the covered work
     in a country, or your recipient's use of the covered work in a
     country, would infringe one or more identifiable patents in that
     country that you have reason to believe are valid.

     If, pursuant to or in connection with a single transaction or
     arrangement, you convey, or propagate by procuring conveyance of, a
     covered work, and grant a patent license to some of the parties
     receiving the covered work authorizing them to use, propagate,
     modify or convey a specific copy of the covered work, then the
     patent license you grant is automatically extended to all
     recipients of the covered work and works based on it.

     A patent license is "discriminatory" if it does not include within
     the scope of its coverage, prohibits the exercise of, or is
     conditioned on the non-exercise of one or more of the rights that
     are specifically granted under this License.  You may not convey a
     covered work if you are a party to an arrangement with a third
     party that is in the business of distributing software, under
     which you make payment to the third party based on the extent of
     your activity of conveying the work, and under which the third
     party grants, to any of the parties who would receive the covered
     work from you, a discriminatory patent license (a) in connection
     with copies of the covered work conveyed by you (or copies made
     from those copies), or (b) primarily for and in connection with
     specific products or compilations that contain the covered work,
     unless you entered into that arrangement, or that patent license
     was granted, prior to 28 March 2007.

     Nothing in this License shall be construed as excluding or limiting
     any implied license or other defenses to infringement that may
     otherwise be available to you under applicable patent law.

 12. No Surrender of Others' Freedom.

     If conditions are imposed on you (whether by court order,
d1730 41
a1770 27
     License.  If you cannot convey a covered work so as to satisfy
     simultaneously your obligations under this License and any other
     pertinent obligations, then as a consequence you may not convey it
     at all.  For example, if you agree to terms that obligate you to
     collect a royalty for further conveying from those to whom you
     convey the Program, the only way you could satisfy both those
     terms and this License would be to refrain entirely from conveying
     the Program.

 13. Use with the GNU Affero General Public License.

     Notwithstanding any other provision of this License, you have
     permission to link or combine any covered work with a work licensed
     under version 3 of the GNU Affero General Public License into a
     single combined work, and to convey the resulting work.  The terms
     of this License will continue to apply to the part which is the
     covered work, but the special requirements of the GNU Affero
     General Public License, section 13, concerning interaction through
     a network will apply to the combination as such.

 14. Revised Versions of this License.

     The Free Software Foundation may publish revised and/or new
     versions of the GNU General Public License from time to time.
     Such new versions will be similar in spirit to the present
     version, but may differ in detail to address new problems or
     concerns.
d1773 5
a1777 6
     Program specifies that a certain numbered version of the GNU
     General Public License "or any later version" applies to it, you
     have the option of following the terms and conditions either of
     that numbered version or of any later version published by the
     Free Software Foundation.  If the Program does not specify a
     version number of the GNU General Public License, you may choose
d1780 31
a1810 43
     If the Program specifies that a proxy can decide which future
     versions of the GNU General Public License can be used, that
     proxy's public statement of acceptance of a version permanently
     authorizes you to choose that version for the Program.

     Later license versions may give you additional or different
     permissions.  However, no additional obligations are imposed on any
     author or copyright holder as a result of your choosing to follow a
     later version.

 15. Disclaimer of Warranty.

     THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
     APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE
     COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS"
     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
     INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE
     RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.
     SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
     NECESSARY SERVICING, REPAIR OR CORRECTION.

 16. Limitation of Liability.

     IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
     WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
     FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
     CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
     THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
     BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
     PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
     PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF
     THE POSSIBILITY OF SUCH DAMAGES.

 17. Interpretation of Sections 15 and 16.

     If the disclaimer of warranty and limitation of liability provided
     above cannot be given local legal effect according to their terms,
     reviewing courts shall apply local law that most closely
     approximates an absolute waiver of all civil liability in
     connection with the Program, unless a warranty or assumption of
     liability accompanies a copy of the Program in return for a fee.
d1812 3
a1814 6

END OF TERMS AND CONDITIONS
===========================

How to Apply These Terms to Your New Programs
=============================================
d1823 2
a1824 2
state the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
d1827 1
a1827 1
     Copyright (C) YEAR NAME OF AUTHOR
d1829 1
a1829 1
     This program is free software: you can redistribute it and/or modify
d1831 2
a1832 2
     the Free Software Foundation, either version 3 of the License, or (at
     your option) any later version.
d1834 4
a1837 4
     This program is distributed in the hope that it will be useful, but
     WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     General Public License for more details.
d1840 2
a1841 1
     along with this program.  If not, see `http://www.gnu.org/licenses/'.
d1846 2
a1847 2
   If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
d1849 3
a1851 2
     PROGRAM Copyright (C) YEAR NAME OF AUTHOR
     This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
d1856 4
a1859 3
appropriate parts of the General Public License.  Of course, your
program's commands might be different; for a GUI interface, you would
use an "about box".
d1862 5
a1866 3
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  For more information on this, and how to apply and follow
the GNU GPL, see `http://www.gnu.org/licenses/'.
d1868 4
a1871 1
   The GNU General Public License does not permit incorporating your
d1875 1
a1875 2
GNU Lesser General Public License instead of this License.  But first,
please read `http://www.gnu.org/philosophy/why-not-lgpl.html'.
d1883 1
a1883 1
                     Version 1.3, 3 November 2008
d1885 2
a1886 2
     Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
     `http://fsf.org/'
a1987 3
     The "publisher" means any person or entity that distributes copies
     of the Document to the public.

d2253 6
a2258 23
     except as expressly provided under this License.  Any attempt
     otherwise to copy, modify, sublicense, or distribute it is void,
     and will automatically terminate your rights under this License.

     However, if you cease all violation of this License, then your
     license from a particular copyright holder is reinstated (a)
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
     copyright holder fails to notify you of the violation by some
     reasonable means prior to 60 days after the cessation.

     Moreover, your license from a particular copyright holder is
     reinstated permanently if the copyright holder notifies you of the
     violation by some reasonable means, this is the first time you have
     received notice of violation of this License (for any work) from
     that copyright holder, and you cure the violation prior to 30 days
     after your receipt of the notice.

     Termination of your rights under this section does not terminate
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, receipt of a copy of some or all of
     the same material does not give you any rights to use it.
d2276 1
a2276 35
     Free Software Foundation.  If the Document specifies that a proxy
     can decide which future versions of this License can be used, that
     proxy's public statement of acceptance of a version permanently
     authorizes you to choose that version for the Document.

 11. RELICENSING

     "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
     World Wide Web server that publishes copyrightable works and also
     provides prominent facilities for anybody to edit those works.  A
     public wiki that anybody can edit is an example of such a server.
     A "Massive Multiauthor Collaboration" (or "MMC") contained in the
     site means any set of copyrightable works thus published on the MMC
     site.

     "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
     license published by Creative Commons Corporation, a not-for-profit
     corporation with a principal place of business in San Francisco,
     California, as well as future copyleft versions of that license
     published by that same organization.

     "Incorporate" means to publish or republish a Document, in whole or
     in part, as part of another Document.

     An MMC is "eligible for relicensing" if it is licensed under this
     License, and if all works that were first published under this
     License somewhere other than this MMC, and subsequently
     incorporated in whole or in part into the MMC, (1) had no cover
     texts or invariant sections, and (2) were thus incorporated prior
     to November 1, 2008.

     The operator of an MMC Site may republish an MMC contained in the
     site under CC-BY-SA on the same site at any time before August 1,
     2009, provided the MMC is eligible for relicensing.

d2287 1
a2287 1
       under the terms of the GNU Free Documentation License, Version 1.3
d2310 1
a2310 1
File: libgomp.info,  Node: Funding,  Next: Library Index,  Prev: GNU Free Documentation License,  Up: Top
d2360 1
a2360 1
File: libgomp.info,  Node: Library Index,  Prev: Funding,  Up: Top
d2362 2
a2363 2
Library Index
*************
d2370 7
a2376 8
* Environment Variable <3>:              OMP_PROC_BIND.         (line 6)
* Environment Variable <4>:              OMP_WAIT_POLICY.       (line 6)
* Environment Variable <5>:              OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <6>:              OMP_STACKSIZE.         (line 6)
* Environment Variable <7>:              OMP_SCHEDULE.          (line 6)
* Environment Variable <8>:              OMP_NUM_THREADS.       (line 6)
* Environment Variable <9>:              OMP_NESTED.            (line 6)
* Environment Variable <10>:             OMP_MAX_ACTIVE_LEVELS. (line 6)
d2389 65
a2453 67
Node: Top2039
Node: Enabling OpenMP3233
Node: Runtime Library Routines4018
Node: omp_get_active_level6466
Node: omp_get_ancestor_thread_num7170
Node: omp_get_dynamic8097
Node: omp_get_level8975
Node: omp_get_max_active_levels9599
Node: omp_get_max_threads10302
Node: omp_get_nested11058
Node: omp_get_num_procs11970
Node: omp_get_num_threads12488
Node: omp_get_schedule13570
Node: omp_get_team_size14491
Node: omp_get_thread_limit15453
Node: omp_get_thread_num16076
Node: omp_in_parallel16944
Node: omp_in_final17591
Node: omp_set_dynamic18262
Node: omp_set_max_active_levels19099
Node: omp_set_nested19879
Node: omp_set_num_threads20758
Node: omp_set_schedule21594
Node: omp_init_lock22666
Node: omp_set_lock23317
Node: omp_test_lock24168
Node: omp_unset_lock25139
Node: omp_destroy_lock26065
Node: omp_init_nest_lock26739
Node: omp_set_nest_lock27472
Node: omp_test_nest_lock28383
Node: omp_unset_nest_lock29412
Node: omp_destroy_nest_lock30422
Node: omp_get_wtick31170
Node: omp_get_wtime31761
Node: Environment Variables32535
Node: OMP_DYNAMIC33663
Node: OMP_MAX_ACTIVE_LEVELS34231
Node: OMP_NESTED34870
Node: OMP_NUM_THREADS35474
Node: OMP_SCHEDULE36162
Node: OMP_STACKSIZE36856
Node: OMP_THREAD_LIMIT37682
Node: OMP_WAIT_POLICY38277
Node: OMP_PROC_BIND38838
Node: GOMP_CPU_AFFINITY39396
Node: GOMP_STACKSIZE40937
Node: The libgomp ABI41747
Node: Implementing MASTER construct42546
Node: Implementing CRITICAL construct42960
Node: Implementing ATOMIC construct43699
Node: Implementing FLUSH construct44180
Node: Implementing BARRIER construct44451
Node: Implementing THREADPRIVATE construct44720
Node: Implementing PRIVATE clause45372
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses45953
Node: Implementing REDUCTION clause47277
Node: Implementing PARALLEL construct47834
Node: Implementing FOR construct49091
Node: Implementing ORDERED construct51089
Node: Implementing SECTIONS construct51395
Node: Implementing SINGLE construct52161
Node: Reporting Bugs52823
Node: Copying53133
Node: GNU Free Documentation License90698
Node: Funding115840
Node: Library Index118365
@


1.1.1.1.2.1
log
@sync with head
@
text
@d2 1
a2 1
/space/rguenther/gcc-4.5.4/gcc-4.5.4/libgomp/libgomp.texi.
@


1.1.1.1.2.2
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@@


1.1.1.2
log
@Import of gcc 4.5.4. The (possibly incomplete) list of fixed bugs is

  50617 [4.5/4.6/4.7 Regression] ICE: RTL flag check: INSN_ANNULLED_BRANCH_P used with unexpected rtx code 'simplify_immed_subreg' in output_bb, at config/pa/pa.c:6631
  45383 [4.5 Regression] Implicit conversion to pointer does no longer automatically generate operator== and operator!=.
  45606 [4.5 Regression] match a method prototyped a typedef alias with the original type (using stdlib)
  47398 [4.5 Regression] tree check: accessed elt 10 of tree_vec with 9 elts in tsubst, at cp/pt.c:10500
  49951 [4.5/4.6/4.7 Regression] Debug stepping behavior regarding g++ Class destructor has changed for the worse starting at gcc 4.5.0
  43190 [4.4 Regression] Used pointer typedefs eliminated from debug info
  43866 [4.4 Regression] wrong code with -fbounds-check -funswitch-loops
  43897 [4.4 Regression] IA-64 asm clobbers are ignored
  44777 [4.4 Regression] ICE: SIGSEGV with -fprofile-use in gcc.c-torture/execute/comp-goto-2.c
  46985 [4.5 Regression] ICE: SIGSEGV in is_gimple_min_invariant (gimple.c:2742) with -fno-tree-ccp -fno-tree-dominator-opts -fno-tree-fre
  47780 [4.5 Regression] -fcompare-debug failure with -O -fgcse -fgcse-las -fstack-protector-all
  47858 [4.5/4.6/4.7 Regression] IPA-SRA decreases quality of debug info
  47903 [4.5 Regression] var-tracking.c: valgrind error
  48685 [4.5 Regression] ICE in gimplify_expr, at gimplify.c:7034
  52139 [4.5 Regression] ICE: in remove_insn, at emit-rtl.c:3960 with -O -fPIC -fno-tree-dominator-opts -fno-tree-fre
  48046 [4.5 Regression] Expected diagnostic "reference to 'type' is ambiguous" not given for function-local static declaration
  51406 [4.5/4.6/4.7 Regression][c++0x] Incorrect result of static_cast to rvalue reference to base class.
  43949 [4.4 Regression] bogus warning: array subscript is above array bounds
  45982 [4.4 Regression] PTA does not track integers
  48172 [4.5 Regression] incorrect vectorization of loop in GCC 4.5.* with -O3
  49115 [4.5 Regression] invalid return value optimization (?) when exception is thrown and caught
  49279 [4.5 Regression] Optimization incorrectly presuming constant variable inside loop in g++ 4.5 and 4.6 with -O2 and -O3 for x86_64 targets
  50189 [4.5 Regression] Wrong code error in -O2 [-fstrict-enums] compile, target independent
  48660 [4.5/4.6 Regression] ARM ICE in expand_expr_real_1
  23656 Cross-compilation with newlib fails in libiberty
  37985 [4.5/4.6/4.7/4.8 Regression] unsigned char shift lacks "statement with no effect" warning
  38292 [4.5/4.6/4.7/4.8 Regression] corrupted profile info with -O[23] -fprofile-use
  40778 [4.5 Regression] Mudflap instrumentation missing in cloned function.
  40992 [4.4 Regression] cunroll ignoring asm size
  48306 [4.4 Regression] presence of gcc subdir with . in PATH causes breakdown
  49651 [4.4 Regression] nested lambdas and -O3 produced incorrect integer variable increments
  52223 [4.5/4.6 Regression] libffi's man page install breaks with multilibs and overridden mandir
  53418 [4.5 Regression] ICE at gimplify.c:7773
  53138 [4.7 Regression] spaceship operator miscompiled
  50091 [4.5/4.6/4.7 Regression] -fstack-check generates wrong assembly
  50979 architecture mismatch: "mul32" not enabled for "smul" or "umul"
  51187 miscompilation of genrecog.c at -O2 for --target=avr
  52717 thunk referenced in discarded section when building samba with -flto
  48742 [4.5 Regression] Internal error in gimplify_expr
  49120 [4.5 Regression] bogus "value computed is not used" warning (variable-length array in compound statement)
  49161 [4.5 Regression] Fix VRP on switch stmts
  49619 [4.5 Regression] ICE in simplify_subreg, at simplify-rtx.c:5362
  49621 [4.5 regression] ICE in trunc_int_for_mode, at explow.c:57
  49644 [4.5 Regression] post-increment of promoted operand is incorrect.
  51767 [4.5 Regression] ICE with degenerated asm goto
  51768 [4.5 Regression] ICE with invalid asm goto
  52736 [4.5/4.6/4.7/4.8 Regression] miscompilation: store to aliased __m128d is 8 Bytes off
  49440 [4.6 regression] Invalid dynamic_cast for unnamed namespace
  50565 [4.5/4.6/4.7 Regression] initializer element is not computable at load time
  52294 [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9
  41159 [LTO] ICE in insert_value_copy_on_edge, at tree-outof-ssa.c:225
  48822 [4.5 Regression] G++ gets stucks and never finishes compilation when enabling -O2/3 optimization options.
  50162 [4.5 Regression] Wrong vectorization
  49381 Unresolved symbols in libgcjgc.a when linking gctest
  45786 [4.5 Regression] Relational operators .eq. and == are not recognized as equivalent
  48708 Invalid V2DI vector set insn generated
  50464 Using -Ofast -march=bdver1 results in internal compiler error: in extract_insn, at recog.c:2109
  51821 [4.5/4.6/4.7 Regression] 64bit > 32bit conversion produces incorrect results with optimizations
  52698 -maddress-mode=long doesn't work
  53228 [4.6/4.7/4.8 Regression] target attributes in libcpp/lex.c cause illegal instructions to be used elsewhere
  42082 [C++0x] ICE on probably invalid with "canonical types differ for identical types"
  42652 vectorizer created unaligned vector insns
  42856 [4.4 Regression] FAIL: gcc.dg/torture/pr41555.c -O0 (test for excess errors)
  47733 psignal (int, const? char*) in libiberty/strsignal.h
  48743 -march=native mis-detects AMD K6-2+ / K6-3 as Athlon - compiled C fails with "illegal instruction"
  49038 [4.5/4.6/4.7 Regression] -ftree-vectorise introduces reads past end of array
  49448 arm-tab-linux-gnu-eabi enableds big endian when it should not
  49461 boehm-gc and gcj incompatible with pie
  50875 O3 and -mavx lead to internal compiler error: in find_reloads
  51161 [C++0x] Illegal static_cast to rvalue reference to ambiguous base class
  51393 Wrong parameter type for _mm256_insert_epi64 in avxintrin.h
  51444 [4.4 Regression]: Spurious "is used uninitialized" warning for structure with bitfields
  51835 ARM EABI violation when passing arguments to helper floating functions like __aeabi_d2iz
  52894 [4.5,4.6,4.7 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert
  53310 [4.5/4.6/4.7/4.8 Regression] EOSHIFT leaks memory
  53744 gcov version oscillates between 407* and 407p on branches
  52335 [4.4/4.5/4.6/4.7 Regression] I/O: -std=f95 rejects valid DELIM= in OPEN
  46192 [4.5/4.6/4.7 regression] wrong code for renaming of volatile packed array with address clause
  44581 [4.5/4.6/4.7 Regression] internal compiler error: in simplify_subreg
  49307 [4.5/4.6/4.7 Regression] ICE in spill_failure, at reload1.c:2113
  50163 [4.4/4.5/4.6/4.7 Regression] ICE: initialization expression
  50273 [4.5/4.6/4.7 Regression] -Walign-commons no longer effective
  52022 [4.5/4.6/4.7 Regression] Wrong-code with procedures passed as actual argument
  52452 [4.5/4.6/4.7/4.8 Regression] INTRINSIC cannot be applied to gfortran's ETIME
  25973 [4.5/4.6/4.7/4.8 Regression] Wrong warning: control reaches end of non-void function
  53521 [4.5/4.6/4.7/4.8 Regression] Memory leak with zero-sized array constructor
@
text
@d2 1
a2 1
/space/rguenther/gcc-4.5.4/gcc-4.5.4/libgomp/libgomp.texi.
@


1.1.1.3
log
@Import gcc 4.8.3 which has 98 bugs fixed on gcc-4-8-3-pre-r208254
@
text
@d2 1
a2 1
/space/rguenther/gcc-4.8.3/gcc-4.8.3/libgomp/libgomp.texi.
d4 1
a4 1
Copyright (C) 2006-2013 Free Software Foundation, Inc.
d7 1
a7 1
under the terms of the GNU Free Documentation License, Version 1.3 or
d35 1
a35 1
   Copyright (C) 2006-2013 Free Software Foundation, Inc.
d38 1
a38 1
under the terms of the GNU Free Documentation License, Version 1.3 or
d81 1
a81 1
* Library Index::              Index of this documentation.
d99 1
a99 1
(http://www.openmp.org) manual, version 3.1.
d108 1
a108 1
OpenMP specifications in version 3.1. The routines are structured in
d119 2
a120 2
* omp_get_max_active_levels::   Maximum number of active regions
* omp_get_max_threads::         Maximum number of threads of parallel region
d126 1
a126 1
* omp_get_thread_limit::        Maximum number of threads
a128 1
* omp_in_final::                Whether in final or included task region
d168 1
a168 1
     _Prototype_:  `int omp_get_active_level(void);'
d171 1
a171 1
     _Interface_:  `integer function omp_get_active_level()'
d178 1
a178 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d197 1
a197 1
     _Interface_:  `integer function omp_get_ancestor_thread_num(level)'
d205 1
a205 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d224 1
a224 1
     _Prototype_:  `int omp_get_dynamic(void);'
d233 1
a233 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.8.
d246 1
a246 1
     _Prototype_:  `int omp_get_level(void);'
d249 1
a249 1
     _Interface_:  `integer function omp_level()'
d255 1
a255 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d261 1
a261 1
2.5 `omp_get_max_active_levels' - Maximum number of active regions
d265 2
a266 2
     This function obtains the maximum allowed number of nested, active
     parallel regions.
d269 1
a269 1
     _Prototype_:  `int omp_get_max_active_levels(void);'
d272 1
a272 1
     _Interface_:  `integer function omp_get_max_active_levels()'
d278 2
a279 2
     OpenMP specifications v3.1 (http://www.openmp.org/), section
     3.2.15.
d284 1
a284 1
2.6 `omp_get_max_threads' - Maximum number of threads of parallel region
d288 1
a288 1
     Return the maximum number of threads used for the current parallel
d292 1
a292 1
     _Prototype_:  `int omp_get_max_threads(void);'
d302 1
a302 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.3.
d321 1
a321 1
     _Prototype_:  `int omp_get_nested(void);'
d324 1
a324 1
     _Interface_:  `logical function omp_get_nested()'
d330 1
a330 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d343 1
a343 1
     _Prototype_:  `int omp_get_num_procs(void);'
d349 1
a349 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.5.
d358 2
a359 2
     Returns the number of threads in the current team. In a sequential
     section of the program `omp_get_num_threads' returns 1.
d369 1
a369 1
     _Prototype_:  `int omp_get_num_threads(void);'
d379 1
a379 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.2.
d388 1
a388 1
     Obtain the runtime scheduling method. The KIND argument will be
d390 2
a391 2
     `omp_sched_guided' or `omp_sched_auto'. The second argument,
     MODIFIER, is set to the chunk size.
d394 1
a394 1
     _Prototype_:  `void omp_schedule(omp_sched_t *kind, int *modifier);'
d405 1
a405 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d417 3
a419 3
     values of LEVEL outside zero to `omp_get_level', -1 is returned;
     if LEVEL is zero, 1 is returned, and for `omp_get_level', the
     result is identical to `omp_get_num_threads'.
d422 1
a422 1
     _Prototype_:  `int omp_get_team_size(int level);'
d433 1
a433 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d439 1
a439 1
2.12 `omp_get_thread_limit' - Maximum number of threads
d443 1
a443 1
     Return the maximum number of threads of the program.
d446 1
a446 1
     _Prototype_:  `int omp_get_thread_limit(void);'
d455 1
a455 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d465 5
a469 5
     Returns a unique thread identification number within the current
     team.  In a sequential parts of the program, `omp_get_thread_num'
     always returns 0. In parallel regions the return value varies from
     0 to `omp_get_num_threads'-1 inclusive. The return value of the
     master thread of a team is always 0.
d472 1
a472 1
     _Prototype_:  `int omp_get_thread_num(void);'
d481 1
a481 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.4.
d484 1
a484 1
File: libgomp.info,  Node: omp_in_parallel,  Next: omp_in_final,  Prev: omp_get_thread_num,  Up: Runtime Library Routines
d495 1
a495 1
     _Prototype_:  `int omp_in_parallel(void);'
d501 1
a501 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.6.
d504 1
a504 12
File: libgomp.info,  Node: omp_in_final,  Next: omp_set_dynamic,  Prev: omp_in_parallel,  Up: Runtime Library Routines

2.15 `omp_in_final' - Whether in final or included task region
==============================================================

_Description_:
     This function returns `true' if currently running in a final or
     included task region, `false' otherwise. Here, `true' and `false'
     represent their language-specific counterparts.

_C/C++_:
     _Prototype_:  `int omp_in_final(void);'
d506 1
a506 11
_Fortran_:
     _Interface_:  `logical function omp_in_final()'

_Reference_:
     OpenMP specifications v3.1 (http://www.openmp.org/), section
     3.2.20.


File: libgomp.info,  Node: omp_set_dynamic,  Next: omp_set_max_active_levels,  Prev: omp_in_final,  Up: Runtime Library Routines

2.16 `omp_set_dynamic' - Enable/disable dynamic teams
d516 1
a516 1
     _Prototype_:  `void omp_set_dynamic(int set);'
d520 1
a520 1
                   `logical, intent(in) :: set'
d526 1
a526 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.7.
d531 1
a531 1
2.17 `omp_set_max_active_levels' - Limits the number of active parallel regions
d535 2
a536 2
     This function limits the maximum allowed number of nested, active
     parallel regions.
d539 1
a539 1
     _Prototype_:  `void omp_set_max_active_levels(int max_levels);'
d542 1
a542 1
     _Interface_:  `subroutine omp_set_max_active_levels(max_levels)'
d549 1
a549 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d555 1
a555 1
2.18 `omp_set_nested' - Enable/disable nested parallel regions
d565 1
a565 1
     _Prototype_:  `void omp_set_nested(int set);'
d568 2
a569 2
     _Interface_:  `subroutine omp_set_nested(set)'
                   `logical, intent(in) :: set'
d575 1
a575 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.9.
d580 1
a580 1
2.19 `omp_set_num_threads' - Set upper team size limit
d589 1
a589 1
     _Prototype_:  `void omp_set_num_threads(int n);'
d592 2
a593 2
     _Interface_:  `subroutine omp_set_num_threads(n)'
                   `integer, intent(in) :: n'
d600 1
a600 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.1.
d605 1
a605 1
2.20 `omp_set_schedule' - Set the runtime scheduling method
d610 1
a610 1
     value `omp_sched_static', `omp_sched_dynamic', `omp_sched_guided'
d612 1
a612 1
     is set to the value of MODIFIER if positive, or to the default
d617 1
a617 2
     _Prototype_:  `void omp_set_schedule(omp_sched_t *kind, int
                   *modifier);'
d620 1
a620 1
     _Interface_:  `subroutine omp_set_schedule(kind, modifier)'
d628 1
a628 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section
d634 1
a634 1
2.21 `omp_init_lock' - Initialize simple lock
d638 1
a638 1
     Initialize a simple lock.  After initialization, the lock is in an
d652 1
a652 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.1.
d657 1
a657 1
2.22 `omp_set_lock' - Wait for and set simple lock
d671 1
a671 1
                   `integer(omp_lock_kind), intent(inout) :: lock'
d678 1
a678 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.3.
d683 1
a683 1
2.23 `omp_test_lock' - Test and set simple lock if available
d697 3
a699 2
     _Interface_:  `logical function omp_test_lock(lock)'
                   `integer(omp_lock_kind), intent(inout) :: lock'
d705 1
a705 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.5.
d710 1
a710 1
2.24 `omp_unset_lock' - Unset simple lock
d717 2
a718 2
     lock becomes unlocked. If one or more threads attempted to set the
     lock before, one of them is chosen to, again, set the lock to
d726 1
a726 1
                   `integer(omp_lock_kind), intent(inout) :: lock'
d732 1
a732 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.4.
d737 1
a737 1
2.25 `omp_destroy_lock' - Destroy simple lock
d745 1
a745 1
     _Prototype_:  `void omp_destroy_lock(omp_lock_t *lock);'
d755 1
a755 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.2.
d760 1
a760 1
2.26 `omp_init_nest_lock' - Initialize nested lock
d764 1
a764 1
     Initialize a nested lock.  After initialization, the lock is in an
d778 1
a778 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.1.
d783 1
a783 1
2.27 `omp_set_nest_lock' - Wait for and set nested lock
d790 1
a790 1
     current thread, the nesting count for the lock is incremented.
d797 1
a797 1
                   `integer(omp_nest_lock_kind), intent(inout) :: lock'
d803 1
a803 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.3.
d808 1
a808 1
2.28 `omp_test_nest_lock' - Test and set nested lock if available
d823 2
a824 1
     _Interface_:  `logical function omp_test_nest_lock(lock)'
d831 1
a831 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.5.
d836 1
a836 1
2.29 `omp_unset_nest_lock' - Unset nested lock
d845 1
a845 1
     the lock before, one of them is chosen to, again, set the lock to
d853 1
a853 1
                   `integer(omp_nest_lock_kind), intent(inout) :: lock'
d859 1
a859 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.4.
d864 1
a864 1
2.30 `omp_destroy_nest_lock' - Destroy nested lock
d883 1
a883 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.2.
d888 1
a888 1
2.31 `omp_get_wtick' - Get timer precision
d896 1
a896 1
     _Prototype_:  `double omp_get_wtick(void);'
d905 1
a905 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.4.2.
d910 1
a910 1
2.32 `omp_get_wtime' - Elapsed wall clock time
d915 4
a918 4
     thread, no guarantee can be made that two distinct threads measure
     the same time.  Time is measured from some "time in the past",
     which is an arbitrary time guaranteed not to change during the
     execution of the program.
d921 1
a921 1
     _Prototype_:  `double omp_get_wtime(void);'
d930 1
a930 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 3.4.1.
d941 1
a941 1
specifications in version 3.1, while `GOMP_CPU_AFFINITY' and
d947 1
a947 1
* OMP_MAX_ACTIVE_LEVELS:: Set the maximum number of nested parallel regions
d952 1
a952 1
* OMP_THREAD_LIMIT::      Set the maximum number of threads
a953 1
* OMP_PROC_BIND::         Whether theads may be moved between CPUs
d973 1
a973 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 4.3
d978 1
a978 1
3.2 `OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d982 2
a983 2
     Specifies the initial value for the maximum number of nested
     parallel regions. The value of this variable shall be a positive
d990 1
a990 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 4.8
d1008 1
a1008 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 4.5
d1018 2
a1019 4
     regions. The value of this variable shall be a comma-separated
     list of positive integers; the value specified the number of
     threads to use for the corresponding nested level. If undefined
     one thread per CPU is used.
d1025 1
a1025 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 4.2
d1044 1
a1044 1
     OpenMP specifications v3.1 (http://www.openmp.org/), sections
d1058 3
a1060 3
     of bytes as an argument. If the stack size cannot be set due to
     system constraints, an error is reported and the initial stack
     size is left unchanged. If undefined, the stack size is system
d1064 1
a1064 1
     OpenMP specifications v3.1 (http://www.openmp.org/), sections 4.6
d1069 1
a1069 1
3.7 `OMP_THREAD_LIMIT' - Set the maximum number of threads
d1074 1
a1074 1
     value of this variable shall be a positive integer. If undefined,
d1081 1
a1081 1
     OpenMP specifications v3.1 (http://www.openmp.org/), section 4.9
d1084 1
a1084 1
File: libgomp.info,  Node: OMP_WAIT_POLICY,  Next: OMP_PROC_BIND,  Prev: OMP_THREAD_LIMIT,  Up: Environment Variables
d1096 1
a1096 1
     OpenMP specifications v3.1 (http://www.openmp.org/), sections 4.7
d1099 1
a1099 1
File: libgomp.info,  Node: OMP_PROC_BIND,  Next: GOMP_CPU_AFFINITY,  Prev: OMP_WAIT_POLICY,  Up: Environment Variables
d1101 2
a1102 19
3.9 `OMP_PROC_BIND' - Whether theads may be moved between CPUs
==============================================================

_Description_:
     Specifies whether threads may be moved between processors. If set
     to `true', OpenMP theads should not be moved, if set to `false'
     they may be moved.

_See also_:
     *note GOMP_CPU_AFFINITY::

_Reference_:
     OpenMP specifications v3.1 (http://www.openmp.org/), sections 4.4


File: libgomp.info,  Node: GOMP_CPU_AFFINITY,  Next: GOMP_STACKSIZE,  Prev: OMP_PROC_BIND,  Up: Environment Variables

3.10 `GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
========================================================
d1106 9
a1114 10
     space-separated or comma-separated list of CPUs. This list may
     contain different kinds of entries: either single CPU numbers in
     any order, a range of CPUs (M-N) or a range with some stride
     (M-N:S).  CPU numbers are zero based. For example,
     `GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
     to CPU 0, the second to CPU 3, the third to CPU 1, the fourth to
     CPU 2, the fifth to CPU 4, the sixth through tenth to CPUs 6, 8,
     10, 12, and 14 respectively and then start assigning back from the
     beginning of the list.  `GOMP_CPU_AFFINITY=0' binds all threads to
     CPU 0.
a1126 3
_See also_:
     *note OMP_PROC_BIND::

d1130 1
a1130 1
3.11 `GOMP_STACKSIZE' - Set default thread stack size
d1136 2
a1137 2
     an argument. If the stack size cannot be set due to system
     constraints, an error is reported and the initial stack size is
d1141 1
a1141 1
     *note OMP_STACKSIZE::
d1156 1
a1156 1
by libgomp.  Only maintainers should need them.
d1185 2
a1186 2
only include this in the version run by the master thread.  Surely this
is not worthwhile though...
d1208 1
a1208 1
state, and so we wouldn't need to initialize this at startup.
d1277 5
a1281 5
This seems simple enough for PARALLEL blocks.  Create a private struct
for communicating between the parent and subfunction.  In the parent,
copy in values for scalar and "small" structs; copy in addresses for
others TREE_ADDRESSABLE types.  In the subfunction, copy the value into
the local variable.
d1283 2
a1284 2
   It is not clear what to do with bare FOR or SECTION blocks.  The
only thing I can figure is that we do something like:
d1318 1
a1318 1
and after the barrier, the master thread iterates over the array to
d1410 1
a1410 1
   Note that while it looks like there is trickiness to propagating a
d1515 1
a1515 1
(http://gcc.gnu.org/bugzilla/).  For all cases, please add "openmp" to
d1521 1
a1521 1
GNU General Public License
d1524 1
a1524 1
                        Version 3, 29 June 2007
d1526 2
a1527 1
     Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/'
d1529 2
a1530 2
     Everyone is permitted to copy and distribute verbatim copies of this
     license document, but changing it is not allowed.
d1535 8
a1542 10
The GNU General Public License is a free, copyleft license for software
and other kinds of works.

   The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program-to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
d1548 8
a1555 8
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

   To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you
have certain responsibilities if you distribute copies of the software,
or if you modify it: responsibilities to respect the freedom of others.
d1558 21
a1578 33
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

   Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

   For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

   Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the
manufacturer can do so.  This is fundamentally incompatible with the
aim of protecting users' freedom to change the software.  The
systematic pattern of such abuse occurs in the area of products for
individuals to use, which is precisely where it is most unacceptable.
Therefore, we have designed this version of the GPL to prohibit the
practice for those products.  If such problems arise substantially in
other domains, we stand ready to extend this provision to those domains
in future versions of the GPL, as needed to protect the freedom of
users.

   Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
d1583 116
a1698 2
TERMS AND CONDITIONS
====================
d1700 28
a1727 498
  0. Definitions.

     "This License" refers to version 3 of the GNU General Public
     License.

     "Copyright" also means copyright-like laws that apply to other
     kinds of works, such as semiconductor masks.

     "The Program" refers to any copyrightable work licensed under this
     License.  Each licensee is addressed as "you".  "Licensees" and
     "recipients" may be individuals or organizations.

     To "modify" a work means to copy from or adapt all or part of the
     work in a fashion requiring copyright permission, other than the
     making of an exact copy.  The resulting work is called a "modified
     version" of the earlier work or a work "based on" the earlier work.

     A "covered work" means either the unmodified Program or a work
     based on the Program.

     To "propagate" a work means to do anything with it that, without
     permission, would make you directly or secondarily liable for
     infringement under applicable copyright law, except executing it
     on a computer or modifying a private copy.  Propagation includes
     copying, distribution (with or without modification), making
     available to the public, and in some countries other activities as
     well.

     To "convey" a work means any kind of propagation that enables other
     parties to make or receive copies.  Mere interaction with a user
     through a computer network, with no transfer of a copy, is not
     conveying.

     An interactive user interface displays "Appropriate Legal Notices"
     to the extent that it includes a convenient and prominently visible
     feature that (1) displays an appropriate copyright notice, and (2)
     tells the user that there is no warranty for the work (except to
     the extent that warranties are provided), that licensees may
     convey the work under this License, and how to view a copy of this
     License.  If the interface presents a list of user commands or
     options, such as a menu, a prominent item in the list meets this
     criterion.

  1. Source Code.

     The "source code" for a work means the preferred form of the work
     for making modifications to it.  "Object code" means any
     non-source form of a work.

     A "Standard Interface" means an interface that either is an
     official standard defined by a recognized standards body, or, in
     the case of interfaces specified for a particular programming
     language, one that is widely used among developers working in that
     language.

     The "System Libraries" of an executable work include anything,
     other than the work as a whole, that (a) is included in the normal
     form of packaging a Major Component, but which is not part of that
     Major Component, and (b) serves only to enable use of the work
     with that Major Component, or to implement a Standard Interface
     for which an implementation is available to the public in source
     code form.  A "Major Component", in this context, means a major
     essential component (kernel, window system, and so on) of the
     specific operating system (if any) on which the executable work
     runs, or a compiler used to produce the work, or an object code
     interpreter used to run it.

     The "Corresponding Source" for a work in object code form means all
     the source code needed to generate, install, and (for an executable
     work) run the object code and to modify the work, including
     scripts to control those activities.  However, it does not include
     the work's System Libraries, or general-purpose tools or generally
     available free programs which are used unmodified in performing
     those activities but which are not part of the work.  For example,
     Corresponding Source includes interface definition files
     associated with source files for the work, and the source code for
     shared libraries and dynamically linked subprograms that the work
     is specifically designed to require, such as by intimate data
     communication or control flow between those subprograms and other
     parts of the work.

     The Corresponding Source need not include anything that users can
     regenerate automatically from other parts of the Corresponding
     Source.

     The Corresponding Source for a work in source code form is that
     same work.

  2. Basic Permissions.

     All rights granted under this License are granted for the term of
     copyright on the Program, and are irrevocable provided the stated
     conditions are met.  This License explicitly affirms your unlimited
     permission to run the unmodified Program.  The output from running
     a covered work is covered by this License only if the output,
     given its content, constitutes a covered work.  This License
     acknowledges your rights of fair use or other equivalent, as
     provided by copyright law.

     You may make, run and propagate covered works that you do not
     convey, without conditions so long as your license otherwise
     remains in force.  You may convey covered works to others for the
     sole purpose of having them make modifications exclusively for
     you, or provide you with facilities for running those works,
     provided that you comply with the terms of this License in
     conveying all material for which you do not control copyright.
     Those thus making or running the covered works for you must do so
     exclusively on your behalf, under your direction and control, on
     terms that prohibit them from making any copies of your
     copyrighted material outside their relationship with you.

     Conveying under any other circumstances is permitted solely under
     the conditions stated below.  Sublicensing is not allowed; section
     10 makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

     No covered work shall be deemed part of an effective technological
     measure under any applicable law fulfilling obligations under
     article 11 of the WIPO copyright treaty adopted on 20 December
     1996, or similar laws prohibiting or restricting circumvention of
     such measures.

     When you convey a covered work, you waive any legal power to forbid
     circumvention of technological measures to the extent such
     circumvention is effected by exercising rights under this License
     with respect to the covered work, and you disclaim any intention
     to limit operation or modification of the work as a means of
     enforcing, against the work's users, your or third parties' legal
     rights to forbid circumvention of technological measures.

  4. Conveying Verbatim Copies.

     You may convey verbatim copies of the Program's source code as you
     receive it, in any medium, provided that you conspicuously and
     appropriately publish on each copy an appropriate copyright notice;
     keep intact all notices stating that this License and any
     non-permissive terms added in accord with section 7 apply to the
     code; keep intact all notices of the absence of any warranty; and
     give all recipients a copy of this License along with the Program.

     You may charge any price or no price for each copy that you convey,
     and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

     You may convey a work based on the Program, or the modifications to
     produce it from the Program, in the form of source code under the
     terms of section 4, provided that you also meet all of these
     conditions:

       a. The work must carry prominent notices stating that you
          modified it, and giving a relevant date.

       b. The work must carry prominent notices stating that it is
          released under this License and any conditions added under
          section 7.  This requirement modifies the requirement in
          section 4 to "keep intact all notices".

       c. You must license the entire work, as a whole, under this
          License to anyone who comes into possession of a copy.  This
          License will therefore apply, along with any applicable
          section 7 additional terms, to the whole of the work, and all
          its parts, regardless of how they are packaged.  This License
          gives no permission to license the work in any other way, but
          it does not invalidate such permission if you have separately
          received it.

       d. If the work has interactive user interfaces, each must display
          Appropriate Legal Notices; however, if the Program has
          interactive interfaces that do not display Appropriate Legal
          Notices, your work need not make them do so.

     A compilation of a covered work with other separate and independent
     works, which are not by their nature extensions of the covered
     work, and which are not combined with it such as to form a larger
     program, in or on a volume of a storage or distribution medium, is
     called an "aggregate" if the compilation and its resulting
     copyright are not used to limit the access or legal rights of the
     compilation's users beyond what the individual works permit.
     Inclusion of a covered work in an aggregate does not cause this
     License to apply to the other parts of the aggregate.

  6. Conveying Non-Source Forms.

     You may convey a covered work in object code form under the terms
     of sections 4 and 5, provided that you also convey the
     machine-readable Corresponding Source under the terms of this
     License, in one of these ways:

       a. Convey the object code in, or embodied in, a physical product
          (including a physical distribution medium), accompanied by the
          Corresponding Source fixed on a durable physical medium
          customarily used for software interchange.

       b. Convey the object code in, or embodied in, a physical product
          (including a physical distribution medium), accompanied by a
          written offer, valid for at least three years and valid for
          as long as you offer spare parts or customer support for that
          product model, to give anyone who possesses the object code
          either (1) a copy of the Corresponding Source for all the
          software in the product that is covered by this License, on a
          durable physical medium customarily used for software
          interchange, for a price no more than your reasonable cost of
          physically performing this conveying of source, or (2) access
          to copy the Corresponding Source from a network server at no
          charge.

       c. Convey individual copies of the object code with a copy of
          the written offer to provide the Corresponding Source.  This
          alternative is allowed only occasionally and noncommercially,
          and only if you received the object code with such an offer,
          in accord with subsection 6b.

       d. Convey the object code by offering access from a designated
          place (gratis or for a charge), and offer equivalent access
          to the Corresponding Source in the same way through the same
          place at no further charge.  You need not require recipients
          to copy the Corresponding Source along with the object code.
          If the place to copy the object code is a network server, the
          Corresponding Source may be on a different server (operated
          by you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to
          the object code saying where to find the Corresponding Source.
          Regardless of what server hosts the Corresponding Source, you
          remain obligated to ensure that it is available for as long
          as needed to satisfy these requirements.

       e. Convey the object code using peer-to-peer transmission,
          provided you inform other peers where the object code and
          Corresponding Source of the work are being offered to the
          general public at no charge under subsection 6d.


     A separable portion of the object code, whose source code is
     excluded from the Corresponding Source as a System Library, need
     not be included in conveying the object code work.

     A "User Product" is either (1) a "consumer product", which means
     any tangible personal property which is normally used for personal,
     family, or household purposes, or (2) anything designed or sold for
     incorporation into a dwelling.  In determining whether a product
     is a consumer product, doubtful cases shall be resolved in favor of
     coverage.  For a particular product received by a particular user,
     "normally used" refers to a typical or common use of that class of
     product, regardless of the status of the particular user or of the
     way in which the particular user actually uses, or expects or is
     expected to use, the product.  A product is a consumer product
     regardless of whether the product has substantial commercial,
     industrial or non-consumer uses, unless such uses represent the
     only significant mode of use of the product.

     "Installation Information" for a User Product means any methods,
     procedures, authorization keys, or other information required to
     install and execute modified versions of a covered work in that
     User Product from a modified version of its Corresponding Source.
     The information must suffice to ensure that the continued
     functioning of the modified object code is in no case prevented or
     interfered with solely because modification has been made.

     If you convey an object code work under this section in, or with,
     or specifically for use in, a User Product, and the conveying
     occurs as part of a transaction in which the right of possession
     and use of the User Product is transferred to the recipient in
     perpetuity or for a fixed term (regardless of how the transaction
     is characterized), the Corresponding Source conveyed under this
     section must be accompanied by the Installation Information.  But
     this requirement does not apply if neither you nor any third party
     retains the ability to install modified object code on the User
     Product (for example, the work has been installed in ROM).

     The requirement to provide Installation Information does not
     include a requirement to continue to provide support service,
     warranty, or updates for a work that has been modified or
     installed by the recipient, or for the User Product in which it
     has been modified or installed.  Access to a network may be denied
     when the modification itself materially and adversely affects the
     operation of the network or violates the rules and protocols for
     communication across the network.

     Corresponding Source conveyed, and Installation Information
     provided, in accord with this section must be in a format that is
     publicly documented (and with an implementation available to the
     public in source code form), and must require no special password
     or key for unpacking, reading or copying.

  7. Additional Terms.

     "Additional permissions" are terms that supplement the terms of
     this License by making exceptions from one or more of its
     conditions.  Additional permissions that are applicable to the
     entire Program shall be treated as though they were included in
     this License, to the extent that they are valid under applicable
     law.  If additional permissions apply only to part of the Program,
     that part may be used separately under those permissions, but the
     entire Program remains governed by this License without regard to
     the additional permissions.

     When you convey a copy of a covered work, you may at your option
     remove any additional permissions from that copy, or from any part
     of it.  (Additional permissions may be written to require their own
     removal in certain cases when you modify the work.)  You may place
     additional permissions on material, added by you to a covered work,
     for which you have or can give appropriate copyright permission.

     Notwithstanding any other provision of this License, for material
     you add to a covered work, you may (if authorized by the copyright
     holders of that material) supplement the terms of this License
     with terms:

       a. Disclaiming warranty or limiting liability differently from
          the terms of sections 15 and 16 of this License; or

       b. Requiring preservation of specified reasonable legal notices
          or author attributions in that material or in the Appropriate
          Legal Notices displayed by works containing it; or

       c. Prohibiting misrepresentation of the origin of that material,
          or requiring that modified versions of such material be
          marked in reasonable ways as different from the original
          version; or

       d. Limiting the use for publicity purposes of names of licensors
          or authors of the material; or

       e. Declining to grant rights under trademark law for use of some
          trade names, trademarks, or service marks; or

       f. Requiring indemnification of licensors and authors of that
          material by anyone who conveys the material (or modified
          versions of it) with contractual assumptions of liability to
          the recipient, for any liability that these contractual
          assumptions directly impose on those licensors and authors.

     All other non-permissive additional terms are considered "further
     restrictions" within the meaning of section 10.  If the Program as
     you received it, or any part of it, contains a notice stating that
     it is governed by this License along with a term that is a further
     restriction, you may remove that term.  If a license document
     contains a further restriction but permits relicensing or
     conveying under this License, you may add to a covered work
     material governed by the terms of that license document, provided
     that the further restriction does not survive such relicensing or
     conveying.

     If you add terms to a covered work in accord with this section, you
     must place, in the relevant source files, a statement of the
     additional terms that apply to those files, or a notice indicating
     where to find the applicable terms.

     Additional terms, permissive or non-permissive, may be stated in
     the form of a separately written license, or stated as exceptions;
     the above requirements apply either way.

  8. Termination.

     You may not propagate or modify a covered work except as expressly
     provided under this License.  Any attempt otherwise to propagate or
     modify it is void, and will automatically terminate your rights
     under this License (including any patent licenses granted under
     the third paragraph of section 11).

     However, if you cease all violation of this License, then your
     license from a particular copyright holder is reinstated (a)
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
     copyright holder fails to notify you of the violation by some
     reasonable means prior to 60 days after the cessation.

     Moreover, your license from a particular copyright holder is
     reinstated permanently if the copyright holder notifies you of the
     violation by some reasonable means, this is the first time you have
     received notice of violation of this License (for any work) from
     that copyright holder, and you cure the violation prior to 30 days
     after your receipt of the notice.

     Termination of your rights under this section does not terminate
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, you do not qualify to receive new
     licenses for the same material under section 10.

  9. Acceptance Not Required for Having Copies.

     You are not required to accept this License in order to receive or
     run a copy of the Program.  Ancillary propagation of a covered work
     occurring solely as a consequence of using peer-to-peer
     transmission to receive a copy likewise does not require
     acceptance.  However, nothing other than this License grants you
     permission to propagate or modify any covered work.  These actions
     infringe copyright if you do not accept this License.  Therefore,
     by modifying or propagating a covered work, you indicate your
     acceptance of this License to do so.

 10. Automatic Licensing of Downstream Recipients.

     Each time you convey a covered work, the recipient automatically
     receives a license from the original licensors, to run, modify and
     propagate that work, subject to this License.  You are not
     responsible for enforcing compliance by third parties with this
     License.

     An "entity transaction" is a transaction transferring control of an
     organization, or substantially all assets of one, or subdividing an
     organization, or merging organizations.  If propagation of a
     covered work results from an entity transaction, each party to that
     transaction who receives a copy of the work also receives whatever
     licenses to the work the party's predecessor in interest had or
     could give under the previous paragraph, plus a right to
     possession of the Corresponding Source of the work from the
     predecessor in interest, if the predecessor has it or can get it
     with reasonable efforts.

     You may not impose any further restrictions on the exercise of the
     rights granted or affirmed under this License.  For example, you
     may not impose a license fee, royalty, or other charge for
     exercise of rights granted under this License, and you may not
     initiate litigation (including a cross-claim or counterclaim in a
     lawsuit) alleging that any patent claim is infringed by making,
     using, selling, offering for sale, or importing the Program or any
     portion of it.

 11. Patents.

     A "contributor" is a copyright holder who authorizes use under this
     License of the Program or a work on which the Program is based.
     The work thus licensed is called the contributor's "contributor
     version".

     A contributor's "essential patent claims" are all patent claims
     owned or controlled by the contributor, whether already acquired or
     hereafter acquired, that would be infringed by some manner,
     permitted by this License, of making, using, or selling its
     contributor version, but do not include claims that would be
     infringed only as a consequence of further modification of the
     contributor version.  For purposes of this definition, "control"
     includes the right to grant patent sublicenses in a manner
     consistent with the requirements of this License.

     Each contributor grants you a non-exclusive, worldwide,
     royalty-free patent license under the contributor's essential
     patent claims, to make, use, sell, offer for sale, import and
     otherwise run, modify and propagate the contents of its
     contributor version.

     In the following three paragraphs, a "patent license" is any
     express agreement or commitment, however denominated, not to
     enforce a patent (such as an express permission to practice a
     patent or covenant not to sue for patent infringement).  To
     "grant" such a patent license to a party means to make such an
     agreement or commitment not to enforce a patent against the party.

     If you convey a covered work, knowingly relying on a patent
     license, and the Corresponding Source of the work is not available
     for anyone to copy, free of charge and under the terms of this
     License, through a publicly available network server or other
     readily accessible means, then you must either (1) cause the
     Corresponding Source to be so available, or (2) arrange to deprive
     yourself of the benefit of the patent license for this particular
     work, or (3) arrange, in a manner consistent with the requirements
     of this License, to extend the patent license to downstream
     recipients.  "Knowingly relying" means you have actual knowledge
     that, but for the patent license, your conveying the covered work
     in a country, or your recipient's use of the covered work in a
     country, would infringe one or more identifiable patents in that
     country that you have reason to believe are valid.

     If, pursuant to or in connection with a single transaction or
     arrangement, you convey, or propagate by procuring conveyance of, a
     covered work, and grant a patent license to some of the parties
     receiving the covered work authorizing them to use, propagate,
     modify or convey a specific copy of the covered work, then the
     patent license you grant is automatically extended to all
     recipients of the covered work and works based on it.

     A patent license is "discriminatory" if it does not include within
     the scope of its coverage, prohibits the exercise of, or is
     conditioned on the non-exercise of one or more of the rights that
     are specifically granted under this License.  You may not convey a
     covered work if you are a party to an arrangement with a third
     party that is in the business of distributing software, under
     which you make payment to the third party based on the extent of
     your activity of conveying the work, and under which the third
     party grants, to any of the parties who would receive the covered
     work from you, a discriminatory patent license (a) in connection
     with copies of the covered work conveyed by you (or copies made
     from those copies), or (b) primarily for and in connection with
     specific products or compilations that contain the covered work,
     unless you entered into that arrangement, or that patent license
     was granted, prior to 28 March 2007.

     Nothing in this License shall be construed as excluding or limiting
     any implied license or other defenses to infringement that may
     otherwise be available to you under applicable patent law.

 12. No Surrender of Others' Freedom.

     If conditions are imposed on you (whether by court order,
d1730 41
a1770 27
     License.  If you cannot convey a covered work so as to satisfy
     simultaneously your obligations under this License and any other
     pertinent obligations, then as a consequence you may not convey it
     at all.  For example, if you agree to terms that obligate you to
     collect a royalty for further conveying from those to whom you
     convey the Program, the only way you could satisfy both those
     terms and this License would be to refrain entirely from conveying
     the Program.

 13. Use with the GNU Affero General Public License.

     Notwithstanding any other provision of this License, you have
     permission to link or combine any covered work with a work licensed
     under version 3 of the GNU Affero General Public License into a
     single combined work, and to convey the resulting work.  The terms
     of this License will continue to apply to the part which is the
     covered work, but the special requirements of the GNU Affero
     General Public License, section 13, concerning interaction through
     a network will apply to the combination as such.

 14. Revised Versions of this License.

     The Free Software Foundation may publish revised and/or new
     versions of the GNU General Public License from time to time.
     Such new versions will be similar in spirit to the present
     version, but may differ in detail to address new problems or
     concerns.
d1773 5
a1777 6
     Program specifies that a certain numbered version of the GNU
     General Public License "or any later version" applies to it, you
     have the option of following the terms and conditions either of
     that numbered version or of any later version published by the
     Free Software Foundation.  If the Program does not specify a
     version number of the GNU General Public License, you may choose
d1780 31
a1810 43
     If the Program specifies that a proxy can decide which future
     versions of the GNU General Public License can be used, that
     proxy's public statement of acceptance of a version permanently
     authorizes you to choose that version for the Program.

     Later license versions may give you additional or different
     permissions.  However, no additional obligations are imposed on any
     author or copyright holder as a result of your choosing to follow a
     later version.

 15. Disclaimer of Warranty.

     THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
     APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE
     COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS"
     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
     INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE
     RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.
     SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
     NECESSARY SERVICING, REPAIR OR CORRECTION.

 16. Limitation of Liability.

     IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
     WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
     FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
     CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
     THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
     BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
     PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
     PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF
     THE POSSIBILITY OF SUCH DAMAGES.

 17. Interpretation of Sections 15 and 16.

     If the disclaimer of warranty and limitation of liability provided
     above cannot be given local legal effect according to their terms,
     reviewing courts shall apply local law that most closely
     approximates an absolute waiver of all civil liability in
     connection with the Program, unless a warranty or assumption of
     liability accompanies a copy of the Program in return for a fee.
d1812 3
a1814 6

END OF TERMS AND CONDITIONS
===========================

How to Apply These Terms to Your New Programs
=============================================
d1823 2
a1824 2
state the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
d1827 1
a1827 1
     Copyright (C) YEAR NAME OF AUTHOR
d1829 1
a1829 1
     This program is free software: you can redistribute it and/or modify
d1831 2
a1832 2
     the Free Software Foundation, either version 3 of the License, or (at
     your option) any later version.
d1834 4
a1837 4
     This program is distributed in the hope that it will be useful, but
     WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     General Public License for more details.
d1840 2
a1841 1
     along with this program.  If not, see `http://www.gnu.org/licenses/'.
d1846 2
a1847 2
   If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
d1849 3
a1851 2
     PROGRAM Copyright (C) YEAR NAME OF AUTHOR
     This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
d1856 4
a1859 3
appropriate parts of the General Public License.  Of course, your
program's commands might be different; for a GUI interface, you would
use an "about box".
d1862 5
a1866 3
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  For more information on this, and how to apply and follow
the GNU GPL, see `http://www.gnu.org/licenses/'.
d1868 4
a1871 1
   The GNU General Public License does not permit incorporating your
d1875 1
a1875 2
GNU Lesser General Public License instead of this License.  But first,
please read `http://www.gnu.org/philosophy/why-not-lgpl.html'.
d1883 1
a1883 1
                     Version 1.3, 3 November 2008
d1885 2
a1886 2
     Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
     `http://fsf.org/'
a1987 3
     The "publisher" means any person or entity that distributes copies
     of the Document to the public.

d2253 6
a2258 23
     except as expressly provided under this License.  Any attempt
     otherwise to copy, modify, sublicense, or distribute it is void,
     and will automatically terminate your rights under this License.

     However, if you cease all violation of this License, then your
     license from a particular copyright holder is reinstated (a)
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
     copyright holder fails to notify you of the violation by some
     reasonable means prior to 60 days after the cessation.

     Moreover, your license from a particular copyright holder is
     reinstated permanently if the copyright holder notifies you of the
     violation by some reasonable means, this is the first time you have
     received notice of violation of this License (for any work) from
     that copyright holder, and you cure the violation prior to 30 days
     after your receipt of the notice.

     Termination of your rights under this section does not terminate
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, receipt of a copy of some or all of
     the same material does not give you any rights to use it.
d2276 1
a2276 35
     Free Software Foundation.  If the Document specifies that a proxy
     can decide which future versions of this License can be used, that
     proxy's public statement of acceptance of a version permanently
     authorizes you to choose that version for the Document.

 11. RELICENSING

     "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
     World Wide Web server that publishes copyrightable works and also
     provides prominent facilities for anybody to edit those works.  A
     public wiki that anybody can edit is an example of such a server.
     A "Massive Multiauthor Collaboration" (or "MMC") contained in the
     site means any set of copyrightable works thus published on the MMC
     site.

     "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
     license published by Creative Commons Corporation, a not-for-profit
     corporation with a principal place of business in San Francisco,
     California, as well as future copyleft versions of that license
     published by that same organization.

     "Incorporate" means to publish or republish a Document, in whole or
     in part, as part of another Document.

     An MMC is "eligible for relicensing" if it is licensed under this
     License, and if all works that were first published under this
     License somewhere other than this MMC, and subsequently
     incorporated in whole or in part into the MMC, (1) had no cover
     texts or invariant sections, and (2) were thus incorporated prior
     to November 1, 2008.

     The operator of an MMC Site may republish an MMC contained in the
     site under CC-BY-SA on the same site at any time before August 1,
     2009, provided the MMC is eligible for relicensing.

d2287 1
a2287 1
       under the terms of the GNU Free Documentation License, Version 1.3
d2310 1
a2310 1
File: libgomp.info,  Node: Funding,  Next: Library Index,  Prev: GNU Free Documentation License,  Up: Top
d2360 1
a2360 1
File: libgomp.info,  Node: Library Index,  Prev: Funding,  Up: Top
d2362 2
a2363 2
Library Index
*************
d2370 7
a2376 8
* Environment Variable <3>:              OMP_PROC_BIND.         (line 6)
* Environment Variable <4>:              OMP_WAIT_POLICY.       (line 6)
* Environment Variable <5>:              OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <6>:              OMP_STACKSIZE.         (line 6)
* Environment Variable <7>:              OMP_SCHEDULE.          (line 6)
* Environment Variable <8>:              OMP_NUM_THREADS.       (line 6)
* Environment Variable <9>:              OMP_NESTED.            (line 6)
* Environment Variable <10>:             OMP_MAX_ACTIVE_LEVELS. (line 6)
d2389 65
a2453 67
Node: Top2039
Node: Enabling OpenMP3233
Node: Runtime Library Routines4018
Node: omp_get_active_level6466
Node: omp_get_ancestor_thread_num7170
Node: omp_get_dynamic8097
Node: omp_get_level8975
Node: omp_get_max_active_levels9599
Node: omp_get_max_threads10302
Node: omp_get_nested11058
Node: omp_get_num_procs11970
Node: omp_get_num_threads12488
Node: omp_get_schedule13570
Node: omp_get_team_size14491
Node: omp_get_thread_limit15453
Node: omp_get_thread_num16076
Node: omp_in_parallel16944
Node: omp_in_final17591
Node: omp_set_dynamic18262
Node: omp_set_max_active_levels19099
Node: omp_set_nested19879
Node: omp_set_num_threads20758
Node: omp_set_schedule21594
Node: omp_init_lock22666
Node: omp_set_lock23317
Node: omp_test_lock24168
Node: omp_unset_lock25139
Node: omp_destroy_lock26065
Node: omp_init_nest_lock26739
Node: omp_set_nest_lock27472
Node: omp_test_nest_lock28383
Node: omp_unset_nest_lock29412
Node: omp_destroy_nest_lock30422
Node: omp_get_wtick31170
Node: omp_get_wtime31761
Node: Environment Variables32535
Node: OMP_DYNAMIC33663
Node: OMP_MAX_ACTIVE_LEVELS34231
Node: OMP_NESTED34870
Node: OMP_NUM_THREADS35474
Node: OMP_SCHEDULE36162
Node: OMP_STACKSIZE36856
Node: OMP_THREAD_LIMIT37682
Node: OMP_WAIT_POLICY38277
Node: OMP_PROC_BIND38838
Node: GOMP_CPU_AFFINITY39396
Node: GOMP_STACKSIZE40937
Node: The libgomp ABI41747
Node: Implementing MASTER construct42546
Node: Implementing CRITICAL construct42960
Node: Implementing ATOMIC construct43699
Node: Implementing FLUSH construct44180
Node: Implementing BARRIER construct44451
Node: Implementing THREADPRIVATE construct44720
Node: Implementing PRIVATE clause45372
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses45953
Node: Implementing REDUCTION clause47277
Node: Implementing PARALLEL construct47834
Node: Implementing FOR construct49091
Node: Implementing ORDERED construct51089
Node: Implementing SECTIONS construct51395
Node: Implementing SINGLE construct52161
Node: Reporting Bugs52823
Node: Copying53133
Node: GNU Free Documentation License90698
Node: Funding115840
Node: Library Index118365
@


1.1.1.4
log
@import GCC 4.8.4 release.  this fixes at least these GCC PRs:
	fortran/61407
	sanitizer/64265
	tree-optimization/64269
	middle-end/64225
	tree-optimization/61686
	bootstrap/64213
	rtl-optimization/64037
	target/50751
	rtl-optimization/64037
	target/59593
	target/59593
	c++/56493
	target/64115
	middle-end/64111
	middle-end/64067
	rtl-optimization/63659
	libgomp/61200
	tree-optimization/61969
	tree-optimization/62031
	tree-optimization/63379
	tree-optimization/63605
	middle-end/63665
	target/60111
	target/63673
	target/63947
	tree-optimization/62167
	tree-optimization/63841
	ipa/63838
	c++/63455
	c++/63415
	c++/56710
	c++/58624
	preprocessor/60436
	target/55351
	fortran/63938
	libgomp/61200
	libstdc++/63840
	libstdc++/61947
	libstdc++/59603
	target/56846
	libstdc++/57440
@
text
@d1 2
a2 2
This is libgomp.info, produced by makeinfo version 5.2 from
libgomp.texi.
d21 3
a23 2
software.  Copies published by the Free Software Foundation raise funds
for GNU development.
d52 2
a53 2
software.  Copies published by the Free Software Foundation raise funds
for GNU development.
d63 2
a64 2
(API) for multi-platform shared-memory parallel programming in C/C++ and
Fortran.
d90 5
a94 5
compile-time flag '-fopenmp' must be specified.  This enables the OpenMP
directive '#pragma omp' in C/C++ and '!$omp' directives in free form,
'c$omp', '*$omp' and '!$omp' directives in fixed form, '!$' conditional
compilation sentinels in free form and 'c$', '*$' and '!$' sentinels in
fixed form, for Fortran.  The flag also arranges for automatic linking
d97 3
a99 3
   A complete description of all OpenMP directives accepted may be found
in the OpenMP Application Program Interface (http://www.openmp.org)
manual, version 3.1.
d108 1
a108 1
OpenMP specifications in version 3.1.  The routines are structured in
d161 1
a161 1
2.1 'omp_get_active_level' - Number of parallel regions
d169 1
a169 1
     _Prototype_:   'int omp_get_active_level(void);'
d172 1
a172 1
     _Interface_:   'integer function omp_get_active_level()'
d185 1
a185 1
2.2 'omp_get_ancestor_thread_num' - Ancestor thread ID
d190 3
a192 3
     given nesting level of the current thread.  For values of LEVEL
     outside zero to 'omp_get_level' -1 is returned; if LEVEL is
     'omp_get_level' the result is identical to 'omp_get_thread_num'.
d195 1
a195 1
     _Prototype_:   'int omp_get_ancestor_thread_num(int level);'
d198 2
a199 2
     _Interface_:   'integer function omp_get_ancestor_thread_num(level)'
                    'integer level'
d212 1
a212 1
2.3 'omp_get_dynamic' - Dynamic teams setting
d216 2
a217 2
     This function returns 'true' if enabled, 'false' otherwise.  Here,
     'true' and 'false' represent their language-specific counterparts.
d220 2
a221 2
     'OMP_DYNAMIC' environment variable or at runtime using
     'omp_set_dynamic'.  If undefined, dynamic adjustment is disabled by
d225 1
a225 1
     _Prototype_:   'int omp_get_dynamic(void);'
d228 1
a228 1
     _Interface_:   'logical function omp_get_dynamic()'
d239 1
a239 1
2.4 'omp_get_level' - Obtain the current nesting level
d247 1
a247 1
     _Prototype_:   'int omp_get_level(void);'
d250 1
a250 1
     _Interface_:   'integer function omp_level()'
d262 1
a262 1
2.5 'omp_get_max_active_levels' - Maximum number of active regions
d270 1
a270 1
     _Prototype_:   'int omp_get_max_active_levels(void);'
d273 1
a273 1
     _Interface_:   'integer function omp_get_max_active_levels()'
d285 1
a285 1
2.6 'omp_get_max_threads' - Maximum number of threads of parallel region
d290 1
a290 1
     region that does not use the clause 'num_threads'.
d293 1
a293 1
     _Prototype_:   'int omp_get_max_threads(void);'
d296 1
a296 1
     _Interface_:   'integer function omp_get_max_threads()'
d308 1
a308 1
2.7 'omp_get_nested' - Nested parallel regions
d312 2
a313 2
     This function returns 'true' if nested parallel regions are
     enabled, 'false' otherwise.  Here, 'true' and 'false' represent
d317 2
a318 2
     'OMP_NESTED' environment variable or at runtime using
     'omp_set_nested'.  If undefined, nested parallel regions are
d322 1
a322 1
     _Prototype_:   'int omp_get_nested(void);'
d325 1
a325 1
     _Interface_:   'logical function omp_get_nested()'
d337 1
a337 1
2.8 'omp_get_num_procs' - Number of processors online
d344 1
a344 1
     _Prototype_:   'int omp_get_num_procs(void);'
d347 1
a347 1
     _Interface_:   'integer function omp_get_num_procs()'
d355 1
a355 1
2.9 'omp_get_num_threads' - Size of the active team
d359 2
a360 2
     Returns the number of threads in the current team.  In a sequential
     section of the program 'omp_get_num_threads' returns 1.
d363 4
a366 4
     'OMP_NUM_THREADS' environment variable.  At runtime, the size of
     the current team may be set either by the 'NUM_THREADS' clause or
     by 'omp_set_num_threads'.  If none of the above were used to define
     a specific value and 'OMP_DYNAMIC' is disabled, one thread per CPU
d370 1
a370 1
     _Prototype_:   'int omp_get_num_threads(void);'
d373 1
a373 1
     _Interface_:   'integer function omp_get_num_threads()'
d385 1
a385 1
2.10 'omp_get_schedule' - Obtain the runtime scheduling method
d389 3
a391 3
     Obtain the runtime scheduling method.  The KIND argument will be
     set to the value 'omp_sched_static', 'omp_sched_dynamic',
     'omp_sched_guided' or 'omp_sched_auto'.  The second argument,
d395 1
a395 1
     _Prototype_:   'void omp_schedule(omp_sched_t *kind, int *modifier);'
d398 3
a400 3
     _Interface_:   'subroutine omp_schedule(kind, modifier)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer modifier'
d412 1
a412 1
2.11 'omp_get_team_size' - Number of threads in a team
d417 4
a420 4
     which either the current thread or its ancestor belongs.  For
     values of LEVEL outside zero to 'omp_get_level', -1 is returned; if
     LEVEL is zero, 1 is returned, and for 'omp_get_level', the result
     is identical to 'omp_get_num_threads'.
d423 1
a423 1
     _Prototype_:   'int omp_get_team_size(int level);'
d426 2
a427 2
     _Interface_:   'integer function omp_get_team_size(level)'
                    'integer level'
d440 1
a440 1
2.12 'omp_get_thread_limit' - Maximum number of threads
d447 1
a447 1
     _Prototype_:   'int omp_get_thread_limit(void);'
d450 1
a450 1
     _Interface_:   'integer function omp_get_thread_limit()'
d462 1
a462 1
2.13 'omp_get_thread_num' - Current thread ID
d467 3
a469 3
     team.  In a sequential parts of the program, 'omp_get_thread_num'
     always returns 0.  In parallel regions the return value varies from
     0 to 'omp_get_num_threads'-1 inclusive.  The return value of the
d473 1
a473 1
     _Prototype_:   'int omp_get_thread_num(void);'
d476 1
a476 1
     _Interface_:   'integer function omp_get_thread_num()'
d487 1
a487 1
2.14 'omp_in_parallel' - Whether a parallel region is active
d491 2
a492 2
     This function returns 'true' if currently running in parallel,
     'false' otherwise.  Here, 'true' and 'false' represent their
d496 1
a496 1
     _Prototype_:   'int omp_in_parallel(void);'
d499 1
a499 1
     _Interface_:   'logical function omp_in_parallel()'
d507 1
a507 1
2.15 'omp_in_final' - Whether in final or included task region
d511 2
a512 2
     This function returns 'true' if currently running in a final or
     included task region, 'false' otherwise.  Here, 'true' and 'false'
d516 1
a516 1
     _Prototype_:   'int omp_in_final(void);'
d519 1
a519 1
     _Interface_:   'logical function omp_in_final()'
d528 1
a528 1
2.16 'omp_set_dynamic' - Enable/disable dynamic teams
d533 3
a535 3
     within a team.  The function takes the language-specific equivalent
     of 'true' and 'false', where 'true' enables dynamic adjustment of
     team sizes and 'false' disables it.
d538 1
a538 1
     _Prototype_:   'void omp_set_dynamic(int set);'
d541 2
a542 2
     _Interface_:   'subroutine omp_set_dynamic(set)'
                    'logical, intent(in) :: set'
d553 1
a553 1
2.17 'omp_set_max_active_levels' - Limits the number of active parallel regions
d561 1
a561 1
     _Prototype_:   'void omp_set_max_active_levels(int max_levels);'
d564 2
a565 2
     _Interface_:   'subroutine omp_set_max_active_levels(max_levels)'
                    'integer max_levels'
d577 1
a577 1
2.18 'omp_set_nested' - Enable/disable nested parallel regions
d582 3
a584 3
     members are allowed to create new teams.  The function takes the
     language-specific equivalent of 'true' and 'false', where 'true'
     enables dynamic adjustment of team sizes and 'false' disables it.
d587 1
a587 1
     _Prototype_:   'void omp_set_nested(int set);'
d590 2
a591 2
     _Interface_:   'subroutine omp_set_nested(set)'
                    'logical, intent(in) :: set'
d602 1
a602 1
2.19 'omp_set_num_threads' - Set upper team size limit
d607 2
a608 2
     parallel sections, if those do not specify a 'num_threads' clause.
     The argument of 'omp_set_num_threads' shall be a positive integer.
d611 1
a611 1
     _Prototype_:   'void omp_set_num_threads(int n);'
d614 2
a615 2
     _Interface_:   'subroutine omp_set_num_threads(n)'
                    'integer, intent(in) :: n'
d627 1
a627 1
2.20 'omp_set_schedule' - Set the runtime scheduling method
d631 3
a633 3
     Sets the runtime scheduling method.  The KIND argument can have the
     value 'omp_sched_static', 'omp_sched_dynamic', 'omp_sched_guided'
     or 'omp_sched_auto'.  Except for 'omp_sched_auto', the chunk size
d635 1
a635 1
     value if zero or negative.  For 'omp_sched_auto' the MODIFIER
d639 2
a640 2
     _Prototype_:   'void omp_set_schedule(omp_sched_t *kind, int
                    *modifier);'
d643 3
a645 3
     _Interface_:   'subroutine omp_set_schedule(kind, modifier)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer modifier'
d657 1
a657 1
2.21 'omp_init_lock' - Initialize simple lock
d665 1
a665 1
     _Prototype_:   'void omp_init_lock(omp_lock_t *lock);'
d668 2
a669 2
     _Interface_:   'subroutine omp_init_lock(lock)'
                    'integer(omp_lock_kind), intent(out) :: lock'
d680 1
a680 1
2.22 'omp_set_lock' - Wait for and set simple lock
d684 4
a687 4
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  The calling thread is blocked until the lock
     is available.  If the lock is already held by the current thread, a
     deadlock occurs.
d690 1
a690 1
     _Prototype_:   'void omp_set_lock(omp_lock_t *lock);'
d693 2
a694 2
     _Interface_:   'subroutine omp_set_lock(lock)'
                    'integer(omp_lock_kind), intent(inout) :: lock'
d706 1
a706 1
2.23 'omp_test_lock' - Test and set simple lock if available
d710 5
a714 5
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  Contrary to 'omp_set_lock', 'omp_test_lock'
     does not block if the lock is not available.  This function returns
     'true' upon success, 'false' otherwise.  Here, 'true' and 'false'
     represent their language-specific counterparts.
d717 1
a717 1
     _Prototype_:   'int omp_test_lock(omp_lock_t *lock);'
d720 2
a721 2
     _Interface_:   'logical function omp_test_lock(lock)'
                    'integer(omp_lock_kind), intent(inout) :: lock'
d732 1
a732 1
2.24 'omp_unset_lock' - Unset simple lock
d737 3
a739 3
     'omp_set_lock' or 'omp_test_lock' before.  In addition, the lock
     must be held by the thread calling 'omp_unset_lock'.  Then, the
     lock becomes unlocked.  If one or more threads attempted to set the
d744 1
a744 1
     _Prototype_:   'void omp_unset_lock(omp_lock_t *lock);'
d747 2
a748 2
     _Interface_:   'subroutine omp_unset_lock(lock)'
                    'integer(omp_lock_kind), intent(inout) :: lock'
d759 1
a759 1
2.25 'omp_destroy_lock' - Destroy simple lock
d763 1
a763 1
     Destroy a simple lock.  In order to be destroyed, a simple lock
d767 1
a767 1
     _Prototype_:   'void omp_destroy_lock(omp_lock_t *lock);'
d770 2
a771 2
     _Interface_:   'subroutine omp_destroy_lock(lock)'
                    'integer(omp_lock_kind), intent(inout) :: lock'
d782 1
a782 1
2.26 'omp_init_nest_lock' - Initialize nested lock
d790 1
a790 1
     _Prototype_:   'void omp_init_nest_lock(omp_nest_lock_t *lock);'
d793 2
a794 2
     _Interface_:   'subroutine omp_init_nest_lock(lock)'
                    'integer(omp_nest_lock_kind), intent(out) :: lock'
d805 1
a805 1
2.27 'omp_set_nest_lock' - Wait for and set nested lock
d809 4
a812 4
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  The calling thread is blocked until the
     lock is available.  If the lock is already held by the current
     thread, the nesting count for the lock is incremented.
d815 1
a815 1
     _Prototype_:   'void omp_set_nest_lock(omp_nest_lock_t *lock);'
d818 2
a819 2
     _Interface_:   'subroutine omp_set_nest_lock(lock)'
                    'integer(omp_nest_lock_kind), intent(inout) :: lock'
d830 1
a830 1
2.28 'omp_test_nest_lock' - Test and set nested lock if available
d834 6
a839 5
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  Contrary to 'omp_set_nest_lock',
     'omp_test_nest_lock' does not block if the lock is not available.
     If the lock is already held by the current thread, the new nesting
     count is returned.  Otherwise, the return value equals zero.
d842 1
a842 1
     _Prototype_:   'int omp_test_nest_lock(omp_nest_lock_t *lock);'
d845 2
a846 2
     _Interface_:   'logical function omp_test_nest_lock(lock)'
                    'integer(omp_nest_lock_kind), intent(inout) :: lock'
d857 1
a857 1
2.29 'omp_unset_nest_lock' - Unset nested lock
d862 1
a862 1
     'omp_set_nested_lock' or 'omp_test_nested_lock' before.  In
d864 2
a865 2
     'omp_unset_nested_lock'.  If the nesting count drops to zero, the
     lock becomes unlocked.  If one ore more threads attempted to set
d870 1
a870 1
     _Prototype_:   'void omp_unset_nest_lock(omp_nest_lock_t *lock);'
d873 2
a874 2
     _Interface_:   'subroutine omp_unset_nest_lock(lock)'
                    'integer(omp_nest_lock_kind), intent(inout) :: lock'
d885 1
a885 1
2.30 'omp_destroy_nest_lock' - Destroy nested lock
d889 1
a889 1
     Destroy a nested lock.  In order to be destroyed, a nested lock
d894 1
a894 1
     _Prototype_:   'void omp_destroy_nest_lock(omp_nest_lock_t *);'
d897 2
a898 2
     _Interface_:   'subroutine omp_destroy_nest_lock(lock)'
                    'integer(omp_nest_lock_kind), intent(inout) :: lock'
d909 1
a909 1
2.31 'omp_get_wtick' - Get timer precision
d917 1
a917 1
     _Prototype_:   'double omp_get_wtick(void);'
d920 1
a920 1
     _Interface_:   'double precision function omp_get_wtick()'
d931 1
a931 1
2.32 'omp_get_wtime' - Elapsed wall clock time
d935 1
a935 1
     Elapsed wall clock time in seconds.  The time is measured per
d942 1
a942 1
     _Prototype_:   'double omp_get_wtime(void);'
d945 1
a945 1
     _Interface_:   'double precision function omp_get_wtime()'
d959 5
a963 5
The variables 'OMP_DYNAMIC', 'OMP_MAX_ACTIVE_LEVELS', 'OMP_NESTED',
'OMP_NUM_THREADS', 'OMP_SCHEDULE', 'OMP_STACKSIZE','OMP_THREAD_LIMIT'
and 'OMP_WAIT_POLICY' are defined by section 4 of the OpenMP
specifications in version 3.1, while 'GOMP_CPU_AFFINITY' and
'GOMP_STACKSIZE' are GNU extensions.
d982 1
a982 1
3.1 'OMP_DYNAMIC' - Dynamic adjustment of threads
d987 2
a988 2
     within a team.  The value of this environment variable shall be
     'TRUE' or 'FALSE'.  If undefined, dynamic adjustment is disabled by
d1000 1
a1000 1
3.2 'OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1005 1
a1005 1
     parallel regions.  The value of this variable shall be a positive
d1017 1
a1017 1
3.3 'OMP_NESTED' - Nested parallel regions
d1022 2
a1023 2
     members are allowed to create new teams.  The value of this
     environment variable shall be 'TRUE' or 'FALSE'.  If undefined,
d1033 1
a1033 1
File: libgomp.info,  Node: OMP_NUM_THREADS,  Next: OMP_SCHEDULE,  Prev: OMP_NESTED,  Up: Environment Variables
d1035 1
a1035 1
3.4 'OMP_NUM_THREADS' - Specifies the number of threads to use
d1039 5
a1043 5
     Specifies the default number of threads to use in parallel regions.
     The value of this variable shall be a comma-separated list of
     positive integers; the value specified the number of threads to use
     for the corresponding nested level.  If undefined one thread per
     CPU is used.
d1052 1
a1052 1
File: libgomp.info,  Node: OMP_SCHEDULE,  Next: OMP_STACKSIZE,  Prev: OMP_NUM_THREADS,  Up: Environment Variables
d1054 1
a1054 1
3.5 'OMP_SCHEDULE' - How threads are scheduled
d1058 5
a1062 5
     Allows to specify 'schedule type' and 'chunk size'.  The value of
     the variable shall have the form: 'type[,chunk]' where 'type' is
     one of 'static', 'dynamic', 'guided' or 'auto' The optional 'chunk'
     size shall be a positive integer.  If undefined, dynamic scheduling
     and a chunk size of 1 is used.
d1068 2
a1069 2
     OpenMP specifications v3.1 (http://www.openmp.org/), sections 2.5.1
     and 4.1
d1072 1
a1072 1
File: libgomp.info,  Node: OMP_STACKSIZE,  Next: OMP_THREAD_LIMIT,  Prev: OMP_SCHEDULE,  Up: Environment Variables
d1074 1
a1074 1
3.6 'OMP_STACKSIZE' - Set default thread stack size
d1079 6
a1084 6
     is suffixed by 'B', 'K', 'M' or 'G', in which case the size is,
     respectively, in bytes, kilobytes, megabytes or gigabytes.  This is
     different from 'pthread_attr_setstacksize' which gets the number of
     bytes as an argument.  If the stack size cannot be set due to
     system constraints, an error is reported and the initial stack size
     is left unchanged.  If undefined, the stack size is system
d1091 1
a1091 1
File: libgomp.info,  Node: OMP_THREAD_LIMIT,  Next: OMP_WAIT_POLICY,  Prev: OMP_STACKSIZE,  Up: Environment Variables
d1093 1
a1093 1
3.7 'OMP_THREAD_LIMIT' - Set the maximum number of threads
d1097 2
a1098 2
     Specifies the number of threads to use for the whole program.  The
     value of this variable shall be a positive integer.  If undefined,
d1110 1
a1110 1
3.8 'OMP_WAIT_POLICY' - How waiting threads are handled
d1114 3
a1116 3
     Specifies whether waiting threads should be active or passive.  If
     the value is 'PASSIVE', waiting threads should not consume CPU
     power while waiting; while the value is 'ACTIVE' specifies that
d1125 1
a1125 1
3.9 'OMP_PROC_BIND' - Whether theads may be moved between CPUs
d1129 2
a1130 2
     Specifies whether threads may be moved between processors.  If set
     to 'true', OpenMP theads should not be moved, if set to 'false'
d1142 1
a1142 1
3.10 'GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d1146 2
a1147 2
     Binds threads to specific CPUs.  The variable should contain a
     space-separated or comma-separated list of CPUs.  This list may
d1150 2
a1151 2
     (M-N:S). CPU numbers are zero based.  For example,
     'GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
d1155 1
a1155 1
     beginning of the list.  'GOMP_CPU_AFFINITY=0' binds all threads to
d1159 4
a1162 4
     affinity specification is in effect.  As a workaround,
     language-specific library functions, e.g., 'getenv' in C or
     'GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
     setting of the 'GOMP_CPU_AFFINITY' environment variable.  A defined
d1175 1
a1175 1
3.11 'GOMP_STACKSIZE' - Set default thread stack size
d1179 3
a1181 3
     Set the default thread stack size in kilobytes.  This is different
     from 'pthread_attr_setstacksize' which gets the number of bytes as
     an argument.  If the stack size cannot be set due to system
d1183 1
a1183 1
     left unchanged.  If undefined, the stack size is system dependent.
d1200 2
a1201 2
The following sections present notes on the external ABI as presented by
libgomp.  Only maintainers should need them.
d1261 1
a1261 1
The target should implement the '__sync' builtins.
d1277 1
a1277 1
Expands to the '__sync_synchronize' builtin.
d1293 4
a1296 4
In _most_ cases we can map this directly to '__thread'.  Except that OMP
allows constructors for C++ objects.  We can either refuse to support
this (how often is it used?)  or we can implement something akin to
.ctors.
d1328 2
a1329 2
   It is not clear what to do with bare FOR or SECTION blocks.  The only
thing I can figure is that we do something like:
d1347 2
a1348 2
for the two variables, i.e.  not something you could write directly in
C. Presumably this only makes sense if the "outer" x and y are global
d1361 4
a1364 4
pointer to an array of the type of the variable, indexed by the thread's
TEAM_ID.  The thread stores its final value into the array, and after
the barrier, the master thread iterates over the array to collect the
values.
d1401 3
a1403 3
   The function needs to create the appropriate number of threads and/or
launch them from the dock.  It needs to create the team structure and
assign team ids.
d1408 1
a1408 1
'omp_in_parallel()' state.
d1460 2
a1461 2
also pull it into a local variable if we like, but since its supposed to
remain unchanged, we can also not if we like.
d1463 5
a1467 5
   If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be able
to get away with no work-sharing context at all, since we can simply
perform the arithmetic directly in each thread to divide up the
iterations.  Which would mean that we wouldn't need to call any of these
routines.
d1571 1
a1571 1
     Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
d1599 3
a1601 3
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
d1620 10
a1629 9
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
d1666 2
a1667 2
     infringement under applicable copyright law, except executing it on
     a computer or modifying a private copy.  Propagation includes
d1681 2
a1682 2
     the extent that warranties are provided), that licensees may convey
     the work under this License, and how to view a copy of this
d1690 2
a1691 2
     for making modifications to it.  "Object code" means any non-source
     form of a work.
d1702 4
a1705 4
     Major Component, and (b) serves only to enable use of the work with
     that Major Component, or to implement a Standard Interface for
     which an implementation is available to the public in source code
     form.  A "Major Component", in this context, means a major
d1713 3
a1715 3
     work) run the object code and to modify the work, including scripts
     to control those activities.  However, it does not include the
     work's System Libraries, or general-purpose tools or generally
d1718 4
a1721 4
     Corresponding Source includes interface definition files associated
     with source files for the work, and the source code for shared
     libraries and dynamically linked subprograms that the work is
     specifically designed to require, such as by intimate data
d1738 4
a1741 4
     a covered work is covered by this License only if the output, given
     its content, constitutes a covered work.  This License acknowledges
     your rights of fair use or other equivalent, as provided by
     copyright law.
d1746 8
a1753 8
     sole purpose of having them make modifications exclusively for you,
     or provide you with facilities for running those works, provided
     that you comply with the terms of this License in conveying all
     material for which you do not control copyright.  Those thus making
     or running the covered works for you must do so exclusively on your
     behalf, under your direction and control, on terms that prohibit
     them from making any copies of your copyrighted material outside
     their relationship with you.
d1770 2
a1771 2
     with respect to the covered work, and you disclaim any intention to
     limit operation or modification of the work as a means of
d1841 2
a1842 2
          written offer, valid for at least three years and valid for as
          long as you offer spare parts or customer support for that
d1852 2
a1853 2
       c. Convey individual copies of the object code with a copy of the
          written offer to provide the Corresponding Source.  This
d1859 2
a1860 2
          place (gratis or for a charge), and offer equivalent access to
          the Corresponding Source in the same way through the same
d1864 4
a1867 4
          Corresponding Source may be on a different server (operated by
          you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to the
          object code saying where to find the Corresponding Source.
d1869 2
a1870 2
          remain obligated to ensure that it is available for as long as
          needed to satisfy these requirements.
d1877 1
d1885 2
a1886 2
     incorporation into a dwelling.  In determining whether a product is
     a consumer product, doubtful cases shall be resolved in favor of
d1917 5
a1921 5
     warranty, or updates for a work that has been modified or installed
     by the recipient, or for the User Product in which it has been
     modified or installed.  Access to a network may be denied when the
     modification itself materially and adversely affects the operation
     of the network or violates the rules and protocols for
d1951 2
a1952 2
     holders of that material) supplement the terms of this License with
     terms:
d1962 3
a1964 2
          or requiring that modified versions of such material be marked
          in reasonable ways as different from the original version; or
d1983 5
a1987 4
     contains a further restriction but permits relicensing or conveying
     under this License, you may add to a covered work material governed
     by the terms of that license document, provided that the further
     restriction does not survive such relicensing or conveying.
d2003 2
a2004 2
     under this License (including any patent licenses granted under the
     third paragraph of section 11).
d2008 2
a2009 2
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
d2021 4
a2024 4
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, you do not qualify to receive new licenses
     for the same material under section 10.
d2038 1
a2038 1
  10. Automatic Licensing of Downstream Recipients.
d2052 4
a2055 4
     could give under the previous paragraph, plus a right to possession
     of the Corresponding Source of the work from the predecessor in
     interest, if the predecessor has it or can get it with reasonable
     efforts.
d2059 6
a2064 6
     may not impose a license fee, royalty, or other charge for exercise
     of rights granted under this License, and you may not initiate
     litigation (including a cross-claim or counterclaim in a lawsuit)
     alleging that any patent claim is infringed by making, using,
     selling, offering for sale, or importing the Program or any portion
     of it.
d2066 1
a2066 1
  11. Patents.
d2086 2
a2087 2
     otherwise run, modify and propagate the contents of its contributor
     version.
d2092 3
a2094 3
     patent or covenant not to sue for patent infringement).  To "grant"
     such a patent license to a party means to make such an agreement or
     commitment not to enforce a patent against the party.
d2124 10
a2133 10
     party that is in the business of distributing software, under which
     you make payment to the third party based on the extent of your
     activity of conveying the work, and under which the third party
     grants, to any of the parties who would receive the covered work
     from you, a discriminatory patent license (a) in connection with
     copies of the covered work conveyed by you (or copies made from
     those copies), or (b) primarily for and in connection with specific
     products or compilations that contain the covered work, unless you
     entered into that arrangement, or that patent license was granted,
     prior to 28 March 2007.
d2139 1
a2139 1
  12. No Surrender of Others' Freedom.
d2141 11
a2151 10
     If conditions are imposed on you (whether by court order, agreement
     or otherwise) that contradict the conditions of this License, they
     do not excuse you from the conditions of this License.  If you
     cannot convey a covered work so as to satisfy simultaneously your
     obligations under this License and any other pertinent obligations,
     then as a consequence you may not convey it at all.  For example,
     if you agree to terms that obligate you to collect a royalty for
     further conveying from those to whom you convey the Program, the
     only way you could satisfy both those terms and this License would
     be to refrain entirely from conveying the Program.
d2153 1
a2153 1
  13. Use with the GNU Affero General Public License.
d2164 1
a2164 1
  14. Revised Versions of this License.
d2167 4
a2170 3
     versions of the GNU General Public License from time to time.  Such
     new versions will be similar in spirit to the present version, but
     may differ in detail to address new problems or concerns.
d2176 4
a2179 4
     that numbered version or of any later version published by the Free
     Software Foundation.  If the Program does not specify a version
     number of the GNU General Public License, you may choose any
     version ever published by the Free Software Foundation.
d2191 1
a2191 1
  15. Disclaimer of Warranty.
d2194 1
a2194 1
     APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
d2198 1
a2198 1
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
d2203 1
a2203 1
  16. Limitation of Liability.
d2207 2
a2208 2
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
     DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
d2216 1
a2216 1
  17. Interpretation of Sections 15 and 16.
d2225 1
d2256 1
a2256 1
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
d2265 1
a2265 1
     This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
d2267 1
a2267 1
     under certain conditions; type 'show c' for details.
d2269 1
a2269 1
   The hypothetical commands 'show w' and 'show c' should show the
d2277 1
a2277 1
the GNU GPL, see <http://www.gnu.org/licenses/>.
d2284 1
a2284 1
please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
d2295 1
a2295 1
     <http://fsf.org/>
d2320 2
a2321 2
     of subject matter or whether it is published as a printed book.  We
     recommend this License principally for works whose purpose is
d2327 2
a2328 2
     that contains a notice placed by the copyright holder saying it can
     be distributed under the terms of this License.  Such a notice
d2332 3
a2334 3
     of the public is a licensee, and is addressed as "you".  You accept
     the license if you copy, modify or distribute the work in a way
     requiring permission under copyright law.
d2352 6
a2357 6
     titles are designated, as being those of Invariant Sections, in the
     notice that says that the Document is released under this License.
     If a section does not fit the above definition of Secondary then it
     is not allowed to be designated as Invariant.  The Document may
     contain zero Invariant Sections.  If the Document does not identify
     any Invariant Sections then there are none.
d2368 10
a2377 10
     straightforwardly with generic text editors or (for images composed
     of pixels) generic paint programs or (for drawings) some widely
     available drawing editor, and that is suitable for input to text
     formatters or for automatic translation to a variety of formats
     suitable for input to text formatters.  A copy made in an otherwise
     Transparent file format whose markup, or absence of markup, has
     been arranged to thwart or discourage subsequent modification by
     readers is not Transparent.  An image format is not Transparent if
     used for any substantial amount of text.  A copy that is not
     "Transparent" is called "Opaque".
d2381 8
a2388 8
     SGML or XML using a publicly available DTD, and standard-conforming
     simple HTML, PostScript or PDF designed for human modification.
     Examples of transparent image formats include PNG, XCF and JPG.
     Opaque formats include proprietary formats that can be read and
     edited only by proprietary word processors, SGML or XML for which
     the DTD and/or processing tools are not generally available, and
     the machine-generated HTML, PostScript or PDF produced by some word
     processors for output purposes only.
d2426 2
a2427 2
     distribute a large enough number of copies you must also follow the
     conditions in section 3.
d2441 6
a2446 5
     front cover must present the full title with all words of the title
     equally prominent and visible.  You may add other material on the
     covers in addition.  Copying with changes limited to the covers, as
     long as they preserve the title of the Document and satisfy these
     conditions, can be treated as verbatim copying in other respects.
d2454 12
a2465 11
     numbering more than 100, you must either include a machine-readable
     Transparent copy along with each Opaque copy, or state in or with
     each Opaque copy a computer-network location from which the general
     network-using public has access to download using public-standard
     network protocols a complete Transparent copy of the Document, free
     of added material.  If you use the latter option, you must take
     reasonably prudent steps, when you begin distribution of Opaque
     copies in quantity, to ensure that this Transparent copy will
     remain thus accessible at the stated location until at least one
     year after the last time you distribute an Opaque copy (directly or
     through your agents or retailers) of that edition to the public.
d2468 3
a2470 3
     the Document well before redistributing any large number of copies,
     to give them a chance to provide you with an updated version of the
     Document.
d2476 5
a2480 5
     release the Modified Version under precisely this License, with the
     Modified Version filling the role of the Document, thus licensing
     distribution and modification of the Modified Version to whoever
     possesses a copy of it.  In addition, you must do these things in
     the Modified Version:
d2483 5
a2487 5
          distinct from that of the Document, and from those of previous
          versions (which should, if there were any, be listed in the
          History section of the Document).  You may use the same title
          as a previous version if the original publisher of that
          version gives permission.
d2517 6
a2522 6
          authors, and publisher of the Modified Version as given on the
          Title Page.  If there is no section Entitled "History" in the
          Document, create one stating the title, year, authors, and
          publisher of the Document as given on its Title Page, then add
          an item describing the Modified Version as stated in the
          previous sentence.
d2527 5
a2531 5
          previous versions it was based on.  These may be placed in the
          "History" section.  You may omit a network location for a work
          that was published at least four years before the Document
          itself, or if the original publisher of the version it refers
          to gives permission.
d2534 2
a2535 2
          Preserve the Title of the section, and preserve in the section
          all the substance and tone of each of the contributor
d2538 4
a2541 3
       L. Preserve all the Invariant Sections of the Document, unaltered
          in their text and in their titles.  Section numbers or the
          equivalent are not considered part of the section titles.
d2554 5
a2558 5
     material copied from the Document, you may at your option designate
     some or all of these sections as invariant.  To do this, add their
     titles to the list of Invariant Sections in the Modified Version's
     license notice.  These titles must be distinct from any other
     section titles.
d2567 9
a2575 9
     and a passage of up to 25 words as a Back-Cover Text, to the end of
     the list of Cover Texts in the Modified Version.  Only one passage
     of Front-Cover Text and one of Back-Cover Text may be added by (or
     through arrangements made by) any one entity.  If the Document
     already includes a cover text for the same cover, previously added
     by you or by arrangement made by the same entity you are acting on
     behalf of, you may not add another; but you may replace the old
     one, on explicit permission from the previous publisher that added
     the old one.
d2585 2
a2586 2
     modified versions, provided that you include in the combination all
     of the Invariant Sections of all of the original documents,
d2613 2
a2614 2
     rules of this License for verbatim copying of each of the documents
     in all other respects.
d2618 3
a2620 3
     a copy of this License into the extracted document, and follow this
     License in all other respects regarding verbatim copying of that
     document.
d2625 2
a2626 2
     separate and independent documents or works, in or on a volume of a
     storage or distribution medium, is called an "aggregate" if the
d2671 2
a2672 2
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
d2684 4
a2687 4
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, receipt of a copy of some or all of the
     same material does not give you any rights to use it.
d2689 1
a2689 1
  10. FUTURE REVISIONS OF THIS LICENSE
d2695 1
a2695 1
     <http://www.gnu.org/copyleft/>.
d2702 5
a2706 5
     published (not as a draft) by the Free Software Foundation.  If the
     Document does not specify a version number of this License, you may
     choose any version ever published (not as a draft) by the Free
     Software Foundation.  If the Document specifies that a proxy can
     decide which future versions of this License can be used, that
d2710 1
a2710 1
  11. RELICENSING
d2740 1
d2757 1
a2757 1
Texts, replace the "with...Texts."  line with this:
d2768 3
a2770 3
recommend releasing these examples in parallel under your choice of free
software license, such as the GNU General Public License, to permit
their use in free software.
d2800 2
a2801 2
can greatly alter what fraction of the sales price counts as profit.  If
the price you pay is $50, ten percent of the profit is probably less
d2811 2
a2812 2
ports such as adding a new CPU to the GNU Compiler Collection contribute
more; major new features or packages contribute the most.
d2831 10
a2841 10
* Environment Variable <1>:              OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable <2>:              OMP_NESTED.            (line 6)
* Environment Variable <3>:              OMP_NUM_THREADS.       (line 6)
* Environment Variable <4>:              OMP_SCHEDULE.          (line 6)
* Environment Variable <5>:              OMP_STACKSIZE.         (line 6)
* Environment Variable <6>:              OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <7>:              OMP_WAIT_POLICY.       (line 6)
* Environment Variable <8>:              OMP_PROC_BIND.         (line 6)
* Environment Variable <9>:              GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <10>:             GOMP_STACKSIZE.        (line 6)
d2844 3
a2847 3
* Implementation specific setting <1>:   OMP_NUM_THREADS.       (line 6)
* Implementation specific setting <2>:   OMP_SCHEDULE.          (line 6)
* Implementation specific setting <3>:   GOMP_STACKSIZE.        (line 6)
d2853 67
a2919 67
Node: Top1992
Node: Enabling OpenMP3186
Node: Runtime Library Routines3973
Node: omp_get_active_level6422
Node: omp_get_ancestor_thread_num7128
Node: omp_get_dynamic8059
Node: omp_get_level8940
Node: omp_get_max_active_levels9566
Node: omp_get_max_threads10271
Node: omp_get_nested11029
Node: omp_get_num_procs11945
Node: omp_get_num_threads12465
Node: omp_get_schedule13552
Node: omp_get_team_size14479
Node: omp_get_thread_limit15445
Node: omp_get_thread_num16070
Node: omp_in_parallel16942
Node: omp_in_final17592
Node: omp_set_dynamic18266
Node: omp_set_max_active_levels19107
Node: omp_set_nested19890
Node: omp_set_num_threads20773
Node: omp_set_schedule21612
Node: omp_init_lock22691
Node: omp_set_lock23345
Node: omp_test_lock24201
Node: omp_unset_lock25178
Node: omp_destroy_lock26110
Node: omp_init_nest_lock26788
Node: omp_set_nest_lock27524
Node: omp_test_nest_lock28440
Node: omp_unset_nest_lock29468
Node: omp_destroy_nest_lock30484
Node: omp_get_wtick31236
Node: omp_get_wtime31829
Node: Environment Variables32606
Node: OMP_DYNAMIC33734
Node: OMP_MAX_ACTIVE_LEVELS34304
Node: OMP_NESTED34944
Node: OMP_NUM_THREADS35550
Node: OMP_SCHEDULE36238
Node: OMP_STACKSIZE36932
Node: OMP_THREAD_LIMIT37762
Node: OMP_WAIT_POLICY38360
Node: OMP_PROC_BIND38922
Node: GOMP_CPU_AFFINITY39481
Node: GOMP_STACKSIZE41026
Node: The libgomp ABI41839
Node: Implementing MASTER construct42638
Node: Implementing CRITICAL construct43052
Node: Implementing ATOMIC construct43791
Node: Implementing FLUSH construct44272
Node: Implementing BARRIER construct44543
Node: Implementing THREADPRIVATE construct44812
Node: Implementing PRIVATE clause45465
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses46046
Node: Implementing REDUCTION clause47370
Node: Implementing PARALLEL construct47927
Node: Implementing FOR construct49184
Node: Implementing ORDERED construct51182
Node: Implementing SECTIONS construct51488
Node: Implementing SINGLE construct52254
Node: Reporting Bugs52916
Node: Copying53226
Node: GNU Free Documentation License90773
Node: Funding115896
Node: Library Index118422
@


1.1.1.5
log
@initial import of GCC 4.8.5 sources.  these GCC PRs (at least) are
fixed in this release:

64882 46102 58123 65409 59626 61058 65680 64487 65721 65727
52306 64768 56273 57653 59990 60656 61634 63844 64199 64493
64495 65549 57059 57569 57748 58369 62642 63608 64037 65550
65693 65220 45187 64409 61977 64513 64634 65368 66233 66470
65072 65327 65543 65279 63593 65063 65518 66123 66140 59016
64479 64557 64979 66215 66275 66481 39423 64766 63733 52714
60898 61138 63744 57023 39722 45402 52579 52664 60718 62044
59513 35330 37440 43701

see:
  https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.8.5
for more details.
@
text
@d1 2
a2 2
This is libgomp.info, produced by makeinfo version 4.12 from
/space/rguenther/gcc-4.8.5/gcc-4.8.5/libgomp/libgomp.texi.
d21 2
a22 3
software.  Copies published by the Free Software Foundation raise
funds for GNU development.

d51 2
a52 2
software.  Copies published by the Free Software Foundation raise
funds for GNU development.
d62 2
a63 2
(API) for multi-platform shared-memory parallel programming in C/C++
and Fortran.
d89 5
a93 5
compile-time flag `-fopenmp' must be specified. This enables the OpenMP
directive `#pragma omp' in C/C++ and `!$omp' directives in free form,
`c$omp', `*$omp' and `!$omp' directives in fixed form, `!$' conditional
compilation sentinels in free form and `c$', `*$' and `!$' sentinels in
fixed form, for Fortran. The flag also arranges for automatic linking
d96 3
a98 3
   A complete description of all OpenMP directives accepted may be
found in the OpenMP Application Program Interface
(http://www.openmp.org) manual, version 3.1.
d107 1
a107 1
OpenMP specifications in version 3.1. The routines are structured in
d160 1
a160 1
2.1 `omp_get_active_level' - Number of parallel regions
d168 1
a168 1
     _Prototype_:  `int omp_get_active_level(void);'
d171 1
a171 1
     _Interface_:  `integer function omp_get_active_level()'
d184 1
a184 1
2.2 `omp_get_ancestor_thread_num' - Ancestor thread ID
d189 3
a191 3
     given nesting level of the current thread. For values of LEVEL
     outside zero to `omp_get_level' -1 is returned; if LEVEL is
     `omp_get_level' the result is identical to `omp_get_thread_num'.
d194 1
a194 1
     _Prototype_:  `int omp_get_ancestor_thread_num(int level);'
d197 2
a198 2
     _Interface_:  `integer function omp_get_ancestor_thread_num(level)'
                   `integer level'
d211 1
a211 1
2.3 `omp_get_dynamic' - Dynamic teams setting
d215 2
a216 2
     This function returns `true' if enabled, `false' otherwise.  Here,
     `true' and `false' represent their language-specific counterparts.
d219 2
a220 2
     `OMP_DYNAMIC' environment variable or at runtime using
     `omp_set_dynamic'. If undefined, dynamic adjustment is disabled by
d224 1
a224 1
     _Prototype_:  `int omp_get_dynamic(void);'
d227 1
a227 1
     _Interface_:  `logical function omp_get_dynamic()'
d238 1
a238 1
2.4 `omp_get_level' - Obtain the current nesting level
d246 1
a246 1
     _Prototype_:  `int omp_get_level(void);'
d249 1
a249 1
     _Interface_:  `integer function omp_level()'
d261 1
a261 1
2.5 `omp_get_max_active_levels' - Maximum number of active regions
d269 1
a269 1
     _Prototype_:  `int omp_get_max_active_levels(void);'
d272 1
a272 1
     _Interface_:  `integer function omp_get_max_active_levels()'
d284 1
a284 1
2.6 `omp_get_max_threads' - Maximum number of threads of parallel region
d289 1
a289 1
     region that does not use the clause `num_threads'.
d292 1
a292 1
     _Prototype_:  `int omp_get_max_threads(void);'
d295 1
a295 1
     _Interface_:  `integer function omp_get_max_threads()'
d307 1
a307 1
2.7 `omp_get_nested' - Nested parallel regions
d311 2
a312 2
     This function returns `true' if nested parallel regions are
     enabled, `false' otherwise. Here, `true' and `false' represent
d316 2
a317 2
     `OMP_NESTED' environment variable or at runtime using
     `omp_set_nested'. If undefined, nested parallel regions are
d321 1
a321 1
     _Prototype_:  `int omp_get_nested(void);'
d324 1
a324 1
     _Interface_:  `logical function omp_get_nested()'
d336 1
a336 1
2.8 `omp_get_num_procs' - Number of processors online
d343 1
a343 1
     _Prototype_:  `int omp_get_num_procs(void);'
d346 1
a346 1
     _Interface_:  `integer function omp_get_num_procs()'
d354 1
a354 1
2.9 `omp_get_num_threads' - Size of the active team
d358 2
a359 2
     Returns the number of threads in the current team. In a sequential
     section of the program `omp_get_num_threads' returns 1.
d362 4
a365 4
     `OMP_NUM_THREADS' environment variable. At runtime, the size of
     the current team may be set either by the `NUM_THREADS' clause or
     by `omp_set_num_threads'. If none of the above were used to define
     a specific value and `OMP_DYNAMIC' is disabled, one thread per CPU
d369 1
a369 1
     _Prototype_:  `int omp_get_num_threads(void);'
d372 1
a372 1
     _Interface_:  `integer function omp_get_num_threads()'
d384 1
a384 1
2.10 `omp_get_schedule' - Obtain the runtime scheduling method
d388 3
a390 3
     Obtain the runtime scheduling method. The KIND argument will be
     set to the value `omp_sched_static', `omp_sched_dynamic',
     `omp_sched_guided' or `omp_sched_auto'. The second argument,
d394 1
a394 1
     _Prototype_:  `void omp_schedule(omp_sched_t *kind, int *modifier);'
d397 3
a399 3
     _Interface_:  `subroutine omp_schedule(kind, modifier)'
                   `integer(kind=omp_sched_kind) kind'
                   `integer modifier'
d411 1
a411 1
2.11 `omp_get_team_size' - Number of threads in a team
d416 4
a419 4
     which either the current thread or its ancestor belongs. For
     values of LEVEL outside zero to `omp_get_level', -1 is returned;
     if LEVEL is zero, 1 is returned, and for `omp_get_level', the
     result is identical to `omp_get_num_threads'.
d422 1
a422 1
     _Prototype_:  `int omp_get_team_size(int level);'
d425 2
a426 2
     _Interface_:  `integer function omp_get_team_size(level)'
                   `integer level'
d439 1
a439 1
2.12 `omp_get_thread_limit' - Maximum number of threads
d446 1
a446 1
     _Prototype_:  `int omp_get_thread_limit(void);'
d449 1
a449 1
     _Interface_:  `integer function omp_get_thread_limit()'
d461 1
a461 1
2.13 `omp_get_thread_num' - Current thread ID
d466 3
a468 3
     team.  In a sequential parts of the program, `omp_get_thread_num'
     always returns 0. In parallel regions the return value varies from
     0 to `omp_get_num_threads'-1 inclusive. The return value of the
d472 1
a472 1
     _Prototype_:  `int omp_get_thread_num(void);'
d475 1
a475 1
     _Interface_:  `integer function omp_get_thread_num()'
d486 1
a486 1
2.14 `omp_in_parallel' - Whether a parallel region is active
d490 2
a491 2
     This function returns `true' if currently running in parallel,
     `false' otherwise. Here, `true' and `false' represent their
d495 1
a495 1
     _Prototype_:  `int omp_in_parallel(void);'
d498 1
a498 1
     _Interface_:  `logical function omp_in_parallel()'
d506 1
a506 1
2.15 `omp_in_final' - Whether in final or included task region
d510 2
a511 2
     This function returns `true' if currently running in a final or
     included task region, `false' otherwise. Here, `true' and `false'
d515 1
a515 1
     _Prototype_:  `int omp_in_final(void);'
d518 1
a518 1
     _Interface_:  `logical function omp_in_final()'
d527 1
a527 1
2.16 `omp_set_dynamic' - Enable/disable dynamic teams
d532 3
a534 3
     within a team. The function takes the language-specific equivalent
     of `true' and `false', where `true' enables dynamic adjustment of
     team sizes and `false' disables it.
d537 1
a537 1
     _Prototype_:  `void omp_set_dynamic(int set);'
d540 2
a541 2
     _Interface_:  `subroutine omp_set_dynamic(set)'
                   `logical, intent(in) :: set'
d552 1
a552 1
2.17 `omp_set_max_active_levels' - Limits the number of active parallel regions
d560 1
a560 1
     _Prototype_:  `void omp_set_max_active_levels(int max_levels);'
d563 2
a564 2
     _Interface_:  `subroutine omp_set_max_active_levels(max_levels)'
                   `integer max_levels'
d576 1
a576 1
2.18 `omp_set_nested' - Enable/disable nested parallel regions
d581 3
a583 3
     members are allowed to create new teams. The function takes the
     language-specific equivalent of `true' and `false', where `true'
     enables dynamic adjustment of team sizes and `false' disables it.
d586 1
a586 1
     _Prototype_:  `void omp_set_nested(int set);'
d589 2
a590 2
     _Interface_:  `subroutine omp_set_nested(set)'
                   `logical, intent(in) :: set'
d601 1
a601 1
2.19 `omp_set_num_threads' - Set upper team size limit
d606 2
a607 2
     parallel sections, if those do not specify a `num_threads' clause.
     The argument of `omp_set_num_threads' shall be a positive integer.
d610 1
a610 1
     _Prototype_:  `void omp_set_num_threads(int n);'
d613 2
a614 2
     _Interface_:  `subroutine omp_set_num_threads(n)'
                   `integer, intent(in) :: n'
d626 1
a626 1
2.20 `omp_set_schedule' - Set the runtime scheduling method
d630 3
a632 3
     Sets the runtime scheduling method. The KIND argument can have the
     value `omp_sched_static', `omp_sched_dynamic', `omp_sched_guided'
     or `omp_sched_auto'. Except for `omp_sched_auto', the chunk size
d634 1
a634 1
     value if zero or negative.  For `omp_sched_auto' the MODIFIER
d638 2
a639 2
     _Prototype_:  `void omp_set_schedule(omp_sched_t *kind, int
                   *modifier);'
d642 3
a644 3
     _Interface_:  `subroutine omp_set_schedule(kind, modifier)'
                   `integer(kind=omp_sched_kind) kind'
                   `integer modifier'
d656 1
a656 1
2.21 `omp_init_lock' - Initialize simple lock
d664 1
a664 1
     _Prototype_:  `void omp_init_lock(omp_lock_t *lock);'
d667 2
a668 2
     _Interface_:  `subroutine omp_init_lock(lock)'
                   `integer(omp_lock_kind), intent(out) :: lock'
d679 1
a679 1
2.22 `omp_set_lock' - Wait for and set simple lock
d683 4
a686 4
     Before setting a simple lock, the lock variable must be
     initialized by `omp_init_lock'. The calling thread is blocked
     until the lock is available. If the lock is already held by the
     current thread, a deadlock occurs.
d689 1
a689 1
     _Prototype_:  `void omp_set_lock(omp_lock_t *lock);'
d692 2
a693 2
     _Interface_:  `subroutine omp_set_lock(lock)'
                   `integer(omp_lock_kind), intent(inout) :: lock'
d705 1
a705 1
2.23 `omp_test_lock' - Test and set simple lock if available
d709 5
a713 5
     Before setting a simple lock, the lock variable must be
     initialized by `omp_init_lock'. Contrary to `omp_set_lock',
     `omp_test_lock' does not block if the lock is not available. This
     function returns `true' upon success, `false' otherwise. Here,
     `true' and `false' represent their language-specific counterparts.
d716 1
a716 1
     _Prototype_:  `int omp_test_lock(omp_lock_t *lock);'
d719 2
a720 2
     _Interface_:  `logical function omp_test_lock(lock)'
                   `integer(omp_lock_kind), intent(inout) :: lock'
d731 1
a731 1
2.24 `omp_unset_lock' - Unset simple lock
d736 3
a738 3
     `omp_set_lock' or `omp_test_lock' before. In addition, the lock
     must be held by the thread calling `omp_unset_lock'. Then, the
     lock becomes unlocked. If one or more threads attempted to set the
d743 1
a743 1
     _Prototype_:  `void omp_unset_lock(omp_lock_t *lock);'
d746 2
a747 2
     _Interface_:  `subroutine omp_unset_lock(lock)'
                   `integer(omp_lock_kind), intent(inout) :: lock'
d758 1
a758 1
2.25 `omp_destroy_lock' - Destroy simple lock
d762 1
a762 1
     Destroy a simple lock. In order to be destroyed, a simple lock
d766 1
a766 1
     _Prototype_:  `void omp_destroy_lock(omp_lock_t *lock);'
d769 2
a770 2
     _Interface_:  `subroutine omp_destroy_lock(lock)'
                   `integer(omp_lock_kind), intent(inout) :: lock'
d781 1
a781 1
2.26 `omp_init_nest_lock' - Initialize nested lock
d789 1
a789 1
     _Prototype_:  `void omp_init_nest_lock(omp_nest_lock_t *lock);'
d792 2
a793 2
     _Interface_:  `subroutine omp_init_nest_lock(lock)'
                   `integer(omp_nest_lock_kind), intent(out) :: lock'
d804 1
a804 1
2.27 `omp_set_nest_lock' - Wait for and set nested lock
d808 4
a811 4
     Before setting a nested lock, the lock variable must be
     initialized by `omp_init_nest_lock'. The calling thread is blocked
     until the lock is available. If the lock is already held by the
     current thread, the nesting count for the lock is incremented.
d814 1
a814 1
     _Prototype_:  `void omp_set_nest_lock(omp_nest_lock_t *lock);'
d817 2
a818 2
     _Interface_:  `subroutine omp_set_nest_lock(lock)'
                   `integer(omp_nest_lock_kind), intent(inout) :: lock'
d829 1
a829 1
2.28 `omp_test_nest_lock' - Test and set nested lock if available
d833 5
a837 6
     Before setting a nested lock, the lock variable must be
     initialized by `omp_init_nest_lock'. Contrary to
     `omp_set_nest_lock', `omp_test_nest_lock' does not block if the
     lock is not available.  If the lock is already held by the current
     thread, the new nesting count is returned. Otherwise, the return
     value equals zero.
d840 1
a840 1
     _Prototype_:  `int omp_test_nest_lock(omp_nest_lock_t *lock);'
d843 2
a844 2
     _Interface_:  `logical function omp_test_nest_lock(lock)'
                   `integer(omp_nest_lock_kind), intent(inout) :: lock'
d855 1
a855 1
2.29 `omp_unset_nest_lock' - Unset nested lock
d860 1
a860 1
     `omp_set_nested_lock' or `omp_test_nested_lock' before. In
d862 2
a863 2
     `omp_unset_nested_lock'. If the nesting count drops to zero, the
     lock becomes unlocked. If one ore more threads attempted to set
d868 1
a868 1
     _Prototype_:  `void omp_unset_nest_lock(omp_nest_lock_t *lock);'
d871 2
a872 2
     _Interface_:  `subroutine omp_unset_nest_lock(lock)'
                   `integer(omp_nest_lock_kind), intent(inout) :: lock'
d883 1
a883 1
2.30 `omp_destroy_nest_lock' - Destroy nested lock
d887 1
a887 1
     Destroy a nested lock. In order to be destroyed, a nested lock
d892 1
a892 1
     _Prototype_:  `void omp_destroy_nest_lock(omp_nest_lock_t *);'
d895 2
a896 2
     _Interface_:  `subroutine omp_destroy_nest_lock(lock)'
                   `integer(omp_nest_lock_kind), intent(inout) :: lock'
d907 1
a907 1
2.31 `omp_get_wtick' - Get timer precision
d915 1
a915 1
     _Prototype_:  `double omp_get_wtick(void);'
d918 1
a918 1
     _Interface_:  `double precision function omp_get_wtick()'
d929 1
a929 1
2.32 `omp_get_wtime' - Elapsed wall clock time
d933 1
a933 1
     Elapsed wall clock time in seconds. The time is measured per
d940 1
a940 1
     _Prototype_:  `double omp_get_wtime(void);'
d943 1
a943 1
     _Interface_:  `double precision function omp_get_wtime()'
d957 5
a961 5
The variables `OMP_DYNAMIC', `OMP_MAX_ACTIVE_LEVELS', `OMP_NESTED',
`OMP_NUM_THREADS', `OMP_SCHEDULE', `OMP_STACKSIZE',`OMP_THREAD_LIMIT'
and `OMP_WAIT_POLICY' are defined by section 4 of the OpenMP
specifications in version 3.1, while `GOMP_CPU_AFFINITY' and
`GOMP_STACKSIZE' are GNU extensions.
d980 1
a980 1
3.1 `OMP_DYNAMIC' - Dynamic adjustment of threads
d985 2
a986 2
     within a team. The value of this environment variable shall be
     `TRUE' or `FALSE'. If undefined, dynamic adjustment is disabled by
d998 1
a998 1
3.2 `OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1003 1
a1003 1
     parallel regions. The value of this variable shall be a positive
d1015 1
a1015 1
3.3 `OMP_NESTED' - Nested parallel regions
d1020 2
a1021 2
     members are allowed to create new teams. The value of this
     environment variable shall be `TRUE' or `FALSE'. If undefined,
d1031 1
a1031 1
File: libgomp.info,  Node: OMP_NUM_THREADS,  Next: OMP_STACKSIZE,  Prev: OMP_NESTED,  Up: Environment Variables
d1033 1
a1033 1
3.4 `OMP_NUM_THREADS' - Specifies the number of threads to use
d1037 5
a1041 5
     Specifies the default number of threads to use in parallel
     regions. The value of this variable shall be a comma-separated
     list of positive integers; the value specified the number of
     threads to use for the corresponding nested level. If undefined
     one thread per CPU is used.
d1050 1
a1050 1
File: libgomp.info,  Node: OMP_SCHEDULE,  Next: OMP_THREAD_LIMIT,  Prev: OMP_STACKSIZE,  Up: Environment Variables
d1052 1
a1052 1
3.5 `OMP_SCHEDULE' - How threads are scheduled
d1056 5
a1060 5
     Allows to specify `schedule type' and `chunk size'.  The value of
     the variable shall have the form: `type[,chunk]' where `type' is
     one of `static', `dynamic', `guided' or `auto' The optional
     `chunk' size shall be a positive integer. If undefined, dynamic
     scheduling and a chunk size of 1 is used.
d1066 2
a1067 2
     OpenMP specifications v3.1 (http://www.openmp.org/), sections
     2.5.1 and 4.1
d1070 1
a1070 1
File: libgomp.info,  Node: OMP_STACKSIZE,  Next: OMP_SCHEDULE,  Prev: OMP_NUM_THREADS,  Up: Environment Variables
d1072 1
a1072 1
3.6 `OMP_STACKSIZE' - Set default thread stack size
d1077 6
a1082 6
     is suffixed by `B', `K', `M' or `G', in which case the size is,
     respectively, in bytes, kilobytes, megabytes or gigabytes. This is
     different from `pthread_attr_setstacksize' which gets the number
     of bytes as an argument. If the stack size cannot be set due to
     system constraints, an error is reported and the initial stack
     size is left unchanged. If undefined, the stack size is system
d1089 1
a1089 1
File: libgomp.info,  Node: OMP_THREAD_LIMIT,  Next: OMP_WAIT_POLICY,  Prev: OMP_SCHEDULE,  Up: Environment Variables
d1091 1
a1091 1
3.7 `OMP_THREAD_LIMIT' - Set the maximum number of threads
d1095 2
a1096 2
     Specifies the number of threads to use for the whole program. The
     value of this variable shall be a positive integer. If undefined,
d1108 1
a1108 1
3.8 `OMP_WAIT_POLICY' - How waiting threads are handled
d1112 3
a1114 3
     Specifies whether waiting threads should be active or passive. If
     the value is `PASSIVE', waiting threads should not consume CPU
     power while waiting; while the value is `ACTIVE' specifies that
d1123 1
a1123 1
3.9 `OMP_PROC_BIND' - Whether theads may be moved between CPUs
d1127 2
a1128 2
     Specifies whether threads may be moved between processors. If set
     to `true', OpenMP theads should not be moved, if set to `false'
d1140 1
a1140 1
3.10 `GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d1144 2
a1145 2
     Binds threads to specific CPUs. The variable should contain a
     space-separated or comma-separated list of CPUs. This list may
d1148 2
a1149 2
     (M-N:S).  CPU numbers are zero based. For example,
     `GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
d1153 1
a1153 1
     beginning of the list.  `GOMP_CPU_AFFINITY=0' binds all threads to
d1157 4
a1160 4
     affinity specification is in effect. As a workaround,
     language-specific library functions, e.g., `getenv' in C or
     `GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
     setting of the `GOMP_CPU_AFFINITY' environment variable. A defined
d1173 1
a1173 1
3.11 `GOMP_STACKSIZE' - Set default thread stack size
d1177 3
a1179 3
     Set the default thread stack size in kilobytes. This is different
     from `pthread_attr_setstacksize' which gets the number of bytes as
     an argument. If the stack size cannot be set due to system
d1181 1
a1181 1
     left unchanged. If undefined, the stack size is system dependent.
d1198 2
a1199 2
The following sections present notes on the external ABI as presented
by libgomp.  Only maintainers should need them.
d1259 1
a1259 1
The target should implement the `__sync' builtins.
d1275 1
a1275 1
Expands to the `__sync_synchronize' builtin.
d1291 4
a1294 4
In _most_ cases we can map this directly to `__thread'.  Except that
OMP allows constructors for C++ objects.  We can either refuse to
support this (how often is it used?) or we can implement something akin
to .ctors.
d1326 2
a1327 2
   It is not clear what to do with bare FOR or SECTION blocks.  The
only thing I can figure is that we do something like:
d1345 2
a1346 2
for the two variables, i.e. not something you could write directly in
C.  Presumably this only makes sense if the "outer" x and y are global
d1359 4
a1362 4
pointer to an array of the type of the variable, indexed by the
thread's TEAM_ID.  The thread stores its final value into the array,
and after the barrier, the master thread iterates over the array to
collect the values.
d1399 3
a1401 3
   The function needs to create the appropriate number of threads
and/or launch them from the dock.  It needs to create the team
structure and assign team ids.
d1406 1
a1406 1
`omp_in_parallel()' state.
d1458 2
a1459 2
also pull it into a local variable if we like, but since its supposed
to remain unchanged, we can also not if we like.
d1461 5
a1465 5
   If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be
able to get away with no work-sharing context at all, since we can
simply perform the arithmetic directly in each thread to divide up the
iterations.  Which would mean that we wouldn't need to call any of
these routines.
d1569 1
a1569 1
     Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/'
d1597 3
a1599 3
these rights or asking you to surrender the rights.  Therefore, you
have certain responsibilities if you distribute copies of the software,
or if you modify it: responsibilities to respect the freedom of others.
d1618 9
a1626 10
modified versions of the software inside them, although the
manufacturer can do so.  This is fundamentally incompatible with the
aim of protecting users' freedom to change the software.  The
systematic pattern of such abuse occurs in the area of products for
individuals to use, which is precisely where it is most unacceptable.
Therefore, we have designed this version of the GPL to prohibit the
practice for those products.  If such problems arise substantially in
other domains, we stand ready to extend this provision to those domains
in future versions of the GPL, as needed to protect the freedom of
users.
d1663 2
a1664 2
     infringement under applicable copyright law, except executing it
     on a computer or modifying a private copy.  Propagation includes
d1678 2
a1679 2
     the extent that warranties are provided), that licensees may
     convey the work under this License, and how to view a copy of this
d1687 2
a1688 2
     for making modifications to it.  "Object code" means any
     non-source form of a work.
d1699 4
a1702 4
     Major Component, and (b) serves only to enable use of the work
     with that Major Component, or to implement a Standard Interface
     for which an implementation is available to the public in source
     code form.  A "Major Component", in this context, means a major
d1710 3
a1712 3
     work) run the object code and to modify the work, including
     scripts to control those activities.  However, it does not include
     the work's System Libraries, or general-purpose tools or generally
d1715 4
a1718 4
     Corresponding Source includes interface definition files
     associated with source files for the work, and the source code for
     shared libraries and dynamically linked subprograms that the work
     is specifically designed to require, such as by intimate data
d1735 4
a1738 4
     a covered work is covered by this License only if the output,
     given its content, constitutes a covered work.  This License
     acknowledges your rights of fair use or other equivalent, as
     provided by copyright law.
d1743 8
a1750 8
     sole purpose of having them make modifications exclusively for
     you, or provide you with facilities for running those works,
     provided that you comply with the terms of this License in
     conveying all material for which you do not control copyright.
     Those thus making or running the covered works for you must do so
     exclusively on your behalf, under your direction and control, on
     terms that prohibit them from making any copies of your
     copyrighted material outside their relationship with you.
d1767 2
a1768 2
     with respect to the covered work, and you disclaim any intention
     to limit operation or modification of the work as a means of
d1838 2
a1839 2
          written offer, valid for at least three years and valid for
          as long as you offer spare parts or customer support for that
d1849 2
a1850 2
       c. Convey individual copies of the object code with a copy of
          the written offer to provide the Corresponding Source.  This
d1856 2
a1857 2
          place (gratis or for a charge), and offer equivalent access
          to the Corresponding Source in the same way through the same
d1861 4
a1864 4
          Corresponding Source may be on a different server (operated
          by you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to
          the object code saying where to find the Corresponding Source.
d1866 2
a1867 2
          remain obligated to ensure that it is available for as long
          as needed to satisfy these requirements.
a1873 1

d1881 2
a1882 2
     incorporation into a dwelling.  In determining whether a product
     is a consumer product, doubtful cases shall be resolved in favor of
d1913 5
a1917 5
     warranty, or updates for a work that has been modified or
     installed by the recipient, or for the User Product in which it
     has been modified or installed.  Access to a network may be denied
     when the modification itself materially and adversely affects the
     operation of the network or violates the rules and protocols for
d1947 2
a1948 2
     holders of that material) supplement the terms of this License
     with terms:
d1958 2
a1959 3
          or requiring that modified versions of such material be
          marked in reasonable ways as different from the original
          version; or
d1978 4
a1981 5
     contains a further restriction but permits relicensing or
     conveying under this License, you may add to a covered work
     material governed by the terms of that license document, provided
     that the further restriction does not survive such relicensing or
     conveying.
d1997 2
a1998 2
     under this License (including any patent licenses granted under
     the third paragraph of section 11).
d2002 2
a2003 2
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
d2015 4
a2018 4
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, you do not qualify to receive new
     licenses for the same material under section 10.
d2032 1
a2032 1
 10. Automatic Licensing of Downstream Recipients.
d2046 4
a2049 4
     could give under the previous paragraph, plus a right to
     possession of the Corresponding Source of the work from the
     predecessor in interest, if the predecessor has it or can get it
     with reasonable efforts.
d2053 6
a2058 6
     may not impose a license fee, royalty, or other charge for
     exercise of rights granted under this License, and you may not
     initiate litigation (including a cross-claim or counterclaim in a
     lawsuit) alleging that any patent claim is infringed by making,
     using, selling, offering for sale, or importing the Program or any
     portion of it.
d2060 1
a2060 1
 11. Patents.
d2080 2
a2081 2
     otherwise run, modify and propagate the contents of its
     contributor version.
d2086 3
a2088 3
     patent or covenant not to sue for patent infringement).  To
     "grant" such a patent license to a party means to make such an
     agreement or commitment not to enforce a patent against the party.
d2118 10
a2127 10
     party that is in the business of distributing software, under
     which you make payment to the third party based on the extent of
     your activity of conveying the work, and under which the third
     party grants, to any of the parties who would receive the covered
     work from you, a discriminatory patent license (a) in connection
     with copies of the covered work conveyed by you (or copies made
     from those copies), or (b) primarily for and in connection with
     specific products or compilations that contain the covered work,
     unless you entered into that arrangement, or that patent license
     was granted, prior to 28 March 2007.
d2133 1
a2133 1
 12. No Surrender of Others' Freedom.
d2135 10
a2144 11
     If conditions are imposed on you (whether by court order,
     agreement or otherwise) that contradict the conditions of this
     License, they do not excuse you from the conditions of this
     License.  If you cannot convey a covered work so as to satisfy
     simultaneously your obligations under this License and any other
     pertinent obligations, then as a consequence you may not convey it
     at all.  For example, if you agree to terms that obligate you to
     collect a royalty for further conveying from those to whom you
     convey the Program, the only way you could satisfy both those
     terms and this License would be to refrain entirely from conveying
     the Program.
d2146 1
a2146 1
 13. Use with the GNU Affero General Public License.
d2157 1
a2157 1
 14. Revised Versions of this License.
d2160 3
a2162 4
     versions of the GNU General Public License from time to time.
     Such new versions will be similar in spirit to the present
     version, but may differ in detail to address new problems or
     concerns.
d2168 4
a2171 4
     that numbered version or of any later version published by the
     Free Software Foundation.  If the Program does not specify a
     version number of the GNU General Public License, you may choose
     any version ever published by the Free Software Foundation.
d2183 1
a2183 1
 15. Disclaimer of Warranty.
d2186 1
a2186 1
     APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE
d2190 1
a2190 1
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE
d2195 1
a2195 1
 16. Limitation of Liability.
d2199 2
a2200 2
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
     FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
d2208 1
a2208 1
 17. Interpretation of Sections 15 and 16.
a2216 1

d2247 1
a2247 1
     along with this program.  If not, see `http://www.gnu.org/licenses/'.
d2256 1
a2256 1
     This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
d2258 1
a2258 1
     under certain conditions; type `show c' for details.
d2260 1
a2260 1
   The hypothetical commands `show w' and `show c' should show the
d2268 1
a2268 1
the GNU GPL, see `http://www.gnu.org/licenses/'.
d2275 1
a2275 1
please read `http://www.gnu.org/philosophy/why-not-lgpl.html'.
d2286 1
a2286 1
     `http://fsf.org/'
d2311 2
a2312 2
     of subject matter or whether it is published as a printed book.
     We recommend this License principally for works whose purpose is
d2318 2
a2319 2
     that contains a notice placed by the copyright holder saying it
     can be distributed under the terms of this License.  Such a notice
d2323 3
a2325 3
     of the public is a licensee, and is addressed as "you".  You
     accept the license if you copy, modify or distribute the work in a
     way requiring permission under copyright law.
d2343 6
a2348 6
     titles are designated, as being those of Invariant Sections, in
     the notice that says that the Document is released under this
     License.  If a section does not fit the above definition of
     Secondary then it is not allowed to be designated as Invariant.
     The Document may contain zero Invariant Sections.  If the Document
     does not identify any Invariant Sections then there are none.
d2359 10
a2368 10
     straightforwardly with generic text editors or (for images
     composed of pixels) generic paint programs or (for drawings) some
     widely available drawing editor, and that is suitable for input to
     text formatters or for automatic translation to a variety of
     formats suitable for input to text formatters.  A copy made in an
     otherwise Transparent file format whose markup, or absence of
     markup, has been arranged to thwart or discourage subsequent
     modification by readers is not Transparent.  An image format is
     not Transparent if used for any substantial amount of text.  A
     copy that is not "Transparent" is called "Opaque".
d2372 8
a2379 8
     SGML or XML using a publicly available DTD, and
     standard-conforming simple HTML, PostScript or PDF designed for
     human modification.  Examples of transparent image formats include
     PNG, XCF and JPG.  Opaque formats include proprietary formats that
     can be read and edited only by proprietary word processors, SGML or
     XML for which the DTD and/or processing tools are not generally
     available, and the machine-generated HTML, PostScript or PDF
     produced by some word processors for output purposes only.
d2417 2
a2418 2
     distribute a large enough number of copies you must also follow
     the conditions in section 3.
d2432 5
a2436 6
     front cover must present the full title with all words of the
     title equally prominent and visible.  You may add other material
     on the covers in addition.  Copying with changes limited to the
     covers, as long as they preserve the title of the Document and
     satisfy these conditions, can be treated as verbatim copying in
     other respects.
d2444 11
a2454 12
     numbering more than 100, you must either include a
     machine-readable Transparent copy along with each Opaque copy, or
     state in or with each Opaque copy a computer-network location from
     which the general network-using public has access to download
     using public-standard network protocols a complete Transparent
     copy of the Document, free of added material.  If you use the
     latter option, you must take reasonably prudent steps, when you
     begin distribution of Opaque copies in quantity, to ensure that
     this Transparent copy will remain thus accessible at the stated
     location until at least one year after the last time you
     distribute an Opaque copy (directly or through your agents or
     retailers) of that edition to the public.
d2457 3
a2459 3
     the Document well before redistributing any large number of
     copies, to give them a chance to provide you with an updated
     version of the Document.
d2465 5
a2469 5
     release the Modified Version under precisely this License, with
     the Modified Version filling the role of the Document, thus
     licensing distribution and modification of the Modified Version to
     whoever possesses a copy of it.  In addition, you must do these
     things in the Modified Version:
d2472 5
a2476 5
          distinct from that of the Document, and from those of
          previous versions (which should, if there were any, be listed
          in the History section of the Document).  You may use the
          same title as a previous version if the original publisher of
          that version gives permission.
d2506 6
a2511 6
          authors, and publisher of the Modified Version as given on
          the Title Page.  If there is no section Entitled "History" in
          the Document, create one stating the title, year, authors,
          and publisher of the Document as given on its Title Page,
          then add an item describing the Modified Version as stated in
          the previous sentence.
d2516 5
a2520 5
          previous versions it was based on.  These may be placed in
          the "History" section.  You may omit a network location for a
          work that was published at least four years before the
          Document itself, or if the original publisher of the version
          it refers to gives permission.
d2523 2
a2524 2
          Preserve the Title of the section, and preserve in the
          section all the substance and tone of each of the contributor
d2527 3
a2529 4
       L. Preserve all the Invariant Sections of the Document,
          unaltered in their text and in their titles.  Section numbers
          or the equivalent are not considered part of the section
          titles.
d2542 5
a2546 5
     material copied from the Document, you may at your option
     designate some or all of these sections as invariant.  To do this,
     add their titles to the list of Invariant Sections in the Modified
     Version's license notice.  These titles must be distinct from any
     other section titles.
d2555 9
a2563 9
     and a passage of up to 25 words as a Back-Cover Text, to the end
     of the list of Cover Texts in the Modified Version.  Only one
     passage of Front-Cover Text and one of Back-Cover Text may be
     added by (or through arrangements made by) any one entity.  If the
     Document already includes a cover text for the same cover,
     previously added by you or by arrangement made by the same entity
     you are acting on behalf of, you may not add another; but you may
     replace the old one, on explicit permission from the previous
     publisher that added the old one.
d2573 2
a2574 2
     modified versions, provided that you include in the combination
     all of the Invariant Sections of all of the original documents,
d2601 2
a2602 2
     rules of this License for verbatim copying of each of the
     documents in all other respects.
d2606 3
a2608 3
     a copy of this License into the extracted document, and follow
     this License in all other respects regarding verbatim copying of
     that document.
d2613 2
a2614 2
     separate and independent documents or works, in or on a volume of
     a storage or distribution medium, is called an "aggregate" if the
d2659 2
a2660 2
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
d2672 4
a2675 4
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, receipt of a copy of some or all of
     the same material does not give you any rights to use it.
d2677 1
a2677 1
 10. FUTURE REVISIONS OF THIS LICENSE
d2683 1
a2683 1
     `http://www.gnu.org/copyleft/'.
d2690 5
a2694 5
     published (not as a draft) by the Free Software Foundation.  If
     the Document does not specify a version number of this License,
     you may choose any version ever published (not as a draft) by the
     Free Software Foundation.  If the Document specifies that a proxy
     can decide which future versions of this License can be used, that
d2698 1
a2698 1
 11. RELICENSING
a2727 1

d2744 1
a2744 1
Texts, replace the "with...Texts." line with this:
d2755 3
a2757 3
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License, to
permit their use in free software.
d2787 2
a2788 2
can greatly alter what fraction of the sales price counts as profit.
If the price you pay is $50, ten percent of the profit is probably less
d2798 2
a2799 2
ports such as adding a new CPU to the GNU Compiler Collection
contribute more; major new features or packages contribute the most.
a2817 10
* Environment Variable <1>:              GOMP_STACKSIZE.        (line 6)
* Environment Variable <2>:              GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <3>:              OMP_PROC_BIND.         (line 6)
* Environment Variable <4>:              OMP_WAIT_POLICY.       (line 6)
* Environment Variable <5>:              OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <6>:              OMP_STACKSIZE.         (line 6)
* Environment Variable <7>:              OMP_SCHEDULE.          (line 6)
* Environment Variable <8>:              OMP_NUM_THREADS.       (line 6)
* Environment Variable <9>:              OMP_NESTED.            (line 6)
* Environment Variable <10>:             OMP_MAX_ACTIVE_LEVELS. (line 6)
d2819 10
d2831 2
a2832 1
* Implementation specific setting <1>:   GOMP_STACKSIZE.        (line 6)
d2834 1
a2834 2
* Implementation specific setting <3>:   OMP_NUM_THREADS.       (line 6)
* Implementation specific setting:       OMP_NESTED.            (line 6)
d2840 67
a2906 67
Node: Top2039
Node: Enabling OpenMP3233
Node: Runtime Library Routines4018
Node: omp_get_active_level6466
Node: omp_get_ancestor_thread_num7170
Node: omp_get_dynamic8097
Node: omp_get_level8975
Node: omp_get_max_active_levels9599
Node: omp_get_max_threads10302
Node: omp_get_nested11058
Node: omp_get_num_procs11970
Node: omp_get_num_threads12488
Node: omp_get_schedule13570
Node: omp_get_team_size14491
Node: omp_get_thread_limit15453
Node: omp_get_thread_num16076
Node: omp_in_parallel16944
Node: omp_in_final17591
Node: omp_set_dynamic18262
Node: omp_set_max_active_levels19099
Node: omp_set_nested19879
Node: omp_set_num_threads20758
Node: omp_set_schedule21594
Node: omp_init_lock22666
Node: omp_set_lock23317
Node: omp_test_lock24168
Node: omp_unset_lock25139
Node: omp_destroy_lock26065
Node: omp_init_nest_lock26739
Node: omp_set_nest_lock27472
Node: omp_test_nest_lock28383
Node: omp_unset_nest_lock29412
Node: omp_destroy_nest_lock30422
Node: omp_get_wtick31170
Node: omp_get_wtime31761
Node: Environment Variables32535
Node: OMP_DYNAMIC33663
Node: OMP_MAX_ACTIVE_LEVELS34231
Node: OMP_NESTED34870
Node: OMP_NUM_THREADS35474
Node: OMP_SCHEDULE36162
Node: OMP_STACKSIZE36856
Node: OMP_THREAD_LIMIT37682
Node: OMP_WAIT_POLICY38277
Node: OMP_PROC_BIND38838
Node: GOMP_CPU_AFFINITY39396
Node: GOMP_STACKSIZE40937
Node: The libgomp ABI41747
Node: Implementing MASTER construct42546
Node: Implementing CRITICAL construct42960
Node: Implementing ATOMIC construct43699
Node: Implementing FLUSH construct44180
Node: Implementing BARRIER construct44451
Node: Implementing THREADPRIVATE construct44720
Node: Implementing PRIVATE clause45372
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses45953
Node: Implementing REDUCTION clause47277
Node: Implementing PARALLEL construct47834
Node: Implementing FOR construct49091
Node: Implementing ORDERED construct51089
Node: Implementing SECTIONS construct51395
Node: Implementing SINGLE construct52161
Node: Reporting Bugs52823
Node: Copying53133
Node: GNU Free Documentation License90698
Node: Funding115840
Node: Library Index118365
@


1.1.1.6
log
@import GCC 5.3.0.  see these urls for details which are too large to
include here:

	http://gcc.gnu.org/gcc-4.9/changes.html
	http://gcc.gnu.org/gcc-5/changes.html

(note that GCC 5.x is a release stream like GCC 4.9.x, 4.8.x, etc.)


the main issues we will have are:

The default mode for C is now -std=gnu11 instead of -std=gnu89.

ARM:
The deprecated option -mwords-little-endian has been removed.
The options -mapcs, -mapcs-frame, -mtpcs-frame and -mtpcs-leaf-frame
 which are only applicable to the old ABI have been deprecated.

MIPS:
The o32 ABI has been modified and extended. The o32 64-bit
 floating-point register support is now obsolete and has been removed.
 It has been replaced by three ABI extensions FPXX, FP64A, and FP64.
 The meaning of the -mfp64 command-line option has changed. It is now
 used to enable the FP64A and FP64 ABI extensions.
@
text
@d2 1
a2 1
/space/rguenther/gcc-5.3.0/gcc-5.3.0/libgomp/libgomp.texi.
d4 1
a4 1
Copyright (C) 2006-2015 Free Software Foundation, Inc.
d26 1
a26 1
* libgomp: (libgomp).          GNU Offloading and Multi Processing Runtime Library.
d29 2
a30 4
   This manual documents libgomp, the GNU Offloading and Multi
Processing Runtime library.  This is the GNU implementation of the
OpenMP and OpenACC APIs for parallel and accelerator programming in
C/C++ and Fortran.
d35 1
a35 1
   Copyright (C) 2006-2015 Free Software Foundation, Inc.
d61 2
a62 3
This manual documents the usage of libgomp, the GNU Offloading and
Multi Processing Runtime Library.  This includes the GNU implementation
of the OpenMP (http://www.openmp.org) Application Programming Interface
d64 1
a64 8
and Fortran, and the GNU implementation of the OpenACC
(http://www.openacc.org/) Application Programming Interface (API) for
offloading of code to accelerator devices in C/C++ and Fortran.

   Originally, libgomp implemented the GNU OpenMP Runtime Library.
Based on this, support for OpenACC and offloading (both OpenACC and
OpenMP 4's target construct) has been added later on, and the library's
name changed to GNU Offloading and Multi Processing Runtime Library.
d74 1
a74 2
* Reporting Bugs::             How to report bugs in the GNU Offloading and
                               Multi Processing Runtime Library.
d90 6
a95 7
compile-time flag `-fopenmp' must be specified.  This enables the
OpenMP directive `#pragma omp' in C/C++ and `!$omp' directives in free
form, `c$omp', `*$omp' and `!$omp' directives in fixed form, `!$'
conditional compilation sentinels in free form and `c$', `*$' and `!$'
sentinels in fixed form, for Fortran.  The flag also arranges for
automatic linking of the OpenMP runtime library (*note Runtime Library
Routines::).
d99 1
a99 1
(http://www.openmp.org) manual, version 4.0.
d107 2
a108 2
The runtime routines described here are defined by Section 3 of the
OpenMP specification in version 4.0.  The routines are structured in
d111 2
a114 3
Control threads, processors and the parallel environment.  They have C
linkage, and do not throw exceptions.

a116 2
* omp_get_cancellation::        Whether cancellation support is enabled
* omp_get_default_device::      Get the default device for target regions
a121 1
* omp_get_num_devices::         Number of target devices
a122 1
* omp_get_num_teams::           Number of teams
a123 1
* omp_get_proc_bind::           Whether theads may be moved between CPUs
a124 1
* omp_get_team_num::            Get team number
a129 2
* omp_is_initial_device::       Whether executing on the host device
* omp_set_default_device::      Set the default device for target regions
d136 3
a138 1
Initialize, set, test, unset and destroy simple and nested locks.
d151 3
a153 1
Portable, thread-based, wall clock timer.
d179 2
a180 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.20.
d183 1
a183 1
File: libgomp.info,  Node: omp_get_ancestor_thread_num,  Next: omp_get_cancellation,  Prev: omp_get_active_level,  Up: Runtime Library Routines
d190 1
a190 1
     given nesting level of the current thread.  For values of LEVEL
d206 2
a207 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.18.
d210 1
a210 34
File: libgomp.info,  Node: omp_get_cancellation,  Next: omp_get_default_device,  Prev: omp_get_ancestor_thread_num,  Up: Runtime Library Routines

2.3 `omp_get_cancellation' - Whether cancellation support is enabled
====================================================================

_Description_:
     This function returns `true' if cancellation is activated, `false'
     otherwise.  Here, `true' and `false' represent their
     language-specific counterparts.  Unless `OMP_CANCELLATION' is set
     true, cancellations are deactivated.

_C/C++_:
     _Prototype_:  `int omp_get_cancellation(void);'

_Fortran_:
     _Interface_:  `logical function omp_get_cancellation()'

_See also_:
     *note OMP_CANCELLATION::

_Reference_:
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.9.


File: libgomp.info,  Node: omp_get_default_device,  Next: omp_get_dynamic,  Prev: omp_get_cancellation,  Up: Runtime Library Routines

2.4 `omp_get_default_device' - Get the default device for target regions
========================================================================

_Description_:
     Get the default device for target regions without device clause.

_C/C++_:
     _Prototype_:  `int omp_get_default_device(void);'
d212 1
a212 13
_Fortran_:
     _Interface_:  `integer function omp_get_default_device()'

_See also_:
     *note OMP_DEFAULT_DEVICE::, *note omp_set_default_device::

_Reference_:
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.24.


File: libgomp.info,  Node: omp_get_dynamic,  Next: omp_get_level,  Prev: omp_get_default_device,  Up: Runtime Library Routines

2.5 `omp_get_dynamic' - Dynamic teams setting
d221 2
a222 2
     `omp_set_dynamic'.  If undefined, dynamic adjustment is disabled
     by default.
d234 1
a234 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.8.
d239 1
a239 1
2.6 `omp_get_level' - Obtain the current nesting level
d256 2
a257 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.17.
d262 1
a262 1
2.7 `omp_get_max_active_levels' - Maximum number of active regions
d279 2
a280 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.16.
d285 1
a285 1
2.8 `omp_get_max_threads' - Maximum number of threads of parallel region
d303 1
a303 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.3.
d306 1
a306 1
File: libgomp.info,  Node: omp_get_nested,  Next: omp_get_num_devices,  Prev: omp_get_max_threads,  Up: Runtime Library Routines
d308 1
a308 1
2.9 `omp_get_nested' - Nested parallel regions
d313 1
a313 1
     enabled, `false' otherwise.  Here, `true' and `false' represent
d318 1
a318 1
     `omp_set_nested'.  If undefined, nested parallel regions are
d331 2
a332 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.11.
d335 1
a335 1
File: libgomp.info,  Node: omp_get_num_devices,  Next: omp_get_num_procs,  Prev: omp_get_nested,  Up: Runtime Library Routines
d337 1
a337 1
2.10 `omp_get_num_devices' - Number of target devices
d341 1
a341 19
     Returns the number of target devices.

_C/C++_:
     _Prototype_:  `int omp_get_num_devices(void);'

_Fortran_:
     _Interface_:  `integer function omp_get_num_devices()'

_Reference_:
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.25.


File: libgomp.info,  Node: omp_get_num_procs,  Next: omp_get_num_teams,  Prev: omp_get_num_devices,  Up: Runtime Library Routines

2.11 `omp_get_num_procs' - Number of processors online
======================================================

_Description_:
     Returns the number of processors online on that device.
d350 1
a350 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.5.
d353 1
a353 1
File: libgomp.info,  Node: omp_get_num_teams,  Next: omp_get_num_threads,  Prev: omp_get_num_procs,  Up: Runtime Library Routines
d355 2
a356 2
2.12 `omp_get_num_teams' - Number of teams
==========================================
d359 2
a360 20
     Returns the number of teams in the current team region.

_C/C++_:
     _Prototype_:  `int omp_get_num_teams(void);'

_Fortran_:
     _Interface_:  `integer function omp_get_num_teams()'

_Reference_:
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.26.


File: libgomp.info,  Node: omp_get_num_threads,  Next: omp_get_proc_bind,  Prev: omp_get_num_teams,  Up: Runtime Library Routines

2.13 `omp_get_num_threads' - Size of the active team
====================================================

_Description_:
     Returns the number of threads in the current team.  In a
     sequential section of the program `omp_get_num_threads' returns 1.
d363 1
a363 1
     `OMP_NUM_THREADS' environment variable.  At runtime, the size of
d365 3
a367 3
     by `omp_set_num_threads'.  If none of the above were used to
     define a specific value and `OMP_DYNAMIC' is disabled, one thread
     per CPU online is used.
d380 1
a380 28
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.2.


File: libgomp.info,  Node: omp_get_proc_bind,  Next: omp_get_schedule,  Prev: omp_get_num_threads,  Up: Runtime Library Routines

2.14 `omp_get_proc_bind' - Whether theads may be moved between CPUs
===================================================================

_Description_:
     This functions returns the currently active thread affinity
     policy, which is set via `OMP_PROC_BIND'.  Possible values are
     `omp_proc_bind_false', `omp_proc_bind_true',
     `omp_proc_bind_master', `omp_proc_bind_close' and
     `omp_proc_bind_spread'.

_C/C++_:
     _Prototype_:  `omp_proc_bind_t omp_get_proc_bind(void);'

_Fortran_:
     _Interface_:  `integer(kind=omp_proc_bind_kind) function
                   omp_get_proc_bind()'

_See also_:
     *note OMP_PROC_BIND::, *note OMP_PLACES::, *note
     GOMP_CPU_AFFINITY::,

_Reference_:
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.22.
d383 1
a383 1
File: libgomp.info,  Node: omp_get_schedule,  Next: omp_get_team_num,  Prev: omp_get_proc_bind,  Up: Runtime Library Routines
d385 1
a385 1
2.15 `omp_get_schedule' - Obtain the runtime scheduling method
d389 1
a389 1
     Obtain the runtime scheduling method.  The KIND argument will be
d391 1
a391 1
     `omp_sched_guided' or `omp_sched_auto'.  The second argument,
d395 1
a395 2
     _Prototype_:  `void omp_get_schedule(omp_sched_t *kind, int
                   *modifier);'
d398 1
a398 1
     _Interface_:  `subroutine omp_get_schedule(kind, modifier)'
d406 2
a407 19
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.13.


File: libgomp.info,  Node: omp_get_team_num,  Next: omp_get_team_size,  Prev: omp_get_schedule,  Up: Runtime Library Routines

2.16 `omp_get_team_num' - Get team number
=========================================

_Description_:
     Returns the team number of the calling thread.

_C/C++_:
     _Prototype_:  `int omp_get_team_num(void);'

_Fortran_:
     _Interface_:  `integer function omp_get_team_num()'

_Reference_:
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.27.
d410 1
a410 1
File: libgomp.info,  Node: omp_get_team_size,  Next: omp_get_thread_limit,  Prev: omp_get_team_num,  Up: Runtime Library Routines
d412 1
a412 1
2.17 `omp_get_team_size' - Number of threads in a team
d417 1
a417 1
     which either the current thread or its ancestor belongs.  For
d434 2
a435 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.19.
d440 1
a440 1
2.18 `omp_get_thread_limit' - Maximum number of threads
d456 2
a457 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.14.
d462 1
a462 1
2.19 `omp_get_thread_num' - Current thread ID
d468 3
a470 3
     always returns 0.  In parallel regions the return value varies
     from 0 to `omp_get_num_threads'-1 inclusive.  The return value of
     the master thread of a team is always 0.
d482 1
a482 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.4.
d487 1
a487 1
2.20 `omp_in_parallel' - Whether a parallel region is active
d492 1
a492 1
     `false' otherwise.  Here, `true' and `false' represent their
d502 1
a502 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.6.
d505 1
a505 1
File: libgomp.info,  Node: omp_in_final,  Next: omp_is_initial_device,  Prev: omp_in_parallel,  Up: Runtime Library Routines
d507 1
a507 1
2.21 `omp_in_final' - Whether in final or included task region
d512 1
a512 1
     included task region, `false' otherwise.  Here, `true' and `false'
d522 2
a523 44
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.21.


File: libgomp.info,  Node: omp_is_initial_device,  Next: omp_set_default_device,  Prev: omp_in_final,  Up: Runtime Library Routines

2.22 `omp_is_initial_device' - Whether executing on the host device
===================================================================

_Description_:
     This function returns `true' if currently running on the host
     device, `false' otherwise.  Here, `true' and `false' represent
     their language-specific counterparts.

_C/C++_:
     _Prototype_:  `int omp_is_initial_device(void);'

_Fortran_:
     _Interface_:  `logical function omp_is_initial_device()'

_Reference_:
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.28.


File: libgomp.info,  Node: omp_set_default_device,  Next: omp_set_dynamic,  Prev: omp_is_initial_device,  Up: Runtime Library Routines

2.23 `omp_set_default_device' - Set the default device for target regions
=========================================================================

_Description_:
     Set the default device for target regions without device clause.
     The argument shall be a nonnegative device number.

_C/C++_:
     _Prototype_:  `void omp_set_default_device(int device_num);'

_Fortran_:
     _Interface_:  `subroutine omp_set_default_device(device_num)'
                   `integer device_num'

_See also_:
     *note OMP_DEFAULT_DEVICE::, *note omp_get_default_device::

_Reference_:
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.23.
d526 1
a526 1
File: libgomp.info,  Node: omp_set_dynamic,  Next: omp_set_max_active_levels,  Prev: omp_set_default_device,  Up: Runtime Library Routines
d528 1
a528 1
2.24 `omp_set_dynamic' - Enable/disable dynamic teams
d533 1
a533 1
     within a team.  The function takes the language-specific equivalent
d538 1
a538 1
     _Prototype_:  `void omp_set_dynamic(int dynamic_threads);'
d541 2
a542 2
     _Interface_:  `subroutine omp_set_dynamic(dynamic_threads)'
                   `logical, intent(in) :: dynamic_threads'
d548 1
a548 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.7.
d553 1
a553 1
2.25 `omp_set_max_active_levels' - Limits the number of active parallel regions
d571 2
a572 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.15.
d577 1
a577 1
2.26 `omp_set_nested' - Enable/disable nested parallel regions
d582 1
a582 1
     members are allowed to create new teams.  The function takes the
d587 1
a587 1
     _Prototype_:  `void omp_set_nested(int nested);'
d590 2
a591 2
     _Interface_:  `subroutine omp_set_nested(nested)'
                   `logical, intent(in) :: nested'
d597 1
a597 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.10.
d602 1
a602 1
2.27 `omp_set_num_threads' - Set upper team size limit
d611 1
a611 1
     _Prototype_:  `void omp_set_num_threads(int num_threads);'
d614 2
a615 2
     _Interface_:  `subroutine omp_set_num_threads(num_threads)'
                   `integer, intent(in) :: num_threads'
d622 1
a622 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.1.
d627 1
a627 1
2.28 `omp_set_schedule' - Set the runtime scheduling method
d631 1
a631 1
     Sets the runtime scheduling method.  The KIND argument can have the
d633 1
a633 1
     or `omp_sched_auto'.  Except for `omp_sched_auto', the chunk size
d639 2
a640 2
     _Prototype_:  `void omp_set_schedule(omp_sched_t kind, int
                   modifier);'
d651 2
a652 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.2.12.
d657 1
a657 1
2.29 `omp_init_lock' - Initialize simple lock
d668 2
a669 2
     _Interface_:  `subroutine omp_init_lock(svar)'
                   `integer(omp_lock_kind), intent(out) :: svar'
d675 1
a675 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.1.
d680 1
a680 1
2.30 `omp_set_lock' - Wait for and set simple lock
d685 2
a686 2
     initialized by `omp_init_lock'.  The calling thread is blocked
     until the lock is available.  If the lock is already held by the
d693 2
a694 2
     _Interface_:  `subroutine omp_set_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d701 1
a701 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.3.
d706 1
a706 1
2.31 `omp_test_lock' - Test and set simple lock if available
d711 3
a713 3
     initialized by `omp_init_lock'.  Contrary to `omp_set_lock',
     `omp_test_lock' does not block if the lock is not available.  This
     function returns `true' upon success, `false' otherwise.  Here,
d720 2
a721 2
     _Interface_:  `logical function omp_test_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d727 1
a727 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.5.
d732 1
a732 1
2.32 `omp_unset_lock' - Unset simple lock
d737 4
a740 4
     `omp_set_lock' or `omp_test_lock' before.  In addition, the lock
     must be held by the thread calling `omp_unset_lock'.  Then, the
     lock becomes unlocked.  If one or more threads attempted to set
     the lock before, one of them is chosen to, again, set the lock to
d747 2
a748 2
     _Interface_:  `subroutine omp_unset_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d754 1
a754 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.4.
d759 1
a759 1
2.33 `omp_destroy_lock' - Destroy simple lock
d763 1
a763 1
     Destroy a simple lock.  In order to be destroyed, a simple lock
d770 2
a771 2
     _Interface_:  `subroutine omp_destroy_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d777 1
a777 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.2.
d782 1
a782 1
2.34 `omp_init_nest_lock' - Initialize nested lock
d793 2
a794 2
     _Interface_:  `subroutine omp_init_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(out) :: nvar'
d800 1
a800 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.1.
d805 1
a805 1
2.35 `omp_set_nest_lock' - Wait for and set nested lock
d810 3
a812 4
     initialized by `omp_init_nest_lock'.  The calling thread is
     blocked until the lock is available.  If the lock is already held
     by the current thread, the nesting count for the lock is
     incremented.
d818 2
a819 2
     _Interface_:  `subroutine omp_set_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d825 1
a825 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.3.
d830 1
a830 1
2.36 `omp_test_nest_lock' - Test and set nested lock if available
d835 1
a835 1
     initialized by `omp_init_nest_lock'.  Contrary to
d838 1
a838 1
     thread, the new nesting count is returned.  Otherwise, the return
d845 2
a846 2
     _Interface_:  `logical function omp_test_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d852 1
a852 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.5.
d857 1
a857 1
2.37 `omp_unset_nest_lock' - Unset nested lock
d862 1
a862 1
     `omp_set_nested_lock' or `omp_test_nested_lock' before.  In
d864 2
a865 2
     `omp_unset_nested_lock'.  If the nesting count drops to zero, the
     lock becomes unlocked.  If one ore more threads attempted to set
d873 2
a874 2
     _Interface_:  `subroutine omp_unset_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d880 1
a880 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.4.
d885 1
a885 1
2.38 `omp_destroy_nest_lock' - Destroy nested lock
d889 1
a889 1
     Destroy a nested lock.  In order to be destroyed, a nested lock
d897 2
a898 2
     _Interface_:  `subroutine omp_destroy_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d904 1
a904 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.3.2.
d909 1
a909 1
2.39 `omp_get_wtick' - Get timer precision
d926 1
a926 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.4.2.
d931 1
a931 1
2.40 `omp_get_wtime' - Elapsed wall clock time
d935 1
a935 1
     Elapsed wall clock time in seconds.  The time is measured per
d951 1
a951 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 3.4.1.
d959 5
a963 3
The environment variables which beginning with `OMP_' are defined by
section 4 of the OpenMP specification in version 4.0, while those
beginning with `GOMP_' are GNU extensions.
a966 3
* OMP_CANCELLATION::      Set whether cancellation is activated
* OMP_DISPLAY_ENV::       Show OpenMP version and environment variables
* OMP_DEFAULT_DEVICE::    Set the device used in target regions
a970 2
* OMP_PROC_BIND::         Whether theads may be moved between CPUs
* OMP_PLACES::            Specifies on which CPUs the theads should be placed
d975 1
a976 1
* GOMP_DEBUG::            Enable debugging output
a977 1
* GOMP_SPINCOUNT::        Set the busy-wait spin count
d980 1
a980 12
File: libgomp.info,  Node: OMP_CANCELLATION,  Next: OMP_DISPLAY_ENV,  Up: Environment Variables

3.1 `OMP_CANCELLATION' - Set whether cancellation is activated
==============================================================

_Description_:
     If set to `TRUE', the cancellation is activated.  If set to
     `FALSE' or if unset, cancellation is disabled and the `cancel'
     construct is ignored.

_See also_:
     *note omp_get_cancellation::
d982 1
a982 42
_Reference_:
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.11


File: libgomp.info,  Node: OMP_DISPLAY_ENV,  Next: OMP_DEFAULT_DEVICE,  Prev: OMP_CANCELLATION,  Up: Environment Variables

3.2 `OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
=====================================================================

_Description_:
     If set to `TRUE', the OpenMP version number and the values
     associated with the OpenMP environment variables are printed to
     `stderr'.  If set to `VERBOSE', it additionally shows the value of
     the environment variables which are GNU extensions.  If undefined
     or set to `FALSE', this information will not be shown.

_Reference_:
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.12


File: libgomp.info,  Node: OMP_DEFAULT_DEVICE,  Next: OMP_DYNAMIC,  Prev: OMP_DISPLAY_ENV,  Up: Environment Variables

3.3 `OMP_DEFAULT_DEVICE' - Set the device used in target regions
================================================================

_Description_:
     Set to choose the device which is used in a `target' region,
     unless the value is overridden by `omp_set_default_device' or by a
     `device' clause.  The value shall be the nonnegative device
     number. If no device with the given device number exists, the code
     is executed on the host.  If unset, device number 0 will be used.

_See also_:
     *note omp_get_default_device::, *note omp_set_default_device::,

_Reference_:
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.11


File: libgomp.info,  Node: OMP_DYNAMIC,  Next: OMP_MAX_ACTIVE_LEVELS,  Prev: OMP_DEFAULT_DEVICE,  Up: Environment Variables

3.4 `OMP_DYNAMIC' - Dynamic adjustment of threads
d987 3
a989 3
     within a team.  The value of this environment variable shall be
     `TRUE' or `FALSE'.  If undefined, dynamic adjustment is disabled
     by default.
d995 1
a995 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.3
d1000 1
a1000 1
3.5 `OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1005 1
a1005 1
     parallel regions.  The value of this variable shall be a positive
d1012 1
a1012 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.9
d1017 1
a1017 1
3.6 `OMP_NESTED' - Nested parallel regions
d1022 2
a1023 2
     members are allowed to create new teams.  The value of this
     environment variable shall be `TRUE' or `FALSE'.  If undefined,
d1030 1
a1030 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.6
d1033 1
a1033 1
File: libgomp.info,  Node: OMP_NUM_THREADS,  Next: OMP_PROC_BIND,  Prev: OMP_NESTED,  Up: Environment Variables
d1035 1
a1035 1
3.7 `OMP_NUM_THREADS' - Specifies the number of threads to use
d1040 1
a1040 1
     regions.  The value of this variable shall be a comma-separated
d1042 1
a1042 1
     threads to use for the corresponding nested level.  If undefined
d1049 1
a1049 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.2
d1052 1
a1052 1
File: libgomp.info,  Node: OMP_PROC_BIND,  Next: OMP_PLACES,  Prev: OMP_NUM_THREADS,  Up: Environment Variables
d1054 2
a1055 2
3.8 `OMP_PROC_BIND' - Whether theads may be moved between CPUs
==============================================================
d1058 5
a1062 12
     Specifies whether threads may be moved between processors.  If set
     to `TRUE', OpenMP theads should not be moved; if set to `FALSE'
     they may be moved.  Alternatively, a comma separated list with the
     values `MASTER', `CLOSE' and `SPREAD' can be used to specify the
     thread affinity policy for the corresponding nesting level.  With
     `MASTER' the worker threads are in the same place partition as the
     master thread.  With `CLOSE' those are kept close to the master
     thread in contiguous place partitions.  And with `SPREAD' a sparse
     distribution across the place partitions is used.

     When undefined, `OMP_PROC_BIND' defaults to `TRUE' when
     `OMP_PLACES' or `GOMP_CPU_AFFINITY' is set and `FALSE' otherwise.
d1065 1
a1065 44
     *note OMP_PLACES::, *note GOMP_CPU_AFFINITY::, *note
     omp_get_proc_bind::

_Reference_:
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.4


File: libgomp.info,  Node: OMP_PLACES,  Next: OMP_STACKSIZE,  Prev: OMP_PROC_BIND,  Up: Environment Variables

3.9 `OMP_PLACES' - Specifies on which CPUs the theads should be placed
======================================================================

_Description_:
     The thread placement can be either specified using an abstract
     name or by an explicit list of the places.  The abstract names
     `threads', `cores' and `sockets' can be optionally followed by a
     positive number in parentheses, which denotes the how many places
     shall be created.  With `threads' each place corresponds to a
     single hardware thread; `cores' to a single core with the
     corresponding number of hardware threads; and with `sockets' the
     place corresponds to a single socket.  The resulting placement can
     be shown by setting the `OMP_DISPLAY_ENV' environment variable.

     Alternatively, the placement can be specified explicitly as
     comma-separated list of places.  A place is specified by set of
     nonnegative numbers in curly braces, denoting the denoting the
     hardware threads.  The hardware threads belonging to a place can
     either be specified as comma-separated list of nonnegative thread
     numbers or using an interval.  Multiple places can also be either
     specified by a comma-separated list of places or by an interval.
     To specify an interval, a colon followed by the count is placed
     after after the hardware thread number or the place.  Optionally,
     the length can be followed by a colon and the stride number -
     otherwise a unit stride is assumed.  For instance, the following
     specifies the same places list: `"{0,1,2}, {3,4,6}, {7,8,9},
     {10,11,12}"'; `"{0:3}, {3:3}, {7:3}, {10:3}"'; and `"{0:2}:4:3"'.

     If `OMP_PLACES' and `GOMP_CPU_AFFINITY' are unset and
     `OMP_PROC_BIND' is either unset or `false', threads may be moved
     between CPUs following no placement policy.

_See also_:
     *note OMP_PROC_BIND::, *note GOMP_CPU_AFFINITY::, *note
     omp_get_proc_bind::, *note OMP_DISPLAY_ENV::
d1068 2
a1069 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.5
d1072 1
a1072 1
File: libgomp.info,  Node: OMP_STACKSIZE,  Next: OMP_SCHEDULE,  Prev: OMP_PLACES,  Up: Environment Variables
d1074 2
a1075 2
3.10 `OMP_STACKSIZE' - Set default thread stack size
====================================================
d1080 6
a1085 6
     respectively, in bytes, kilobytes, megabytes or gigabytes.  This
     is different from `pthread_attr_setstacksize' which gets the
     number of bytes as an argument.  If the stack size cannot be set
     due to system constraints, an error is reported and the initial
     stack size is left unchanged.  If undefined, the stack size is
     system dependent.
d1088 1
a1088 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.7
d1091 1
a1091 1
File: libgomp.info,  Node: OMP_SCHEDULE,  Next: OMP_THREAD_LIMIT,  Prev: OMP_STACKSIZE,  Up: Environment Variables
d1093 2
a1094 2
3.11 `OMP_SCHEDULE' - How threads are scheduled
===============================================
d1097 3
a1099 5
     Allows to specify `schedule type' and `chunk size'.  The value of
     the variable shall have the form: `type[,chunk]' where `type' is
     one of `static', `dynamic', `guided' or `auto' The optional
     `chunk' size shall be a positive integer.  If undefined, dynamic
     scheduling and a chunk size of 1 is used.
d1102 1
a1102 1
     *note omp_set_schedule::
d1105 1
a1105 2
     OpenMP specification v4.0 (http://www.openmp.org/), Sections 2.7.1
     and 4.1
d1108 1
a1108 1
File: libgomp.info,  Node: OMP_THREAD_LIMIT,  Next: OMP_WAIT_POLICY,  Prev: OMP_SCHEDULE,  Up: Environment Variables
d1110 2
a1111 2
3.12 `OMP_THREAD_LIMIT' - Set the maximum number of threads
===========================================================
d1114 4
a1117 6
     Specifies the number of threads to use for the whole program.  The
     value of this variable shall be a positive integer.  If undefined,
     the number of threads is not limited.

_See also_:
     *note OMP_NUM_THREADS::, *note omp_get_thread_limit::
d1120 1
a1120 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.10
d1123 1
a1123 1
File: libgomp.info,  Node: OMP_WAIT_POLICY,  Next: GOMP_CPU_AFFINITY,  Prev: OMP_THREAD_LIMIT,  Up: Environment Variables
d1125 2
a1126 2
3.13 `OMP_WAIT_POLICY' - How waiting threads are handled
========================================================
d1129 3
a1131 5
     Specifies whether waiting threads should be active or passive.  If
     the value is `PASSIVE', waiting threads should not consume CPU
     power while waiting; while the value is `ACTIVE' specifies that
     they should.  If undefined, threads wait actively for a short time
     before waiting passively.
d1134 1
a1134 1
     *note GOMP_SPINCOUNT::
d1137 1
a1137 1
     OpenMP specification v4.0 (http://www.openmp.org/), Section 4.8
d1140 1
a1140 1
File: libgomp.info,  Node: GOMP_CPU_AFFINITY,  Next: GOMP_DEBUG,  Prev: OMP_WAIT_POLICY,  Up: Environment Variables
d1142 1
a1142 1
3.14 `GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d1146 2
a1147 2
     Binds threads to specific CPUs.  The variable should contain a
     space-separated or comma-separated list of CPUs.  This list may
d1150 1
a1150 1
     (M-N:S).  CPU numbers are zero based.  For example,
d1158 2
a1159 2
     There is no libgomp library routine to determine whether a CPU
     affinity specification is in effect.  As a workaround,
d1162 3
a1164 3
     setting of the `GOMP_CPU_AFFINITY' environment variable.  A
     defined CPU affinity on startup cannot be changed or disabled
     during the runtime of the application.
d1166 2
a1167 5
     If both `GOMP_CPU_AFFINITY' and `OMP_PROC_BIND' are set,
     `OMP_PROC_BIND' has a higher precedence.  If neither has been set
     and `OMP_PROC_BIND' is unset, or when `OMP_PROC_BIND' is set to
     `FALSE', the host system will handle the assignment of threads to
     CPUs.
d1170 1
a1170 15
     *note OMP_PLACES::, *note OMP_PROC_BIND::


File: libgomp.info,  Node: GOMP_DEBUG,  Next: GOMP_STACKSIZE,  Prev: GOMP_CPU_AFFINITY,  Up: Environment Variables

3.15 `GOMP_DEBUG' - Enable debugging output
===========================================

_Description_:
     Enable debugging output.  The variable should be set to `0'
     (disabled, also the default if not set), or `1' (enabled).

     If enabled, some debugging output will be printed during execution.
     This is currently not specified in more detail, and subject to
     change.
d1173 1
a1173 1
File: libgomp.info,  Node: GOMP_STACKSIZE,  Next: GOMP_SPINCOUNT,  Prev: GOMP_DEBUG,  Up: Environment Variables
d1175 1
a1175 1
3.16 `GOMP_STACKSIZE' - Set default thread stack size
d1179 1
a1179 1
     Set the default thread stack size in kilobytes.  This is different
d1181 1
a1181 1
     an argument.  If the stack size cannot be set due to system
d1183 1
a1183 1
     left unchanged.  If undefined, the stack size is system dependent.
a1194 25
File: libgomp.info,  Node: GOMP_SPINCOUNT,  Prev: GOMP_STACKSIZE,  Up: Environment Variables

3.17 `GOMP_SPINCOUNT' - Set the busy-wait spin count
====================================================

_Description_:
     Determines how long a threads waits actively with consuming CPU
     power before waiting passively without consuming CPU power.  The
     value may be either `INFINITE', `INFINITY' to always wait actively
     or an integer which gives the number of spins of the busy-wait
     loop.  The integer may optionally be followed by the following
     suffixes acting as multiplication factors: `k' (kilo, thousand),
     `M' (mega, million), `G' (giga, billion), or `T' (tera, trillion).
     If undefined, 0 is used when `OMP_WAIT_POLICY' is `PASSIVE',
     300,000 is used when `OMP_WAIT_POLICY' is undefined and 30 billion
     is used when `OMP_WAIT_POLICY' is `ACTIVE'.  If there are more
     OpenMP threads than available CPUs, 1000 and 100 spins are used
     for `OMP_WAIT_POLICY' being `ACTIVE' or undefined, respectively;
     unless the `GOMP_SPINCOUNT' is lower or `OMP_WAIT_POLICY' is
     `PASSIVE'.

_See also_:
     *note OMP_WAIT_POLICY::


d1559 3
a1561 4
Bugs in the GNU Offloading and Multi Processing Runtime Library should
be reported via Bugzilla (http://gcc.gnu.org/bugzilla/).  Please add
"openacc", or "openmp", or both to the keywords field in the bug
report, as appropriate.
d2831 6
a2836 6
* Environment Variable <1>:              GOMP_SPINCOUNT.        (line 6)
* Environment Variable <2>:              GOMP_STACKSIZE.        (line 6)
* Environment Variable <3>:              GOMP_DEBUG.            (line 6)
* Environment Variable <4>:              GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <5>:              OMP_WAIT_POLICY.       (line 6)
* Environment Variable <6>:              OMP_THREAD_LIMIT.      (line 6)
d2838 4
a2841 10
* Environment Variable <8>:              OMP_STACKSIZE.         (line 6)
* Environment Variable <9>:              OMP_PLACES.            (line 6)
* Environment Variable <10>:             OMP_PROC_BIND.         (line 6)
* Environment Variable <11>:             OMP_NUM_THREADS.       (line 6)
* Environment Variable <12>:             OMP_NESTED.            (line 6)
* Environment Variable <13>:             OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable <14>:             OMP_DYNAMIC.           (line 6)
* Environment Variable <15>:             OMP_DEFAULT_DEVICE.    (line 6)
* Environment Variable <16>:             OMP_DISPLAY_ENV.       (line 6)
* Environment Variable:                  OMP_CANCELLATION.      (line 6)
d2844 3
a2846 4
* Implementation specific setting <1>:   GOMP_SPINCOUNT.        (line 6)
* Implementation specific setting <2>:   GOMP_STACKSIZE.        (line 6)
* Implementation specific setting <3>:   OMP_SCHEDULE.          (line 6)
* Implementation specific setting <4>:   OMP_NUM_THREADS.       (line 6)
d2853 67
a2919 81
Node: Top2130
Node: Enabling OpenMP3925
Node: Runtime Library Routines4712
Node: omp_get_active_level7699
Node: omp_get_ancestor_thread_num8397
Node: omp_get_cancellation9324
Node: omp_get_default_device10136
Node: omp_get_dynamic10810
Node: omp_get_level11683
Node: omp_get_max_active_levels12301
Node: omp_get_max_threads12998
Node: omp_get_nested13753
Node: omp_get_num_devices14663
Node: omp_get_num_procs15182
Node: omp_get_num_teams15719
Node: omp_get_num_threads16233
Node: omp_get_proc_bind17320
Node: omp_get_schedule18238
Node: omp_get_team_num19179
Node: omp_get_team_size19676
Node: omp_get_thread_limit20633
Node: omp_get_thread_num21250
Node: omp_in_parallel22119
Node: omp_in_final22766
Node: omp_is_initial_device23438
Node: omp_set_default_device24129
Node: omp_set_dynamic24917
Node: omp_set_max_active_levels25800
Node: omp_set_nested26574
Node: omp_set_num_threads27463
Node: omp_set_schedule28328
Node: omp_init_lock29394
Node: omp_set_lock30044
Node: omp_test_lock30896
Node: omp_unset_lock31869
Node: omp_destroy_lock32797
Node: omp_init_nest_lock33471
Node: omp_set_nest_lock34203
Node: omp_test_nest_lock35120
Node: omp_unset_nest_lock36150
Node: omp_destroy_nest_lock37162
Node: omp_get_wtick37910
Node: omp_get_wtime38500
Node: Environment Variables39274
Node: OMP_CANCELLATION40666
Node: OMP_DISPLAY_ENV41199
Node: OMP_DEFAULT_DEVICE41902
Node: OMP_DYNAMIC42682
Node: OMP_MAX_ACTIVE_LEVELS43278
Node: OMP_NESTED43917
Node: OMP_NUM_THREADS44522
Node: OMP_PROC_BIND45211
Node: OMP_PLACES46403
Node: OMP_STACKSIZE48578
Node: OMP_SCHEDULE49402
Node: OMP_THREAD_LIMIT50098
Node: OMP_WAIT_POLICY50698
Node: GOMP_CPU_AFFINITY51390
Node: GOMP_DEBUG53121
Node: GOMP_STACKSIZE53628
Node: GOMP_SPINCOUNT54457
Node: The libgomp ABI55634
Node: Implementing MASTER construct56433
Node: Implementing CRITICAL construct56847
Node: Implementing ATOMIC construct57586
Node: Implementing FLUSH construct58067
Node: Implementing BARRIER construct58338
Node: Implementing THREADPRIVATE construct58607
Node: Implementing PRIVATE clause59259
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses59840
Node: Implementing REDUCTION clause61164
Node: Implementing PARALLEL construct61721
Node: Implementing FOR construct62978
Node: Implementing ORDERED construct64976
Node: Implementing SECTIONS construct65282
Node: Implementing SINGLE construct66048
Node: Reporting Bugs66710
Node: Copying67070
Node: GNU Free Documentation License104635
Node: Funding129777
Node: Library Index132302
@


1.1.1.7
log
@import GCC 5.4.0 release.  there's not a lot of new info though at
least these 135 (!) GCC PRs have been fixed by the update:

68730 69714 67550 70209 71254 70839 69737 70067 67355 67172 69239
65779 69546 70272 70421 65985 67339 67411 68309 68585 68679 68890
68949 69009 70139 70494 68162 69135 70306 68965 70297 70635 66786
69098 70347 69719 70526 70941 69400 69577 69447 65689 65886 65932
66655 68269 68789 69614 69648 69666 69764 69794 70044 70052 65726
68910 64289 68671 68835 69669 70329 71204 69355 67364 68049 68998
69323 69743 69995 69146 68651 67755 67484 68790 68907 69099 69496
69509 69516 70393 69222 69703 69939 70609 71004 71005 71036 71037
71038 68636 69013 69606 70115 70333 70430 60290 70356 69305 70024
67781 69414 69140 70510 60164 66635 67896 68106 68298 68449 68779
68921 68986 69037 69147 69194 69366 69399 69705 69917 69969 70613
71317 69268 70269 69032 65702 69219 69484 65996 66680 68283 69603
70350 67451 61397
@
text
@d2 1
a2 1
/space/rguenther/gcc-5.4.0/gcc-5.4.0/libgomp/libgomp.texi.
@


1.1.1.8
log
@initial import of GCC 5.5.0.  this fixes a very large number of PRs.
280 are listed here:
    https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=5.5
and this list is likely not complete, and not reproduced here.  the
only specific change in functionality is removal of x86 "pcommit"
instruction (which was apparently never implemented.)
@
text
@d1 2
a2 2
This is libgomp.info, produced by makeinfo version 6.1 from
libgomp.texi.
d21 3
a23 2
software.  Copies published by the Free Software Foundation raise funds
for GNU development.
d54 2
a55 2
software.  Copies published by the Free Software Foundation raise funds
for GNU development.
d63 5
a67 5
This manual documents the usage of libgomp, the GNU Offloading and Multi
Processing Runtime Library.  This includes the GNU implementation of the
OpenMP (http://www.openmp.org) Application Programming Interface (API)
for multi-platform shared-memory parallel programming in C/C++ and
Fortran, and the GNU implementation of the OpenACC
d101 11
a111 10
compile-time flag '-fopenmp' must be specified.  This enables the OpenMP
directive '#pragma omp' in C/C++ and '!$omp' directives in free form,
'c$omp', '*$omp' and '!$omp' directives in fixed form, '!$' conditional
compilation sentinels in free form and 'c$', '*$' and '!$' sentinels in
fixed form, for Fortran.  The flag also arranges for automatic linking
of the OpenMP runtime library (*note Runtime Library Routines::).

   A complete description of all OpenMP directives accepted may be found
in the OpenMP Application Program Interface (http://www.openmp.org)
manual, version 4.0.
d178 1
a178 1
2.1 'omp_get_active_level' - Number of parallel regions
d186 1
a186 1
     _Prototype_:   'int omp_get_active_level(void);'
d189 1
a189 1
     _Interface_:   'integer function omp_get_active_level()'
d201 1
a201 1
2.2 'omp_get_ancestor_thread_num' - Ancestor thread ID
d207 2
a208 2
     outside zero to 'omp_get_level' -1 is returned; if LEVEL is
     'omp_get_level' the result is identical to 'omp_get_thread_num'.
d211 1
a211 1
     _Prototype_:   'int omp_get_ancestor_thread_num(int level);'
d214 2
a215 2
     _Interface_:   'integer function omp_get_ancestor_thread_num(level)'
                    'integer level'
d227 1
a227 1
2.3 'omp_get_cancellation' - Whether cancellation support is enabled
d231 3
a233 3
     This function returns 'true' if cancellation is activated, 'false'
     otherwise.  Here, 'true' and 'false' represent their
     language-specific counterparts.  Unless 'OMP_CANCELLATION' is set
d237 1
a237 1
     _Prototype_:   'int omp_get_cancellation(void);'
d240 1
a240 1
     _Interface_:   'logical function omp_get_cancellation()'
d251 1
a251 1
2.4 'omp_get_default_device' - Get the default device for target regions
d258 1
a258 1
     _Prototype_:   'int omp_get_default_device(void);'
d261 1
a261 1
     _Interface_:   'integer function omp_get_default_device()'
d272 1
a272 1
2.5 'omp_get_dynamic' - Dynamic teams setting
d276 2
a277 2
     This function returns 'true' if enabled, 'false' otherwise.  Here,
     'true' and 'false' represent their language-specific counterparts.
d280 3
a282 3
     'OMP_DYNAMIC' environment variable or at runtime using
     'omp_set_dynamic'.  If undefined, dynamic adjustment is disabled by
     default.
d285 1
a285 1
     _Prototype_:   'int omp_get_dynamic(void);'
d288 1
a288 1
     _Interface_:   'logical function omp_get_dynamic()'
d299 1
a299 1
2.6 'omp_get_level' - Obtain the current nesting level
d307 1
a307 1
     _Prototype_:   'int omp_get_level(void);'
d310 1
a310 1
     _Interface_:   'integer function omp_level()'
d321 1
a321 1
2.7 'omp_get_max_active_levels' - Maximum number of active regions
d329 1
a329 1
     _Prototype_:   'int omp_get_max_active_levels(void);'
d332 1
a332 1
     _Interface_:   'integer function omp_get_max_active_levels()'
d343 1
a343 1
2.8 'omp_get_max_threads' - Maximum number of threads of parallel region
d348 1
a348 1
     region that does not use the clause 'num_threads'.
d351 1
a351 1
     _Prototype_:   'int omp_get_max_threads(void);'
d354 1
a354 1
     _Interface_:   'integer function omp_get_max_threads()'
d366 1
a366 1
2.9 'omp_get_nested' - Nested parallel regions
d370 2
a371 2
     This function returns 'true' if nested parallel regions are
     enabled, 'false' otherwise.  Here, 'true' and 'false' represent
d375 2
a376 2
     'OMP_NESTED' environment variable or at runtime using
     'omp_set_nested'.  If undefined, nested parallel regions are
d380 1
a380 1
     _Prototype_:   'int omp_get_nested(void);'
d383 1
a383 1
     _Interface_:   'logical function omp_get_nested()'
d394 1
a394 1
2.10 'omp_get_num_devices' - Number of target devices
d401 1
a401 1
     _Prototype_:   'int omp_get_num_devices(void);'
d404 1
a404 1
     _Interface_:   'integer function omp_get_num_devices()'
d412 1
a412 1
2.11 'omp_get_num_procs' - Number of processors online
d419 1
a419 1
     _Prototype_:   'int omp_get_num_procs(void);'
d422 1
a422 1
     _Interface_:   'integer function omp_get_num_procs()'
d430 1
a430 1
2.12 'omp_get_num_teams' - Number of teams
d437 1
a437 1
     _Prototype_:   'int omp_get_num_teams(void);'
d440 1
a440 1
     _Interface_:   'integer function omp_get_num_teams()'
d448 1
a448 1
2.13 'omp_get_num_threads' - Size of the active team
d452 2
a453 2
     Returns the number of threads in the current team.  In a sequential
     section of the program 'omp_get_num_threads' returns 1.
d456 5
a460 5
     'OMP_NUM_THREADS' environment variable.  At runtime, the size of
     the current team may be set either by the 'NUM_THREADS' clause or
     by 'omp_set_num_threads'.  If none of the above were used to define
     a specific value and 'OMP_DYNAMIC' is disabled, one thread per CPU
     online is used.
d463 1
a463 1
     _Prototype_:   'int omp_get_num_threads(void);'
d466 1
a466 1
     _Interface_:   'integer function omp_get_num_threads()'
d478 1
a478 1
2.14 'omp_get_proc_bind' - Whether theads may be moved between CPUs
d482 5
a486 5
     This functions returns the currently active thread affinity policy,
     which is set via 'OMP_PROC_BIND'.  Possible values are
     'omp_proc_bind_false', 'omp_proc_bind_true',
     'omp_proc_bind_master', 'omp_proc_bind_close' and
     'omp_proc_bind_spread'.
d489 1
a489 1
     _Prototype_:   'omp_proc_bind_t omp_get_proc_bind(void);'
d492 2
a493 2
     _Interface_:   'integer(kind=omp_proc_bind_kind) function
                    omp_get_proc_bind()'
d505 1
a505 1
2.15 'omp_get_schedule' - Obtain the runtime scheduling method
d510 2
a511 2
     set to the value 'omp_sched_static', 'omp_sched_dynamic',
     'omp_sched_guided' or 'omp_sched_auto'.  The second argument,
d515 2
a516 2
     _Prototype_:   'void omp_get_schedule(omp_sched_t *kind, int
                    *modifier);'
d519 3
a521 3
     _Interface_:   'subroutine omp_get_schedule(kind, modifier)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer modifier'
d532 1
a532 1
2.16 'omp_get_team_num' - Get team number
d539 1
a539 1
     _Prototype_:   'int omp_get_team_num(void);'
d542 1
a542 1
     _Interface_:   'integer function omp_get_team_num()'
d550 1
a550 1
2.17 'omp_get_team_size' - Number of threads in a team
d556 3
a558 3
     values of LEVEL outside zero to 'omp_get_level', -1 is returned; if
     LEVEL is zero, 1 is returned, and for 'omp_get_level', the result
     is identical to 'omp_get_num_threads'.
d561 1
a561 1
     _Prototype_:   'int omp_get_team_size(int level);'
d564 2
a565 2
     _Interface_:   'integer function omp_get_team_size(level)'
                    'integer level'
d577 1
a577 1
2.18 'omp_get_thread_limit' - Maximum number of threads
d584 1
a584 1
     _Prototype_:   'int omp_get_thread_limit(void);'
d587 1
a587 1
     _Interface_:   'integer function omp_get_thread_limit()'
d598 1
a598 1
2.19 'omp_get_thread_num' - Current thread ID
d603 4
a606 4
     team.  In a sequential parts of the program, 'omp_get_thread_num'
     always returns 0.  In parallel regions the return value varies from
     0 to 'omp_get_num_threads'-1 inclusive.  The return value of the
     master thread of a team is always 0.
d609 1
a609 1
     _Prototype_:   'int omp_get_thread_num(void);'
d612 1
a612 1
     _Interface_:   'integer function omp_get_thread_num()'
d623 1
a623 1
2.20 'omp_in_parallel' - Whether a parallel region is active
d627 2
a628 2
     This function returns 'true' if currently running in parallel,
     'false' otherwise.  Here, 'true' and 'false' represent their
d632 1
a632 1
     _Prototype_:   'int omp_in_parallel(void);'
d635 1
a635 1
     _Interface_:   'logical function omp_in_parallel()'
d643 1
a643 1
2.21 'omp_in_final' - Whether in final or included task region
d647 2
a648 2
     This function returns 'true' if currently running in a final or
     included task region, 'false' otherwise.  Here, 'true' and 'false'
d652 1
a652 1
     _Prototype_:   'int omp_in_final(void);'
d655 1
a655 1
     _Interface_:   'logical function omp_in_final()'
d663 1
a663 1
2.22 'omp_is_initial_device' - Whether executing on the host device
d667 2
a668 2
     This function returns 'true' if currently running on the host
     device, 'false' otherwise.  Here, 'true' and 'false' represent
d672 1
a672 1
     _Prototype_:   'int omp_is_initial_device(void);'
d675 1
a675 1
     _Interface_:   'logical function omp_is_initial_device()'
d683 1
a683 1
2.23 'omp_set_default_device' - Set the default device for target regions
d691 1
a691 1
     _Prototype_:   'void omp_set_default_device(int device_num);'
d694 2
a695 2
     _Interface_:   'subroutine omp_set_default_device(device_num)'
                    'integer device_num'
d706 1
a706 1
2.24 'omp_set_dynamic' - Enable/disable dynamic teams
d712 2
a713 2
     of 'true' and 'false', where 'true' enables dynamic adjustment of
     team sizes and 'false' disables it.
d716 1
a716 1
     _Prototype_:   'void omp_set_dynamic(int dynamic_threads);'
d719 2
a720 2
     _Interface_:   'subroutine omp_set_dynamic(dynamic_threads)'
                    'logical, intent(in) :: dynamic_threads'
d731 1
a731 1
2.25 'omp_set_max_active_levels' - Limits the number of active parallel regions
d739 1
a739 1
     _Prototype_:   'void omp_set_max_active_levels(int max_levels);'
d742 2
a743 2
     _Interface_:   'subroutine omp_set_max_active_levels(max_levels)'
                    'integer max_levels'
d754 1
a754 1
2.26 'omp_set_nested' - Enable/disable nested parallel regions
d760 2
a761 2
     language-specific equivalent of 'true' and 'false', where 'true'
     enables dynamic adjustment of team sizes and 'false' disables it.
d764 1
a764 1
     _Prototype_:   'void omp_set_nested(int nested);'
d767 2
a768 2
     _Interface_:   'subroutine omp_set_nested(nested)'
                    'logical, intent(in) :: nested'
d779 1
a779 1
2.27 'omp_set_num_threads' - Set upper team size limit
d784 2
a785 2
     parallel sections, if those do not specify a 'num_threads' clause.
     The argument of 'omp_set_num_threads' shall be a positive integer.
d788 1
a788 1
     _Prototype_:   'void omp_set_num_threads(int num_threads);'
d791 2
a792 2
     _Interface_:   'subroutine omp_set_num_threads(num_threads)'
                    'integer, intent(in) :: num_threads'
d804 1
a804 1
2.28 'omp_set_schedule' - Set the runtime scheduling method
d809 2
a810 2
     value 'omp_sched_static', 'omp_sched_dynamic', 'omp_sched_guided'
     or 'omp_sched_auto'.  Except for 'omp_sched_auto', the chunk size
d812 1
a812 1
     value if zero or negative.  For 'omp_sched_auto' the MODIFIER
d816 2
a817 1
     _Prototype_:   'void omp_set_schedule(omp_sched_t kind, int modifier);'
d820 3
a822 3
     _Interface_:   'subroutine omp_set_schedule(kind, modifier)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer modifier'
d833 1
a833 1
2.29 'omp_init_lock' - Initialize simple lock
d841 1
a841 1
     _Prototype_:   'void omp_init_lock(omp_lock_t *lock);'
d844 2
a845 2
     _Interface_:   'subroutine omp_init_lock(svar)'
                    'integer(omp_lock_kind), intent(out) :: svar'
d856 1
a856 1
2.30 'omp_set_lock' - Wait for and set simple lock
d860 4
a863 4
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  The calling thread is blocked until the lock
     is available.  If the lock is already held by the current thread, a
     deadlock occurs.
d866 1
a866 1
     _Prototype_:   'void omp_set_lock(omp_lock_t *lock);'
d869 2
a870 2
     _Interface_:   'subroutine omp_set_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d882 1
a882 1
2.31 'omp_test_lock' - Test and set simple lock if available
d886 5
a890 5
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  Contrary to 'omp_set_lock', 'omp_test_lock'
     does not block if the lock is not available.  This function returns
     'true' upon success, 'false' otherwise.  Here, 'true' and 'false'
     represent their language-specific counterparts.
d893 1
a893 1
     _Prototype_:   'int omp_test_lock(omp_lock_t *lock);'
d896 2
a897 2
     _Interface_:   'logical function omp_test_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d908 1
a908 1
2.32 'omp_unset_lock' - Unset simple lock
d913 4
a916 4
     'omp_set_lock' or 'omp_test_lock' before.  In addition, the lock
     must be held by the thread calling 'omp_unset_lock'.  Then, the
     lock becomes unlocked.  If one or more threads attempted to set the
     lock before, one of them is chosen to, again, set the lock to
d920 1
a920 1
     _Prototype_:   'void omp_unset_lock(omp_lock_t *lock);'
d923 2
a924 2
     _Interface_:   'subroutine omp_unset_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d935 1
a935 1
2.33 'omp_destroy_lock' - Destroy simple lock
d943 1
a943 1
     _Prototype_:   'void omp_destroy_lock(omp_lock_t *lock);'
d946 2
a947 2
     _Interface_:   'subroutine omp_destroy_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d958 1
a958 1
2.34 'omp_init_nest_lock' - Initialize nested lock
d966 1
a966 1
     _Prototype_:   'void omp_init_nest_lock(omp_nest_lock_t *lock);'
d969 2
a970 2
     _Interface_:   'subroutine omp_init_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(out) :: nvar'
d981 1
a981 1
2.35 'omp_set_nest_lock' - Wait for and set nested lock
d985 5
a989 4
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  The calling thread is blocked until the
     lock is available.  If the lock is already held by the current
     thread, the nesting count for the lock is incremented.
d992 1
a992 1
     _Prototype_:   'void omp_set_nest_lock(omp_nest_lock_t *lock);'
d995 2
a996 2
     _Interface_:   'subroutine omp_set_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1007 1
a1007 1
2.36 'omp_test_nest_lock' - Test and set nested lock if available
d1011 6
a1016 5
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  Contrary to 'omp_set_nest_lock',
     'omp_test_nest_lock' does not block if the lock is not available.
     If the lock is already held by the current thread, the new nesting
     count is returned.  Otherwise, the return value equals zero.
d1019 1
a1019 1
     _Prototype_:   'int omp_test_nest_lock(omp_nest_lock_t *lock);'
d1022 2
a1023 2
     _Interface_:   'logical function omp_test_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1034 1
a1034 1
2.37 'omp_unset_nest_lock' - Unset nested lock
d1039 1
a1039 1
     'omp_set_nested_lock' or 'omp_test_nested_lock' before.  In
d1041 1
a1041 1
     'omp_unset_nested_lock'.  If the nesting count drops to zero, the
d1047 1
a1047 1
     _Prototype_:   'void omp_unset_nest_lock(omp_nest_lock_t *lock);'
d1050 2
a1051 2
     _Interface_:   'subroutine omp_unset_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1062 1
a1062 1
2.38 'omp_destroy_nest_lock' - Destroy nested lock
d1071 1
a1071 1
     _Prototype_:   'void omp_destroy_nest_lock(omp_nest_lock_t *);'
d1074 2
a1075 2
     _Interface_:   'subroutine omp_destroy_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1086 1
a1086 1
2.39 'omp_get_wtick' - Get timer precision
d1094 1
a1094 1
     _Prototype_:   'double omp_get_wtick(void);'
d1097 1
a1097 1
     _Interface_:   'double precision function omp_get_wtick()'
d1108 1
a1108 1
2.40 'omp_get_wtime' - Elapsed wall clock time
d1119 1
a1119 1
     _Prototype_:   'double omp_get_wtime(void);'
d1122 1
a1122 1
     _Interface_:   'double precision function omp_get_wtime()'
d1136 1
a1136 1
The environment variables which beginning with 'OMP_' are defined by
d1138 1
a1138 1
beginning with 'GOMP_' are GNU extensions.
d1163 1
a1163 1
3.1 'OMP_CANCELLATION' - Set whether cancellation is activated
d1167 3
a1169 3
     If set to 'TRUE', the cancellation is activated.  If set to 'FALSE'
     or if unset, cancellation is disabled and the 'cancel' construct is
     ignored.
d1180 1
a1180 1
3.2 'OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
d1184 1
a1184 1
     If set to 'TRUE', the OpenMP version number and the values
d1186 1
a1186 1
     'stderr'.  If set to 'VERBOSE', it additionally shows the value of
d1188 1
a1188 1
     or set to 'FALSE', this information will not be shown.
d1196 1
a1196 1
3.3 'OMP_DEFAULT_DEVICE' - Set the device used in target regions
d1200 5
a1204 5
     Set to choose the device which is used in a 'target' region, unless
     the value is overridden by 'omp_set_default_device' or by a
     'device' clause.  The value shall be the nonnegative device number.
     If no device with the given device number exists, the code is
     executed on the host.  If unset, device number 0 will be used.
d1215 1
a1215 1
3.4 'OMP_DYNAMIC' - Dynamic adjustment of threads
d1221 2
a1222 2
     'TRUE' or 'FALSE'.  If undefined, dynamic adjustment is disabled by
     default.
d1233 1
a1233 1
3.5 'OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1250 1
a1250 1
3.6 'OMP_NESTED' - Nested parallel regions
d1256 1
a1256 1
     environment variable shall be 'TRUE' or 'FALSE'.  If undefined,
d1268 1
a1268 1
3.7 'OMP_NUM_THREADS' - Specifies the number of threads to use
d1272 5
a1276 5
     Specifies the default number of threads to use in parallel regions.
     The value of this variable shall be a comma-separated list of
     positive integers; the value specified the number of threads to use
     for the corresponding nested level.  If undefined one thread per
     CPU is used.
d1287 1
a1287 1
3.8 'OMP_PROC_BIND' - Whether theads may be moved between CPUs
d1292 1
a1292 1
     to 'TRUE', OpenMP theads should not be moved; if set to 'FALSE'
d1294 1
a1294 1
     values 'MASTER', 'CLOSE' and 'SPREAD' can be used to specify the
d1296 3
a1298 3
     'MASTER' the worker threads are in the same place partition as the
     master thread.  With 'CLOSE' those are kept close to the master
     thread in contiguous place partitions.  And with 'SPREAD' a sparse
d1301 2
a1302 2
     When undefined, 'OMP_PROC_BIND' defaults to 'TRUE' when
     'OMP_PLACES' or 'GOMP_CPU_AFFINITY' is set and 'FALSE' otherwise.
d1314 1
a1314 1
3.9 'OMP_PLACES' - Specifies on which CPUs the theads should be placed
d1318 3
a1320 3
     The thread placement can be either specified using an abstract name
     or by an explicit list of the places.  The abstract names
     'threads', 'cores' and 'sockets' can be optionally followed by a
d1322 3
a1324 3
     shall be created.  With 'threads' each place corresponds to a
     single hardware thread; 'cores' to a single core with the
     corresponding number of hardware threads; and with 'sockets' the
d1326 1
a1326 1
     be shown by setting the 'OMP_DISPLAY_ENV' environment variable.
d1339 2
a1340 2
     specifies the same places list: '"{0,1,2}, {3,4,6}, {7,8,9},
     {10,11,12}"'; '"{0:3}, {3:3}, {7:3}, {10:3}"'; and '"{0:2}:4:3"'.
d1342 2
a1343 2
     If 'OMP_PLACES' and 'GOMP_CPU_AFFINITY' are unset and
     'OMP_PROC_BIND' is either unset or 'false', threads may be moved
d1356 1
a1356 1
3.10 'OMP_STACKSIZE' - Set default thread stack size
d1361 7
a1367 7
     is suffixed by 'B', 'K', 'M' or 'G', in which case the size is,
     respectively, in bytes, kilobytes, megabytes or gigabytes.  This is
     different from 'pthread_attr_setstacksize' which gets the number of
     bytes as an argument.  If the stack size cannot be set due to
     system constraints, an error is reported and the initial stack size
     is left unchanged.  If undefined, the stack size is system
     dependent.
d1375 1
a1375 1
3.11 'OMP_SCHEDULE' - How threads are scheduled
d1379 5
a1383 5
     Allows to specify 'schedule type' and 'chunk size'.  The value of
     the variable shall have the form: 'type[,chunk]' where 'type' is
     one of 'static', 'dynamic', 'guided' or 'auto' The optional 'chunk'
     size shall be a positive integer.  If undefined, dynamic scheduling
     and a chunk size of 1 is used.
d1395 1
a1395 1
3.12 'OMP_THREAD_LIMIT' - Set the maximum number of threads
d1412 1
a1412 1
3.13 'OMP_WAIT_POLICY' - How waiting threads are handled
d1417 2
a1418 2
     the value is 'PASSIVE', waiting threads should not consume CPU
     power while waiting; while the value is 'ACTIVE' specifies that
d1431 1
a1431 1
3.14 'GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d1439 2
a1440 2
     (M-N:S). CPU numbers are zero based.  For example,
     'GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
d1444 1
a1444 1
     beginning of the list.  'GOMP_CPU_AFFINITY=0' binds all threads to
d1449 10
a1458 10
     language-specific library functions, e.g., 'getenv' in C or
     'GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
     setting of the 'GOMP_CPU_AFFINITY' environment variable.  A defined
     CPU affinity on startup cannot be changed or disabled during the
     runtime of the application.

     If both 'GOMP_CPU_AFFINITY' and 'OMP_PROC_BIND' are set,
     'OMP_PROC_BIND' has a higher precedence.  If neither has been set
     and 'OMP_PROC_BIND' is unset, or when 'OMP_PROC_BIND' is set to
     'FALSE', the host system will handle the assignment of threads to
d1467 1
a1467 1
3.15 'GOMP_DEBUG' - Enable debugging output
d1471 2
a1472 2
     Enable debugging output.  The variable should be set to '0'
     (disabled, also the default if not set), or '1' (enabled).
d1481 1
a1481 1
3.16 'GOMP_STACKSIZE' - Set default thread stack size
d1486 1
a1486 1
     from 'pthread_attr_setstacksize' which gets the number of bytes as
d1503 1
a1503 1
3.17 'GOMP_SPINCOUNT' - Set the busy-wait spin count
d1509 1
a1509 1
     value may be either 'INFINITE', 'INFINITY' to always wait actively
d1512 9
a1520 8
     suffixes acting as multiplication factors: 'k' (kilo, thousand),
     'M' (mega, million), 'G' (giga, billion), or 'T' (tera, trillion).
     If undefined, 0 is used when 'OMP_WAIT_POLICY' is 'PASSIVE',
     300,000 is used when 'OMP_WAIT_POLICY' is undefined and 30 billion
     is used when 'OMP_WAIT_POLICY' is 'ACTIVE'.  If there are more
     OpenMP threads than available CPUs, 1000 and 100 spins are used for
     'OMP_WAIT_POLICY' being 'ACTIVE' or undefined, respectively; unless
     the 'GOMP_SPINCOUNT' is lower or 'OMP_WAIT_POLICY' is 'PASSIVE'.
d1531 2
a1532 2
The following sections present notes on the external ABI as presented by
libgomp.  Only maintainers should need them.
d1592 1
a1592 1
The target should implement the '__sync' builtins.
d1608 1
a1608 1
Expands to the '__sync_synchronize' builtin.
d1624 4
a1627 4
In _most_ cases we can map this directly to '__thread'.  Except that OMP
allows constructors for C++ objects.  We can either refuse to support
this (how often is it used?)  or we can implement something akin to
.ctors.
d1659 2
a1660 2
   It is not clear what to do with bare FOR or SECTION blocks.  The only
thing I can figure is that we do something like:
d1678 2
a1679 2
for the two variables, i.e.  not something you could write directly in
C. Presumably this only makes sense if the "outer" x and y are global
d1692 4
a1695 4
pointer to an array of the type of the variable, indexed by the thread's
TEAM_ID.  The thread stores its final value into the array, and after
the barrier, the master thread iterates over the array to collect the
values.
d1732 3
a1734 3
   The function needs to create the appropriate number of threads and/or
launch them from the dock.  It needs to create the team structure and
assign team ids.
d1739 1
a1739 1
'omp_in_parallel()' state.
d1791 2
a1792 2
also pull it into a local variable if we like, but since its supposed to
remain unchanged, we can also not if we like.
d1794 5
a1798 5
   If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be able
to get away with no work-sharing context at all, since we can simply
perform the arithmetic directly in each thread to divide up the
iterations.  Which would mean that we wouldn't need to call any of these
routines.
d1892 2
a1893 2
"openacc", or "openmp", or both to the keywords field in the bug report,
as appropriate.
d1903 1
a1903 1
     Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
d1931 3
a1933 3
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
d1952 10
a1961 9
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
d1998 2
a1999 2
     infringement under applicable copyright law, except executing it on
     a computer or modifying a private copy.  Propagation includes
d2013 2
a2014 2
     the extent that warranties are provided), that licensees may convey
     the work under this License, and how to view a copy of this
d2022 2
a2023 2
     for making modifications to it.  "Object code" means any non-source
     form of a work.
d2034 4
a2037 4
     Major Component, and (b) serves only to enable use of the work with
     that Major Component, or to implement a Standard Interface for
     which an implementation is available to the public in source code
     form.  A "Major Component", in this context, means a major
d2045 3
a2047 3
     work) run the object code and to modify the work, including scripts
     to control those activities.  However, it does not include the
     work's System Libraries, or general-purpose tools or generally
d2050 4
a2053 4
     Corresponding Source includes interface definition files associated
     with source files for the work, and the source code for shared
     libraries and dynamically linked subprograms that the work is
     specifically designed to require, such as by intimate data
d2070 4
a2073 4
     a covered work is covered by this License only if the output, given
     its content, constitutes a covered work.  This License acknowledges
     your rights of fair use or other equivalent, as provided by
     copyright law.
d2078 8
a2085 8
     sole purpose of having them make modifications exclusively for you,
     or provide you with facilities for running those works, provided
     that you comply with the terms of this License in conveying all
     material for which you do not control copyright.  Those thus making
     or running the covered works for you must do so exclusively on your
     behalf, under your direction and control, on terms that prohibit
     them from making any copies of your copyrighted material outside
     their relationship with you.
d2102 2
a2103 2
     with respect to the covered work, and you disclaim any intention to
     limit operation or modification of the work as a means of
d2173 2
a2174 2
          written offer, valid for at least three years and valid for as
          long as you offer spare parts or customer support for that
d2184 2
a2185 2
       c. Convey individual copies of the object code with a copy of the
          written offer to provide the Corresponding Source.  This
d2191 2
a2192 2
          place (gratis or for a charge), and offer equivalent access to
          the Corresponding Source in the same way through the same
d2196 4
a2199 4
          Corresponding Source may be on a different server (operated by
          you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to the
          object code saying where to find the Corresponding Source.
d2201 2
a2202 2
          remain obligated to ensure that it is available for as long as
          needed to satisfy these requirements.
d2209 1
d2217 2
a2218 2
     incorporation into a dwelling.  In determining whether a product is
     a consumer product, doubtful cases shall be resolved in favor of
d2249 5
a2253 5
     warranty, or updates for a work that has been modified or installed
     by the recipient, or for the User Product in which it has been
     modified or installed.  Access to a network may be denied when the
     modification itself materially and adversely affects the operation
     of the network or violates the rules and protocols for
d2283 2
a2284 2
     holders of that material) supplement the terms of this License with
     terms:
d2294 3
a2296 2
          or requiring that modified versions of such material be marked
          in reasonable ways as different from the original version; or
d2315 5
a2319 4
     contains a further restriction but permits relicensing or conveying
     under this License, you may add to a covered work material governed
     by the terms of that license document, provided that the further
     restriction does not survive such relicensing or conveying.
d2335 2
a2336 2
     under this License (including any patent licenses granted under the
     third paragraph of section 11).
d2340 2
a2341 2
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
d2353 4
a2356 4
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, you do not qualify to receive new licenses
     for the same material under section 10.
d2370 1
a2370 1
  10. Automatic Licensing of Downstream Recipients.
d2384 4
a2387 4
     could give under the previous paragraph, plus a right to possession
     of the Corresponding Source of the work from the predecessor in
     interest, if the predecessor has it or can get it with reasonable
     efforts.
d2391 6
a2396 6
     may not impose a license fee, royalty, or other charge for exercise
     of rights granted under this License, and you may not initiate
     litigation (including a cross-claim or counterclaim in a lawsuit)
     alleging that any patent claim is infringed by making, using,
     selling, offering for sale, or importing the Program or any portion
     of it.
d2398 1
a2398 1
  11. Patents.
d2418 2
a2419 2
     otherwise run, modify and propagate the contents of its contributor
     version.
d2424 3
a2426 3
     patent or covenant not to sue for patent infringement).  To "grant"
     such a patent license to a party means to make such an agreement or
     commitment not to enforce a patent against the party.
d2456 10
a2465 10
     party that is in the business of distributing software, under which
     you make payment to the third party based on the extent of your
     activity of conveying the work, and under which the third party
     grants, to any of the parties who would receive the covered work
     from you, a discriminatory patent license (a) in connection with
     copies of the covered work conveyed by you (or copies made from
     those copies), or (b) primarily for and in connection with specific
     products or compilations that contain the covered work, unless you
     entered into that arrangement, or that patent license was granted,
     prior to 28 March 2007.
d2471 1
a2471 1
  12. No Surrender of Others' Freedom.
d2473 11
a2483 10
     If conditions are imposed on you (whether by court order, agreement
     or otherwise) that contradict the conditions of this License, they
     do not excuse you from the conditions of this License.  If you
     cannot convey a covered work so as to satisfy simultaneously your
     obligations under this License and any other pertinent obligations,
     then as a consequence you may not convey it at all.  For example,
     if you agree to terms that obligate you to collect a royalty for
     further conveying from those to whom you convey the Program, the
     only way you could satisfy both those terms and this License would
     be to refrain entirely from conveying the Program.
d2485 1
a2485 1
  13. Use with the GNU Affero General Public License.
d2496 1
a2496 1
  14. Revised Versions of this License.
d2499 4
a2502 3
     versions of the GNU General Public License from time to time.  Such
     new versions will be similar in spirit to the present version, but
     may differ in detail to address new problems or concerns.
d2508 4
a2511 4
     that numbered version or of any later version published by the Free
     Software Foundation.  If the Program does not specify a version
     number of the GNU General Public License, you may choose any
     version ever published by the Free Software Foundation.
d2523 1
a2523 1
  15. Disclaimer of Warranty.
d2526 1
a2526 1
     APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
d2530 1
a2530 1
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
d2535 1
a2535 1
  16. Limitation of Liability.
d2539 2
a2540 2
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
     DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
d2548 1
a2548 1
  17. Interpretation of Sections 15 and 16.
d2557 1
d2588 1
a2588 1
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
d2597 1
a2597 1
     This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
d2599 1
a2599 1
     under certain conditions; type 'show c' for details.
d2601 1
a2601 1
   The hypothetical commands 'show w' and 'show c' should show the
d2609 1
a2609 1
the GNU GPL, see <http://www.gnu.org/licenses/>.
d2616 1
a2616 1
please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
d2627 1
a2627 1
     <http://fsf.org/>
d2652 2
a2653 2
     of subject matter or whether it is published as a printed book.  We
     recommend this License principally for works whose purpose is
d2659 2
a2660 2
     that contains a notice placed by the copyright holder saying it can
     be distributed under the terms of this License.  Such a notice
d2664 3
a2666 3
     of the public is a licensee, and is addressed as "you".  You accept
     the license if you copy, modify or distribute the work in a way
     requiring permission under copyright law.
d2684 6
a2689 6
     titles are designated, as being those of Invariant Sections, in the
     notice that says that the Document is released under this License.
     If a section does not fit the above definition of Secondary then it
     is not allowed to be designated as Invariant.  The Document may
     contain zero Invariant Sections.  If the Document does not identify
     any Invariant Sections then there are none.
d2700 10
a2709 10
     straightforwardly with generic text editors or (for images composed
     of pixels) generic paint programs or (for drawings) some widely
     available drawing editor, and that is suitable for input to text
     formatters or for automatic translation to a variety of formats
     suitable for input to text formatters.  A copy made in an otherwise
     Transparent file format whose markup, or absence of markup, has
     been arranged to thwart or discourage subsequent modification by
     readers is not Transparent.  An image format is not Transparent if
     used for any substantial amount of text.  A copy that is not
     "Transparent" is called "Opaque".
d2713 8
a2720 8
     SGML or XML using a publicly available DTD, and standard-conforming
     simple HTML, PostScript or PDF designed for human modification.
     Examples of transparent image formats include PNG, XCF and JPG.
     Opaque formats include proprietary formats that can be read and
     edited only by proprietary word processors, SGML or XML for which
     the DTD and/or processing tools are not generally available, and
     the machine-generated HTML, PostScript or PDF produced by some word
     processors for output purposes only.
d2758 2
a2759 2
     distribute a large enough number of copies you must also follow the
     conditions in section 3.
d2773 6
a2778 5
     front cover must present the full title with all words of the title
     equally prominent and visible.  You may add other material on the
     covers in addition.  Copying with changes limited to the covers, as
     long as they preserve the title of the Document and satisfy these
     conditions, can be treated as verbatim copying in other respects.
d2786 12
a2797 11
     numbering more than 100, you must either include a machine-readable
     Transparent copy along with each Opaque copy, or state in or with
     each Opaque copy a computer-network location from which the general
     network-using public has access to download using public-standard
     network protocols a complete Transparent copy of the Document, free
     of added material.  If you use the latter option, you must take
     reasonably prudent steps, when you begin distribution of Opaque
     copies in quantity, to ensure that this Transparent copy will
     remain thus accessible at the stated location until at least one
     year after the last time you distribute an Opaque copy (directly or
     through your agents or retailers) of that edition to the public.
d2800 3
a2802 3
     the Document well before redistributing any large number of copies,
     to give them a chance to provide you with an updated version of the
     Document.
d2808 5
a2812 5
     release the Modified Version under precisely this License, with the
     Modified Version filling the role of the Document, thus licensing
     distribution and modification of the Modified Version to whoever
     possesses a copy of it.  In addition, you must do these things in
     the Modified Version:
d2815 5
a2819 5
          distinct from that of the Document, and from those of previous
          versions (which should, if there were any, be listed in the
          History section of the Document).  You may use the same title
          as a previous version if the original publisher of that
          version gives permission.
d2849 6
a2854 6
          authors, and publisher of the Modified Version as given on the
          Title Page.  If there is no section Entitled "History" in the
          Document, create one stating the title, year, authors, and
          publisher of the Document as given on its Title Page, then add
          an item describing the Modified Version as stated in the
          previous sentence.
d2859 5
a2863 5
          previous versions it was based on.  These may be placed in the
          "History" section.  You may omit a network location for a work
          that was published at least four years before the Document
          itself, or if the original publisher of the version it refers
          to gives permission.
d2866 2
a2867 2
          Preserve the Title of the section, and preserve in the section
          all the substance and tone of each of the contributor
d2870 4
a2873 3
       L. Preserve all the Invariant Sections of the Document, unaltered
          in their text and in their titles.  Section numbers or the
          equivalent are not considered part of the section titles.
d2886 5
a2890 5
     material copied from the Document, you may at your option designate
     some or all of these sections as invariant.  To do this, add their
     titles to the list of Invariant Sections in the Modified Version's
     license notice.  These titles must be distinct from any other
     section titles.
d2899 9
a2907 9
     and a passage of up to 25 words as a Back-Cover Text, to the end of
     the list of Cover Texts in the Modified Version.  Only one passage
     of Front-Cover Text and one of Back-Cover Text may be added by (or
     through arrangements made by) any one entity.  If the Document
     already includes a cover text for the same cover, previously added
     by you or by arrangement made by the same entity you are acting on
     behalf of, you may not add another; but you may replace the old
     one, on explicit permission from the previous publisher that added
     the old one.
d2917 2
a2918 2
     modified versions, provided that you include in the combination all
     of the Invariant Sections of all of the original documents,
d2945 2
a2946 2
     rules of this License for verbatim copying of each of the documents
     in all other respects.
d2950 3
a2952 3
     a copy of this License into the extracted document, and follow this
     License in all other respects regarding verbatim copying of that
     document.
d2957 2
a2958 2
     separate and independent documents or works, in or on a volume of a
     storage or distribution medium, is called an "aggregate" if the
d3003 2
a3004 2
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
d3016 4
a3019 4
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, receipt of a copy of some or all of the
     same material does not give you any rights to use it.
d3021 1
a3021 1
  10. FUTURE REVISIONS OF THIS LICENSE
d3027 1
a3027 1
     <http://www.gnu.org/copyleft/>.
d3034 5
a3038 5
     published (not as a draft) by the Free Software Foundation.  If the
     Document does not specify a version number of this License, you may
     choose any version ever published (not as a draft) by the Free
     Software Foundation.  If the Document specifies that a proxy can
     decide which future versions of this License can be used, that
d3042 1
a3042 1
  11. RELICENSING
d3072 1
d3089 1
a3089 1
Texts, replace the "with...Texts."  line with this:
d3100 3
a3102 3
recommend releasing these examples in parallel under your choice of free
software license, such as the GNU General Public License, to permit
their use in free software.
d3132 2
a3133 2
can greatly alter what fraction of the sales price counts as profit.  If
the price you pay is $50, ten percent of the profit is probably less
d3143 2
a3144 2
ports such as adding a new CPU to the GNU Compiler Collection contribute
more; major new features or packages contribute the most.
d3163 16
a3179 16
* Environment Variable <1>:              OMP_DISPLAY_ENV.       (line 6)
* Environment Variable <2>:              OMP_DEFAULT_DEVICE.    (line 6)
* Environment Variable <3>:              OMP_DYNAMIC.           (line 6)
* Environment Variable <4>:              OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable <5>:              OMP_NESTED.            (line 6)
* Environment Variable <6>:              OMP_NUM_THREADS.       (line 6)
* Environment Variable <7>:              OMP_PROC_BIND.         (line 6)
* Environment Variable <8>:              OMP_PLACES.            (line 6)
* Environment Variable <9>:              OMP_STACKSIZE.         (line 6)
* Environment Variable <10>:             OMP_SCHEDULE.          (line 6)
* Environment Variable <11>:             OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <12>:             OMP_WAIT_POLICY.       (line 6)
* Environment Variable <13>:             GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <14>:             GOMP_DEBUG.            (line 6)
* Environment Variable <15>:             GOMP_STACKSIZE.        (line 6)
* Environment Variable <16>:             GOMP_SPINCOUNT.        (line 6)
d3182 4
a3186 4
* Implementation specific setting <1>:   OMP_NUM_THREADS.       (line 6)
* Implementation specific setting <2>:   OMP_SCHEDULE.          (line 6)
* Implementation specific setting <3>:   GOMP_STACKSIZE.        (line 6)
* Implementation specific setting <4>:   GOMP_SPINCOUNT.        (line 6)
d3192 81
a3272 81
Node: Top2083
Node: Enabling OpenMP3878
Node: Runtime Library Routines4665
Node: omp_get_active_level7652
Node: omp_get_ancestor_thread_num8352
Node: omp_get_cancellation9282
Node: omp_get_default_device10096
Node: omp_get_dynamic10772
Node: omp_get_level11647
Node: omp_get_max_active_levels12267
Node: omp_get_max_threads12966
Node: omp_get_nested13723
Node: omp_get_num_devices14635
Node: omp_get_num_procs15156
Node: omp_get_num_teams15695
Node: omp_get_num_threads16211
Node: omp_get_proc_bind17300
Node: omp_get_schedule18221
Node: omp_get_team_num19167
Node: omp_get_team_size19666
Node: omp_get_thread_limit20626
Node: omp_get_thread_num21245
Node: omp_in_parallel22116
Node: omp_in_final22765
Node: omp_is_initial_device23439
Node: omp_set_default_device24132
Node: omp_set_dynamic24923
Node: omp_set_max_active_levels25809
Node: omp_set_nested26586
Node: omp_set_num_threads27478
Node: omp_set_schedule28346
Node: omp_init_lock29397
Node: omp_set_lock30050
Node: omp_test_lock30905
Node: omp_unset_lock31881
Node: omp_destroy_lock32812
Node: omp_init_nest_lock33489
Node: omp_set_nest_lock34224
Node: omp_test_nest_lock35139
Node: omp_unset_nest_lock36166
Node: omp_destroy_nest_lock37181
Node: omp_get_wtick37932
Node: omp_get_wtime38524
Node: Environment Variables39300
Node: OMP_CANCELLATION40692
Node: OMP_DISPLAY_ENV41225
Node: OMP_DEFAULT_DEVICE41928
Node: OMP_DYNAMIC42708
Node: OMP_MAX_ACTIVE_LEVELS43304
Node: OMP_NESTED43943
Node: OMP_NUM_THREADS44548
Node: OMP_PROC_BIND45236
Node: OMP_PLACES46428
Node: OMP_STACKSIZE48603
Node: OMP_SCHEDULE49427
Node: OMP_THREAD_LIMIT50123
Node: OMP_WAIT_POLICY50723
Node: GOMP_CPU_AFFINITY51415
Node: GOMP_DEBUG53145
Node: GOMP_STACKSIZE53652
Node: GOMP_SPINCOUNT54481
Node: The libgomp ABI55653
Node: Implementing MASTER construct56452
Node: Implementing CRITICAL construct56866
Node: Implementing ATOMIC construct57605
Node: Implementing FLUSH construct58086
Node: Implementing BARRIER construct58357
Node: Implementing THREADPRIVATE construct58626
Node: Implementing PRIVATE clause59279
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses59860
Node: Implementing REDUCTION clause61184
Node: Implementing PARALLEL construct61741
Node: Implementing FOR construct62998
Node: Implementing ORDERED construct64996
Node: Implementing SECTIONS construct65302
Node: Implementing SINGLE construct66068
Node: Reporting Bugs66730
Node: Copying67090
Node: GNU Free Documentation License104637
Node: Funding129760
Node: Library Index132286
@


1.1.1.9
log
@import GCC 6.4.0.  see this url for details which are too large to
include here:

   http://gcc.gnu.org/gcc-6/changes.html

the main visible changes appear to be:

- The default mode for C++ is now -std=gnu++14 instead of -std=gnu++98.
- The C and C++ compilers now support attributes on enumerators.
- Diagnostics can now contain "fix-it hints"
- more warnings (some added to -Wall)
@
text
@d1 2
a2 2
This is libgomp.info, produced by makeinfo version 4.13 from
/space/rguenther/gcc-6.4.0/gcc-6.4.0/libgomp/libgomp.texi.
d4 1
a4 1
Copyright (C) 2006-2016 Free Software Foundation, Inc.
d21 2
a22 3
software.  Copies published by the Free Software Foundation raise
funds for GNU development.

d36 1
a36 1
   Copyright (C) 2006-2016 Free Software Foundation, Inc.
d53 2
a54 2
software.  Copies published by the Free Software Foundation raise
funds for GNU development.
d62 5
a66 5
This manual documents the usage of libgomp, the GNU Offloading and
Multi Processing Runtime Library.  This includes the GNU implementation
of the OpenMP (http://www.openmp.org) Application Programming Interface
(API) for multi-platform shared-memory parallel programming in C/C++
and Fortran, and the GNU implementation of the OpenACC
a81 10
* Enabling OpenACC::           How to enable OpenACC for your
                               applications.
* OpenACC Runtime Library Routines:: The OpenACC runtime application
                               programming interface.
* OpenACC Environment Variables:: Influencing OpenACC runtime behavior with
                               environment variables.
* CUDA Streams Usage::         Notes on the implementation of
                               asynchronous operations.
* OpenACC Library Interoperability:: OpenACC library interoperability with the
                               NVIDIA CUBLAS library.
d100 10
a109 11
compile-time flag `-fopenmp' must be specified.  This enables the
OpenMP directive `#pragma omp' in C/C++ and `!$omp' directives in free
form, `c$omp', `*$omp' and `!$omp' directives in fixed form, `!$'
conditional compilation sentinels in free form and `c$', `*$' and `!$'
sentinels in fixed form, for Fortran.  The flag also arranges for
automatic linking of the OpenMP runtime library (*note Runtime Library
Routines::).

   A complete description of all OpenMP directives accepted may be
found in the OpenMP Application Program Interface
(http://www.openmp.org) manual, version 4.5.
d118 1
a118 1
OpenMP specification in version 4.5.  The routines are structured in
a132 1
* omp_get_max_task_priority::   Maximum task priority value that can be set
d176 1
a176 1
2.1 `omp_get_active_level' - Number of parallel regions
d184 1
a184 1
     _Prototype_:  `int omp_get_active_level(void);'
d187 1
a187 1
     _Interface_:  `integer function omp_get_active_level()'
d194 1
a194 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.20.
d199 1
a199 1
2.2 `omp_get_ancestor_thread_num' - Ancestor thread ID
d205 2
a206 2
     outside zero to `omp_get_level' -1 is returned; if LEVEL is
     `omp_get_level' the result is identical to `omp_get_thread_num'.
d209 1
a209 1
     _Prototype_:  `int omp_get_ancestor_thread_num(int level);'
d212 2
a213 2
     _Interface_:  `integer function omp_get_ancestor_thread_num(level)'
                   `integer level'
d220 1
a220 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.18.
d225 1
a225 1
2.3 `omp_get_cancellation' - Whether cancellation support is enabled
d229 3
a231 3
     This function returns `true' if cancellation is activated, `false'
     otherwise.  Here, `true' and `false' represent their
     language-specific counterparts.  Unless `OMP_CANCELLATION' is set
d235 1
a235 1
     _Prototype_:  `int omp_get_cancellation(void);'
d238 1
a238 1
     _Interface_:  `logical function omp_get_cancellation()'
d244 1
a244 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.9.
d249 1
a249 1
2.4 `omp_get_default_device' - Get the default device for target regions
d256 1
a256 1
     _Prototype_:  `int omp_get_default_device(void);'
d259 1
a259 1
     _Interface_:  `integer function omp_get_default_device()'
d265 1
a265 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.30.
d270 1
a270 1
2.5 `omp_get_dynamic' - Dynamic teams setting
d274 2
a275 2
     This function returns `true' if enabled, `false' otherwise.  Here,
     `true' and `false' represent their language-specific counterparts.
d278 3
a280 3
     `OMP_DYNAMIC' environment variable or at runtime using
     `omp_set_dynamic'.  If undefined, dynamic adjustment is disabled
     by default.
d283 1
a283 1
     _Prototype_:  `int omp_get_dynamic(void);'
d286 1
a286 1
     _Interface_:  `logical function omp_get_dynamic()'
d292 1
a292 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.8.
d297 1
a297 1
2.6 `omp_get_level' - Obtain the current nesting level
d305 1
a305 1
     _Prototype_:  `int omp_get_level(void);'
d308 1
a308 1
     _Interface_:  `integer function omp_level()'
d314 1
a314 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.17.
d317 1
a317 1
File: libgomp.info,  Node: omp_get_max_active_levels,  Next: omp_get_max_task_priority,  Prev: omp_get_level,  Up: Runtime Library Routines
d319 1
a319 1
2.7 `omp_get_max_active_levels' - Maximum number of active regions
d327 1
a327 1
     _Prototype_:  `int omp_get_max_active_levels(void);'
d330 1
a330 1
     _Interface_:  `integer function omp_get_max_active_levels()'
d336 1
a336 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.16.
d339 1
a339 12
File: libgomp.info,  Node: omp_get_max_task_priority,  Next: omp_get_max_threads,  Prev: omp_get_max_active_levels,  Up: Runtime Library Routines

2.8 `omp_get_max_task_priority' - Maximum priority value
========================================================

that can be set for tasks.
_Description_:
     This function obtains the maximum allowed priority number for
     tasks.

_C/C++_
     _Prototype_:  `int omp_get_max_task_priority(void);'
d341 1
a341 10
_Fortran_:
     _Interface_:  `integer function omp_get_max_task_priority()'

_Reference_:
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.29.


File: libgomp.info,  Node: omp_get_max_threads,  Next: omp_get_nested,  Prev: omp_get_max_task_priority,  Up: Runtime Library Routines

2.9 `omp_get_max_threads' - Maximum number of threads of parallel region
d346 1
a346 1
     region that does not use the clause `num_threads'.
d349 1
a349 1
     _Prototype_:  `int omp_get_max_threads(void);'
d352 1
a352 1
     _Interface_:  `integer function omp_get_max_threads()'
d359 1
a359 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.3.
d364 2
a365 2
2.10 `omp_get_nested' - Nested parallel regions
===============================================
d368 2
a369 2
     This function returns `true' if nested parallel regions are
     enabled, `false' otherwise.  Here, `true' and `false' represent
d373 2
a374 2
     `OMP_NESTED' environment variable or at runtime using
     `omp_set_nested'.  If undefined, nested parallel regions are
d378 1
a378 1
     _Prototype_:  `int omp_get_nested(void);'
d381 1
a381 1
     _Interface_:  `logical function omp_get_nested()'
d387 1
a387 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.11.
d392 1
a392 1
2.11 `omp_get_num_devices' - Number of target devices
d399 1
a399 1
     _Prototype_:  `int omp_get_num_devices(void);'
d402 1
a402 1
     _Interface_:  `integer function omp_get_num_devices()'
d405 1
a405 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.31.
d410 1
a410 1
2.12 `omp_get_num_procs' - Number of processors online
d417 1
a417 1
     _Prototype_:  `int omp_get_num_procs(void);'
d420 1
a420 1
     _Interface_:  `integer function omp_get_num_procs()'
d423 1
a423 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.5.
d428 1
a428 1
2.13 `omp_get_num_teams' - Number of teams
d435 1
a435 1
     _Prototype_:  `int omp_get_num_teams(void);'
d438 1
a438 1
     _Interface_:  `integer function omp_get_num_teams()'
d441 1
a441 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.32.
d446 1
a446 1
2.14 `omp_get_num_threads' - Size of the active team
d450 2
a451 2
     Returns the number of threads in the current team.  In a
     sequential section of the program `omp_get_num_threads' returns 1.
d454 5
a458 5
     `OMP_NUM_THREADS' environment variable.  At runtime, the size of
     the current team may be set either by the `NUM_THREADS' clause or
     by `omp_set_num_threads'.  If none of the above were used to
     define a specific value and `OMP_DYNAMIC' is disabled, one thread
     per CPU online is used.
d461 1
a461 1
     _Prototype_:  `int omp_get_num_threads(void);'
d464 1
a464 1
     _Interface_:  `integer function omp_get_num_threads()'
d471 1
a471 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.2.
d476 1
a476 1
2.15 `omp_get_proc_bind' - Whether theads may be moved between CPUs
d480 5
a484 5
     This functions returns the currently active thread affinity
     policy, which is set via `OMP_PROC_BIND'.  Possible values are
     `omp_proc_bind_false', `omp_proc_bind_true',
     `omp_proc_bind_master', `omp_proc_bind_close' and
     `omp_proc_bind_spread'.
d487 1
a487 1
     _Prototype_:  `omp_proc_bind_t omp_get_proc_bind(void);'
d490 2
a491 2
     _Interface_:  `integer(kind=omp_proc_bind_kind) function
                   omp_get_proc_bind()'
d498 1
a498 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.22.
d503 1
a503 1
2.16 `omp_get_schedule' - Obtain the runtime scheduling method
d508 3
a510 3
     set to the value `omp_sched_static', `omp_sched_dynamic',
     `omp_sched_guided' or `omp_sched_auto'.  The second argument,
     CHUNK_SIZE, is set to the chunk size.
d513 2
a514 2
     _Prototype_:  `void omp_get_schedule(omp_sched_t *kind, int
                   *chunk_size);'
d517 3
a519 3
     _Interface_:  `subroutine omp_get_schedule(kind, chunk_size)'
                   `integer(kind=omp_sched_kind) kind'
                   `integer chunk_size'
d525 1
a525 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.13.
d530 1
a530 1
2.17 `omp_get_team_num' - Get team number
d537 1
a537 1
     _Prototype_:  `int omp_get_team_num(void);'
d540 1
a540 1
     _Interface_:  `integer function omp_get_team_num()'
d543 1
a543 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.33.
d548 1
a548 1
2.18 `omp_get_team_size' - Number of threads in a team
d554 3
a556 3
     values of LEVEL outside zero to `omp_get_level', -1 is returned;
     if LEVEL is zero, 1 is returned, and for `omp_get_level', the
     result is identical to `omp_get_num_threads'.
d559 1
a559 1
     _Prototype_:  `int omp_get_team_size(int level);'
d562 2
a563 2
     _Interface_:  `integer function omp_get_team_size(level)'
                   `integer level'
d570 1
a570 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.19.
d575 1
a575 1
2.19 `omp_get_thread_limit' - Maximum number of threads
d582 1
a582 1
     _Prototype_:  `int omp_get_thread_limit(void);'
d585 1
a585 1
     _Interface_:  `integer function omp_get_thread_limit()'
d591 1
a591 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.14.
d596 1
a596 1
2.20 `omp_get_thread_num' - Current thread ID
d601 4
a604 4
     team.  In a sequential parts of the program, `omp_get_thread_num'
     always returns 0.  In parallel regions the return value varies
     from 0 to `omp_get_num_threads'-1 inclusive.  The return value of
     the master thread of a team is always 0.
d607 1
a607 1
     _Prototype_:  `int omp_get_thread_num(void);'
d610 1
a610 1
     _Interface_:  `integer function omp_get_thread_num()'
d616 1
a616 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.4.
d621 1
a621 1
2.21 `omp_in_parallel' - Whether a parallel region is active
d625 2
a626 2
     This function returns `true' if currently running in parallel,
     `false' otherwise.  Here, `true' and `false' represent their
d630 1
a630 1
     _Prototype_:  `int omp_in_parallel(void);'
d633 1
a633 1
     _Interface_:  `logical function omp_in_parallel()'
d636 1
a636 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.6.
d641 1
a641 1
2.22 `omp_in_final' - Whether in final or included task region
d645 2
a646 2
     This function returns `true' if currently running in a final or
     included task region, `false' otherwise.  Here, `true' and `false'
d650 1
a650 1
     _Prototype_:  `int omp_in_final(void);'
d653 1
a653 1
     _Interface_:  `logical function omp_in_final()'
d656 1
a656 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.21.
d661 1
a661 1
2.23 `omp_is_initial_device' - Whether executing on the host device
d665 2
a666 2
     This function returns `true' if currently running on the host
     device, `false' otherwise.  Here, `true' and `false' represent
d670 1
a670 1
     _Prototype_:  `int omp_is_initial_device(void);'
d673 1
a673 1
     _Interface_:  `logical function omp_is_initial_device()'
d676 1
a676 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.34.
d681 1
a681 1
2.24 `omp_set_default_device' - Set the default device for target regions
d689 1
a689 1
     _Prototype_:  `void omp_set_default_device(int device_num);'
d692 2
a693 2
     _Interface_:  `subroutine omp_set_default_device(device_num)'
                   `integer device_num'
d699 1
a699 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.29.
d704 1
a704 1
2.25 `omp_set_dynamic' - Enable/disable dynamic teams
d710 2
a711 2
     of `true' and `false', where `true' enables dynamic adjustment of
     team sizes and `false' disables it.
d714 1
a714 1
     _Prototype_:  `void omp_set_dynamic(int dynamic_threads);'
d717 2
a718 2
     _Interface_:  `subroutine omp_set_dynamic(dynamic_threads)'
                   `logical, intent(in) :: dynamic_threads'
d724 1
a724 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.7.
d729 1
a729 1
2.26 `omp_set_max_active_levels' - Limits the number of active parallel regions
d737 1
a737 1
     _Prototype_:  `void omp_set_max_active_levels(int max_levels);'
d740 2
a741 2
     _Interface_:  `subroutine omp_set_max_active_levels(max_levels)'
                   `integer max_levels'
d747 1
a747 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.15.
d752 1
a752 1
2.27 `omp_set_nested' - Enable/disable nested parallel regions
d758 2
a759 2
     language-specific equivalent of `true' and `false', where `true'
     enables dynamic adjustment of team sizes and `false' disables it.
d762 1
a762 1
     _Prototype_:  `void omp_set_nested(int nested);'
d765 2
a766 2
     _Interface_:  `subroutine omp_set_nested(nested)'
                   `logical, intent(in) :: nested'
d772 1
a772 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.10.
d777 1
a777 1
2.28 `omp_set_num_threads' - Set upper team size limit
d782 2
a783 2
     parallel sections, if those do not specify a `num_threads' clause.
     The argument of `omp_set_num_threads' shall be a positive integer.
d786 1
a786 1
     _Prototype_:  `void omp_set_num_threads(int num_threads);'
d789 2
a790 2
     _Interface_:  `subroutine omp_set_num_threads(num_threads)'
                   `integer, intent(in) :: num_threads'
d797 1
a797 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.1.
d802 1
a802 1
2.29 `omp_set_schedule' - Set the runtime scheduling method
d807 4
a810 4
     value `omp_sched_static', `omp_sched_dynamic', `omp_sched_guided'
     or `omp_sched_auto'.  Except for `omp_sched_auto', the chunk size
     is set to the value of CHUNK_SIZE if positive, or to the default
     value if zero or negative.  For `omp_sched_auto' the CHUNK_SIZE
d814 1
a814 2
     _Prototype_:  `void omp_set_schedule(omp_sched_t kind, int
                   chunk_size);'
d817 3
a819 3
     _Interface_:  `subroutine omp_set_schedule(kind, chunk_size)'
                   `integer(kind=omp_sched_kind) kind'
                   `integer chunk_size'
d825 1
a825 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.12.
d830 1
a830 1
2.30 `omp_init_lock' - Initialize simple lock
d838 1
a838 1
     _Prototype_:  `void omp_init_lock(omp_lock_t *lock);'
d841 2
a842 2
     _Interface_:  `subroutine omp_init_lock(svar)'
                   `integer(omp_lock_kind), intent(out) :: svar'
d848 1
a848 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.1.
d853 1
a853 1
2.31 `omp_set_lock' - Wait for and set simple lock
d857 4
a860 4
     Before setting a simple lock, the lock variable must be
     initialized by `omp_init_lock'.  The calling thread is blocked
     until the lock is available.  If the lock is already held by the
     current thread, a deadlock occurs.
d863 1
a863 1
     _Prototype_:  `void omp_set_lock(omp_lock_t *lock);'
d866 2
a867 2
     _Interface_:  `subroutine omp_set_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d874 1
a874 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.4.
d879 1
a879 1
2.32 `omp_test_lock' - Test and set simple lock if available
d883 5
a887 5
     Before setting a simple lock, the lock variable must be
     initialized by `omp_init_lock'.  Contrary to `omp_set_lock',
     `omp_test_lock' does not block if the lock is not available.  This
     function returns `true' upon success, `false' otherwise.  Here,
     `true' and `false' represent their language-specific counterparts.
d890 1
a890 1
     _Prototype_:  `int omp_test_lock(omp_lock_t *lock);'
d893 2
a894 2
     _Interface_:  `logical function omp_test_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d900 1
a900 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.6.
d905 1
a905 1
2.33 `omp_unset_lock' - Unset simple lock
d910 4
a913 4
     `omp_set_lock' or `omp_test_lock' before.  In addition, the lock
     must be held by the thread calling `omp_unset_lock'.  Then, the
     lock becomes unlocked.  If one or more threads attempted to set
     the lock before, one of them is chosen to, again, set the lock to
d917 1
a917 1
     _Prototype_:  `void omp_unset_lock(omp_lock_t *lock);'
d920 2
a921 2
     _Interface_:  `subroutine omp_unset_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d927 1
a927 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.5.
d932 1
a932 1
2.34 `omp_destroy_lock' - Destroy simple lock
d940 1
a940 1
     _Prototype_:  `void omp_destroy_lock(omp_lock_t *lock);'
d943 2
a944 2
     _Interface_:  `subroutine omp_destroy_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d950 1
a950 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.3.
d955 1
a955 1
2.35 `omp_init_nest_lock' - Initialize nested lock
d963 1
a963 1
     _Prototype_:  `void omp_init_nest_lock(omp_nest_lock_t *lock);'
d966 2
a967 2
     _Interface_:  `subroutine omp_init_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(out) :: nvar'
d973 1
a973 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.1.
d978 1
a978 1
2.36 `omp_set_nest_lock' - Wait for and set nested lock
d982 4
a985 5
     Before setting a nested lock, the lock variable must be
     initialized by `omp_init_nest_lock'.  The calling thread is
     blocked until the lock is available.  If the lock is already held
     by the current thread, the nesting count for the lock is
     incremented.
d988 1
a988 1
     _Prototype_:  `void omp_set_nest_lock(omp_nest_lock_t *lock);'
d991 2
a992 2
     _Interface_:  `subroutine omp_set_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d998 1
a998 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.4.
d1003 1
a1003 1
2.37 `omp_test_nest_lock' - Test and set nested lock if available
d1007 5
a1011 6
     Before setting a nested lock, the lock variable must be
     initialized by `omp_init_nest_lock'.  Contrary to
     `omp_set_nest_lock', `omp_test_nest_lock' does not block if the
     lock is not available.  If the lock is already held by the current
     thread, the new nesting count is returned.  Otherwise, the return
     value equals zero.
d1014 1
a1014 1
     _Prototype_:  `int omp_test_nest_lock(omp_nest_lock_t *lock);'
d1017 2
a1018 2
     _Interface_:  `logical function omp_test_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1024 1
a1024 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.6.
d1029 1
a1029 1
2.38 `omp_unset_nest_lock' - Unset nested lock
d1034 1
a1034 1
     `omp_set_nested_lock' or `omp_test_nested_lock' before.  In
d1036 1
a1036 1
     `omp_unset_nested_lock'.  If the nesting count drops to zero, the
d1042 1
a1042 1
     _Prototype_:  `void omp_unset_nest_lock(omp_nest_lock_t *lock);'
d1045 2
a1046 2
     _Interface_:  `subroutine omp_unset_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1052 1
a1052 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.5.
d1057 1
a1057 1
2.39 `omp_destroy_nest_lock' - Destroy nested lock
d1066 1
a1066 1
     _Prototype_:  `void omp_destroy_nest_lock(omp_nest_lock_t *);'
d1069 2
a1070 2
     _Interface_:  `subroutine omp_destroy_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1076 1
a1076 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.3.
d1081 1
a1081 1
2.40 `omp_get_wtick' - Get timer precision
d1089 1
a1089 1
     _Prototype_:  `double omp_get_wtick(void);'
d1092 1
a1092 1
     _Interface_:  `double precision function omp_get_wtick()'
d1098 1
a1098 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.4.2.
d1103 1
a1103 1
2.41 `omp_get_wtime' - Elapsed wall clock time
d1114 1
a1114 1
     _Prototype_:  `double omp_get_wtime(void);'
d1117 1
a1117 1
     _Interface_:  `double precision function omp_get_wtime()'
d1123 1
a1123 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 3.4.1.
d1126 1
a1126 1
File: libgomp.info,  Node: Environment Variables,  Next: Enabling OpenACC,  Prev: Runtime Library Routines,  Up: Top
d1131 3
a1133 3
The environment variables which beginning with `OMP_' are defined by
section 4 of the OpenMP specification in version 4.5, while those
beginning with `GOMP_' are GNU extensions.
d1137 17
a1153 19
* OMP_CANCELLATION::        Set whether cancellation is activated
* OMP_DISPLAY_ENV::         Show OpenMP version and environment variables
* OMP_DEFAULT_DEVICE::      Set the device used in target regions
* OMP_DYNAMIC::             Dynamic adjustment of threads
* OMP_MAX_ACTIVE_LEVELS::   Set the maximum number of nested parallel regions
* OMP_MAX_TASK_PRIORITY::   Set the maximum task priority value
* OMP_NESTED::              Nested parallel regions
* OMP_NUM_THREADS::         Specifies the number of threads to use
* OMP_PROC_BIND::           Whether theads may be moved between CPUs
* OMP_PLACES::              Specifies on which CPUs the theads should be placed
* OMP_STACKSIZE::           Set default thread stack size
* OMP_SCHEDULE::            How threads are scheduled
* OMP_THREAD_LIMIT::        Set the maximum number of threads
* OMP_WAIT_POLICY::         How waiting threads are handled
* GOMP_CPU_AFFINITY::       Bind threads to specific CPUs
* GOMP_DEBUG::              Enable debugging output
* GOMP_STACKSIZE::          Set default thread stack size
* GOMP_SPINCOUNT::          Set the busy-wait spin count
* GOMP_RTEMS_THREAD_POOLS:: Set the RTEMS specific thread pools
d1158 1
a1158 1
3.1 `OMP_CANCELLATION' - Set whether cancellation is activated
d1162 3
a1164 3
     If set to `TRUE', the cancellation is activated.  If set to
     `FALSE' or if unset, cancellation is disabled and the `cancel'
     construct is ignored.
d1170 1
a1170 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.11
d1175 1
a1175 1
3.2 `OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
d1179 1
a1179 1
     If set to `TRUE', the OpenMP version number and the values
d1181 1
a1181 1
     `stderr'.  If set to `VERBOSE', it additionally shows the value of
d1183 1
a1183 1
     or set to `FALSE', this information will not be shown.
d1186 1
a1186 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.12
d1191 1
a1191 1
3.3 `OMP_DEFAULT_DEVICE' - Set the device used in target regions
d1195 5
a1199 5
     Set to choose the device which is used in a `target' region,
     unless the value is overridden by `omp_set_default_device' or by a
     `device' clause.  The value shall be the nonnegative device
     number. If no device with the given device number exists, the code
     is executed on the host.  If unset, device number 0 will be used.
d1205 1
a1205 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.13
d1210 1
a1210 1
3.4 `OMP_DYNAMIC' - Dynamic adjustment of threads
d1216 2
a1217 2
     `TRUE' or `FALSE'.  If undefined, dynamic adjustment is disabled
     by default.
d1223 1
a1223 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.3
d1226 1
a1226 1
File: libgomp.info,  Node: OMP_MAX_ACTIVE_LEVELS,  Next: OMP_MAX_TASK_PRIORITY,  Prev: OMP_DYNAMIC,  Up: Environment Variables
d1228 1
a1228 1
3.5 `OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1240 1
a1240 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.9
d1243 1
a1243 14
File: libgomp.info,  Node: OMP_MAX_TASK_PRIORITY,  Next: OMP_NESTED,  Prev: OMP_MAX_ACTIVE_LEVELS,  Up: Environment Variables

3.6 `OMP_MAX_TASK_PRIORITY' - Set the maximum priority
======================================================

number that can be set for a task.  
_Description_:
     Specifies the initial value for the maximum priority value that
     can be set for a task.  The value of this variable shall be a
     non-negative integer, and zero is allowed.  If undefined, the
     default priority is 0.

_See also_:
     *note omp_get_max_task_priority::
d1245 1
a1245 7
_Reference_:
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.14


File: libgomp.info,  Node: OMP_NESTED,  Next: OMP_NUM_THREADS,  Prev: OMP_MAX_TASK_PRIORITY,  Up: Environment Variables

3.7 `OMP_NESTED' - Nested parallel regions
d1251 1
a1251 1
     environment variable shall be `TRUE' or `FALSE'.  If undefined,
d1258 1
a1258 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.6
d1263 1
a1263 1
3.8 `OMP_NUM_THREADS' - Specifies the number of threads to use
d1267 5
a1271 5
     Specifies the default number of threads to use in parallel
     regions.  The value of this variable shall be a comma-separated
     list of positive integers; the value specified the number of
     threads to use for the corresponding nested level.  If undefined
     one thread per CPU is used.
d1277 1
a1277 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.2
d1282 1
a1282 1
3.9 `OMP_PROC_BIND' - Whether theads may be moved between CPUs
d1287 1
a1287 1
     to `TRUE', OpenMP theads should not be moved; if set to `FALSE'
d1289 1
a1289 1
     values `MASTER', `CLOSE' and `SPREAD' can be used to specify the
d1291 3
a1293 3
     `MASTER' the worker threads are in the same place partition as the
     master thread.  With `CLOSE' those are kept close to the master
     thread in contiguous place partitions.  And with `SPREAD' a sparse
d1296 2
a1297 2
     When undefined, `OMP_PROC_BIND' defaults to `TRUE' when
     `OMP_PLACES' or `GOMP_CPU_AFFINITY' is set and `FALSE' otherwise.
d1304 1
a1304 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.4
d1309 2
a1310 2
3.10 `OMP_PLACES' - Specifies on which CPUs the theads should be placed
=======================================================================
d1313 3
a1315 3
     The thread placement can be either specified using an abstract
     name or by an explicit list of the places.  The abstract names
     `threads', `cores' and `sockets' can be optionally followed by a
d1317 3
a1319 3
     shall be created.  With `threads' each place corresponds to a
     single hardware thread; `cores' to a single core with the
     corresponding number of hardware threads; and with `sockets' the
d1321 1
a1321 1
     be shown by setting the `OMP_DISPLAY_ENV' environment variable.
d1334 2
a1335 2
     specifies the same places list: `"{0,1,2}, {3,4,6}, {7,8,9},
     {10,11,12}"'; `"{0:3}, {3:3}, {7:3}, {10:3}"'; and `"{0:2}:4:3"'.
d1337 2
a1338 2
     If `OMP_PLACES' and `GOMP_CPU_AFFINITY' are unset and
     `OMP_PROC_BIND' is either unset or `false', threads may be moved
d1346 1
a1346 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.5
d1351 1
a1351 1
3.11 `OMP_STACKSIZE' - Set default thread stack size
d1356 7
a1362 7
     is suffixed by `B', `K', `M' or `G', in which case the size is,
     respectively, in bytes, kilobytes, megabytes or gigabytes.  This
     is different from `pthread_attr_setstacksize' which gets the
     number of bytes as an argument.  If the stack size cannot be set
     due to system constraints, an error is reported and the initial
     stack size is left unchanged.  If undefined, the stack size is
     system dependent.
d1365 1
a1365 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.7
d1370 1
a1370 1
3.12 `OMP_SCHEDULE' - How threads are scheduled
d1374 5
a1378 5
     Allows to specify `schedule type' and `chunk size'.  The value of
     the variable shall have the form: `type[,chunk]' where `type' is
     one of `static', `dynamic', `guided' or `auto' The optional
     `chunk' size shall be a positive integer.  If undefined, dynamic
     scheduling and a chunk size of 1 is used.
d1384 2
a1385 2
     OpenMP specification v4.5 (http://www.openmp.org/), Sections
     2.7.1.1 and 4.1
d1390 1
a1390 1
3.13 `OMP_THREAD_LIMIT' - Set the maximum number of threads
d1402 1
a1402 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.10
d1407 1
a1407 1
3.14 `OMP_WAIT_POLICY' - How waiting threads are handled
d1412 2
a1413 2
     the value is `PASSIVE', waiting threads should not consume CPU
     power while waiting; while the value is `ACTIVE' specifies that
d1421 1
a1421 1
     OpenMP specification v4.5 (http://www.openmp.org/), Section 4.8
d1426 1
a1426 1
3.15 `GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d1434 2
a1435 2
     (M-N:S).  CPU numbers are zero based.  For example,
     `GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
d1439 1
a1439 1
     beginning of the list.  `GOMP_CPU_AFFINITY=0' binds all threads to
d1444 10
a1453 10
     language-specific library functions, e.g., `getenv' in C or
     `GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
     setting of the `GOMP_CPU_AFFINITY' environment variable.  A
     defined CPU affinity on startup cannot be changed or disabled
     during the runtime of the application.

     If both `GOMP_CPU_AFFINITY' and `OMP_PROC_BIND' are set,
     `OMP_PROC_BIND' has a higher precedence.  If neither has been set
     and `OMP_PROC_BIND' is unset, or when `OMP_PROC_BIND' is set to
     `FALSE', the host system will handle the assignment of threads to
d1462 1
a1462 1
3.16 `GOMP_DEBUG' - Enable debugging output
d1466 2
a1467 2
     Enable debugging output.  The variable should be set to `0'
     (disabled, also the default if not set), or `1' (enabled).
d1476 1
a1476 1
3.17 `GOMP_STACKSIZE' - Set default thread stack size
d1481 1
a1481 1
     from `pthread_attr_setstacksize' which gets the number of bytes as
d1496 1
a1496 1
File: libgomp.info,  Node: GOMP_SPINCOUNT,  Next: GOMP_RTEMS_THREAD_POOLS,  Prev: GOMP_STACKSIZE,  Up: Environment Variables
d1498 1
a1498 1
3.18 `GOMP_SPINCOUNT' - Set the busy-wait spin count
d1504 1
a1504 1
     value may be either `INFINITE', `INFINITY' to always wait actively
d1507 8
a1514 9
     suffixes acting as multiplication factors: `k' (kilo, thousand),
     `M' (mega, million), `G' (giga, billion), or `T' (tera, trillion).
     If undefined, 0 is used when `OMP_WAIT_POLICY' is `PASSIVE',
     300,000 is used when `OMP_WAIT_POLICY' is undefined and 30 billion
     is used when `OMP_WAIT_POLICY' is `ACTIVE'.  If there are more
     OpenMP threads than available CPUs, 1000 and 100 spins are used
     for `OMP_WAIT_POLICY' being `ACTIVE' or undefined, respectively;
     unless the `GOMP_SPINCOUNT' is lower or `OMP_WAIT_POLICY' is
     `PASSIVE'.
d1520 1
a1520 579
File: libgomp.info,  Node: GOMP_RTEMS_THREAD_POOLS,  Prev: GOMP_SPINCOUNT,  Up: Environment Variables

3.19 `GOMP_RTEMS_THREAD_POOLS' - Set the RTEMS specific thread pools
====================================================================

_Description_:
     This environment variable is only used on the RTEMS real-time
     operating system.  It determines the scheduler instance specific
     thread pools.  The format for `GOMP_RTEMS_THREAD_POOLS' is a list
     of optional `<thread-pool-count>[$<priority>]@@<scheduler-name>'
     configurations separated by `:' where:
        * `<thread-pool-count>' is the thread pool count for this
          scheduler instance.

        * `$<priority>' is an optional priority for the worker threads
          of a thread pool according to `pthread_setschedparam'.  In
          case a priority value is omitted, then a worker thread will
          inherit the priority of the OpenMP master thread that created
          it.  The priority of the worker thread is not changed after
          creation, even if a new OpenMP master thread using the worker
          has a different priority.

        * `@@<scheduler-name>' is the scheduler instance name according
          to the RTEMS application configuration.
     In case no thread pool configuration is specified for a scheduler
     instance, then each OpenMP master thread of this scheduler
     instance will use its own dynamically allocated thread pool.  To
     limit the worker thread count of the thread pools, each OpenMP
     master thread must call `omp_set_num_threads'.

_Example_:
     Lets suppose we have three scheduler instances `IO', `WRK0', and
     `WRK1' with `GOMP_RTEMS_THREAD_POOLS' set to `"1@@WRK0:3$4@@WRK1"'.
     Then there are no thread pool restrictions for scheduler instance
     `IO'.  In the scheduler instance `WRK0' there is one thread pool
     available.  Since no priority is specified for this scheduler
     instance, the worker thread inherits the priority of the OpenMP
     master thread that created it.  In the scheduler instance `WRK1'
     there are three thread pools available and their worker threads
     run at priority four.


File: libgomp.info,  Node: Enabling OpenACC,  Next: OpenACC Runtime Library Routines,  Prev: Environment Variables,  Up: Top

4 Enabling OpenACC
******************

To activate the OpenACC extensions for C/C++ and Fortran, the
compile-time flag `-fopenacc' must be specified.  This enables the
OpenACC directive `#pragma acc' in C/C++ and `!$accp' directives in
free form, `c$acc', `*$acc' and `!$acc' directives in fixed form, `!$'
conditional compilation sentinels in free form and `c$', `*$' and `!$'
sentinels in fixed form, for Fortran.  The flag also arranges for
automatic linking of the OpenACC runtime library (*note OpenACC Runtime
Library Routines::).

   A complete description of all OpenACC directives accepted may be
found in the OpenACC (http://www.openacc.org/) Application Programming
Interface manual, version 2.0.

   Note that this is an experimental feature and subject to change in
future versions of GCC.  See `https://gcc.gnu.org/wiki/OpenACC' for
more information.


File: libgomp.info,  Node: OpenACC Runtime Library Routines,  Next: OpenACC Environment Variables,  Prev: Enabling OpenACC,  Up: Top

5 OpenACC Runtime Library Routines
**********************************

The runtime routines described here are defined by section 3 of the
OpenACC specifications in version 2.0.  They have C linkage, and do not
throw exceptions.  Generally, they are available only for the host,
with the exception of `acc_on_device', which is available for both the
host and the acceleration device.

* Menu:

* acc_get_num_devices::         Get number of devices for the given device
                                type.
* acc_set_device_type::         Set type of device accelerator to use.
* acc_get_device_type::         Get type of device accelerator to be used.
* acc_set_device_num::          Set device number to use.
* acc_get_device_num::          Get device number to be used.
* acc_async_test::              Tests for completion of a specific asynchronous
                                operation.
* acc_async_test_all::          Tests for completion of all asychronous
                                operations.
* acc_wait::                    Wait for completion of a specific asynchronous
                                operation.
* acc_wait_all::                Waits for completion of all asyncrhonous
                                operations.
* acc_wait_all_async::          Wait for completion of all asynchronous
                                operations.
* acc_wait_async::              Wait for completion of asynchronous operations.
* acc_init::                    Initialize runtime for a specific device type.
* acc_shutdown::                Shuts down the runtime for a specific device
                                type.
* acc_on_device::               Whether executing on a particular device
* acc_malloc::                  Allocate device memory.
* acc_free::                    Free device memory.
* acc_copyin::                  Allocate device memory and copy host memory to
                                it.
* acc_present_or_copyin::       If the data is not present on the device,
                                allocate device memory and copy from host
                                memory.
* acc_create::                  Allocate device memory and map it to host
                                memory.
* acc_present_or_create::       If the data is not present on the device,
                                allocate device memory and map it to host
                                memory.
* acc_copyout::                 Copy device memory to host memory.
* acc_delete::                  Free device memory.
* acc_update_device::           Update device memory from mapped host memory.
* acc_update_self::             Update host memory from mapped device memory.
* acc_map_data::                Map previously allocated device memory to host
                                memory.
* acc_unmap_data::              Unmap device memory from host memory.
* acc_deviceptr::               Get device pointer associated with specific
                                host address.
* acc_hostptr::                 Get host pointer associated with specific
                                device address.
* acc_is_present::              Indiciate whether host variable / array is
                                present on device.
* acc_memcpy_to_device::        Copy host memory to device memory.
* acc_memcpy_from_device::      Copy device memory to host memory.

API routines for target platforms.

* acc_get_current_cuda_device:: Get CUDA device handle.
* acc_get_current_cuda_context::Get CUDA context handle.
* acc_get_cuda_stream::         Get CUDA stream handle.
* acc_set_cuda_stream::         Set CUDA stream handle.


File: libgomp.info,  Node: acc_get_num_devices,  Next: acc_set_device_type,  Up: OpenACC Runtime Library Routines

5.1 `acc_get_num_devices' - Get number of devices for given device type
=======================================================================

_Description_
     This function returns a value indicating the number of devices
     available for the device type specified in DEVICETYPE.

_C/C++_:
     _Prototype_:  `int acc_get_num_devices(acc_device_t devicetype);'

_Fortran_:
     _Interface_:  `integer function acc_get_num_devices(devicetype)'
                   `integer(kind=acc_device_kind) devicetype'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.1.


File: libgomp.info,  Node: acc_set_device_type,  Next: acc_get_device_type,  Prev: acc_get_num_devices,  Up: OpenACC Runtime Library Routines

5.2 `acc_set_device_type' - Set type of device accelerator to use.
==================================================================

_Description_
     This function indicates to the runtime library which device typr,
     specified in DEVICETYPE, to use when executing a parallel or
     kernels region.

_C/C++_:
     _Prototype_:  `acc_set_device_type(acc_device_t devicetype);'

_Fortran_:
     _Interface_:  `subroutine acc_set_device_type(devicetype)'
                   `integer(kind=acc_device_kind) devicetype'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.2.


File: libgomp.info,  Node: acc_get_device_type,  Next: acc_set_device_num,  Prev: acc_set_device_type,  Up: OpenACC Runtime Library Routines

5.3 `acc_get_device_type' - Get type of device accelerator to be used.
======================================================================

_Description_
     This function returns what device type will be used when executing
     a parallel or kernels region.

_C/C++_:
     _Prototype_:  `acc_device_t acc_get_device_type(void);'

_Fortran_:
     _Interface_:  `function acc_get_device_type(void)'
                   `integer(kind=acc_device_kind) acc_get_device_type'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.3.


File: libgomp.info,  Node: acc_set_device_num,  Next: acc_get_device_num,  Prev: acc_get_device_type,  Up: OpenACC Runtime Library Routines

5.4 `acc_set_device_num' - Set device number to use.
====================================================

_Description_
     This function will indicate to the runtime which device number,
     specified by NUM, associated with the specifed device type
     DEVICETYPE.

_C/C++_:
     _Prototype_:  `acc_set_device_num(int num, acc_device_t
                   devicetype);'

_Fortran_:
     _Interface_:  `subroutine acc_set_device_num(devicenum, devicetype)'
                   `integer devicenum'
                   `integer(kind=acc_device_kind) devicetype'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.4.


File: libgomp.info,  Node: acc_get_device_num,  Next: acc_async_test,  Prev: acc_set_device_num,  Up: OpenACC Runtime Library Routines

5.5 `acc_get_device_num' - Get device number to be used.
========================================================

_Description_
     This function returns which device number associated with the
     specified device type DEVICETYPE, will be used when executing a
     parallel or kernels region.

_C/C++_:
     _Prototype_:  `int acc_get_device_num(acc_device_t devicetype);'

_Fortran_:
     _Interface_:  `function acc_get_device_num(devicetype)'
                   `integer(kind=acc_device_kind) devicetype'
                   `integer acc_get_device_num'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.5.


File: libgomp.info,  Node: acc_async_test,  Next: acc_async_test_all,  Prev: acc_get_device_num,  Up: OpenACC Runtime Library Routines

5.6 `acc_async_test' - Test for completion of a specific asynchronous operation.
================================================================================

_Description_
     This function tests for completion of the asynchrounous operation
     specified in ARG. In C/C++, a non-zero value will be returned to
     indicate the specified asynchronous operation has completed. While
     Fortran will return a `true'. If the asynchrounous operation has
     not completed, C/C++ returns a zero and Fortran returns a `false'.

_C/C++_:
     _Prototype_:  `int acc_async_test(int arg);'

_Fortran_:
     _Interface_:  `function acc_async_test(arg)'
                   `integer(kind=acc_handle_kind) arg'
                   `logical acc_async_test'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.6.


File: libgomp.info,  Node: acc_async_test_all,  Next: acc_wait,  Prev: acc_async_test,  Up: OpenACC Runtime Library Routines

5.7 `acc_async_test_all' - Tests for completion of all asynchronous operations.
===============================================================================

_Description_
     This function tests for completion of all asynchrounous operations.
     In C/C++, a non-zero value will be returned to indicate all
     asynchronous operations have completed. While Fortran will return
     a `true'. If any asynchronous operation has not completed, C/C++
     returns a zero and Fortran returns a `false'.

_C/C++_:
     _Prototype_:  `int acc_async_test_all(void);'

_Fortran_:
     _Interface_:  `function acc_async_test()'
                   `logical acc_get_device_num'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.7.


File: libgomp.info,  Node: acc_wait,  Next: acc_wait_all,  Prev: acc_async_test_all,  Up: OpenACC Runtime Library Routines

5.8 `acc_wait' - Wait for completion of a specific asynchronous operation.
==========================================================================

_Description_
     This function waits for completion of the asynchronous operation
     specified in ARG.

_C/C++_:
     _Prototype_:  `acc_wait(arg);'

_Fortran_:
     _Interface_:  `subroutine acc_wait(arg)'
                   `integer(acc_handle_kind) arg'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.8.


File: libgomp.info,  Node: acc_wait_all,  Next: acc_wait_all_async,  Prev: acc_wait,  Up: OpenACC Runtime Library Routines

5.9 `acc_wait_all' - Waits for completion of all asynchronous operations.
=========================================================================

_Description_
     This function waits for the completion of all asynchronous
     operations.

_C/C++_:
     _Prototype_:  `acc_wait_all(void);'

_Fortran_:
     _Interface_:  `subroutine acc_wait_async()'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.10.


File: libgomp.info,  Node: acc_wait_all_async,  Next: acc_wait_async,  Prev: acc_wait_all,  Up: OpenACC Runtime Library Routines

5.10 `acc_wait_all_async' - Wait for completion of all asynchronous operations.
===============================================================================

_Description_
     This function enqueues a wait operation on the queue ASYNC for any
     and all asynchronous operations that have been previously enqueued
     on any queue.

_C/C++_:
     _Prototype_:  `acc_wait_all_async(int async);'

_Fortran_:
     _Interface_:  `subroutine acc_wait_all_async(async)'
                   `integer(acc_handle_kind) async'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.11.


File: libgomp.info,  Node: acc_wait_async,  Next: acc_init,  Prev: acc_wait_all_async,  Up: OpenACC Runtime Library Routines

5.11 `acc_wait_async' - Wait for completion of asynchronous operations.
=======================================================================

_Description_
     This function enqueues a wait operation on queue ASYNC for any and
     all asynchronous operations enqueued on queue ARG.

_C/C++_:
     _Prototype_:  `acc_wait_async(int arg, int async);'

_Fortran_:
     _Interface_:  `subroutine acc_wait_async(arg, async)'
                   `integer(acc_handle_kind) arg, async'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.9.


File: libgomp.info,  Node: acc_init,  Next: acc_shutdown,  Prev: acc_wait_async,  Up: OpenACC Runtime Library Routines

5.12 `acc_init' - Initialize runtime for a specific device type.
================================================================

_Description_
     This function initializes the runtime for the device type
     specified in DEVICETYPE.

_C/C++_:
     _Prototype_:  `acc_init(acc_device_t devicetype);'

_Fortran_:
     _Interface_:  `subroutine acc_init(devicetype)'
                   `integer(acc_device_kind) devicetype'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.12.


File: libgomp.info,  Node: acc_shutdown,  Next: acc_on_device,  Prev: acc_init,  Up: OpenACC Runtime Library Routines

5.13 `acc_shutdown' - Shuts down the runtime for a specific device type.
========================================================================

_Description_
     This function shuts down the runtime for the device type specified
     in DEVICETYPE.

_C/C++_:
     _Prototype_:  `acc_shutdown(acc_device_t devicetype);'

_Fortran_:
     _Interface_:  `subroutine acc_shutdown(devicetype)'
                   `integer(acc_device_kind) devicetype'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.13.


File: libgomp.info,  Node: acc_on_device,  Next: acc_malloc,  Prev: acc_shutdown,  Up: OpenACC Runtime Library Routines

5.14 `acc_on_device' - Whether executing on a particular device
===============================================================

_Description_:
     This function returns whether the program is executing on a
     particular device specified in DEVICETYPE. In C/C++ a non-zero
     value is returned to indicate the device is execiting on the
     specified device type.  In Fortran, `true' will be returned. If
     the program is not executing on the specified device type C/C++
     will return a zero, while Fortran will return `false'.

_C/C++_:
     _Prototype_:  `acc_on_device(acc_device_t devicetype);'

_Fortran_:
     _Interface_:  `function acc_on_device(devicetype)'
                   `integer(acc_device_kind) devicetype'
                   `logical acc_on_device'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.14.


File: libgomp.info,  Node: acc_malloc,  Next: acc_free,  Prev: acc_on_device,  Up: OpenACC Runtime Library Routines

5.15 `acc_malloc' - Allocate device memory.
===========================================

_Description_
     This function allocates LEN bytes of device memory. It returns the
     device address of the allocated memory.

_C/C++_:
     _Prototype_:  `d_void* acc_malloc(size_t len);'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.15.


File: libgomp.info,  Node: acc_free,  Next: acc_copyin,  Prev: acc_malloc,  Up: OpenACC Runtime Library Routines

5.16 `acc_free' - Free device memory.
=====================================

_Description_
     Free previously allocated device memory at the device address `a'.

_C/C++_:
     _Prototype_:  `acc_free(d_void *a);'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.16.


File: libgomp.info,  Node: acc_copyin,  Next: acc_present_or_copyin,  Prev: acc_free,  Up: OpenACC Runtime Library Routines

5.17 `acc_copyin' - Allocate device memory and copy host memory to it.
======================================================================

_Description_
     In C/C++, this function allocates LEN bytes of device memory and
     maps it to the specified host address in A. The device address of
     the newly allocated device memory is returned.

     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies a
     variable or array element and LEN specifies the length in bytes.

_C/C++_:
     _Prototype_:  `void *acc_copyin(h_void *a, size_t len);'

_Fortran_:
     _Interface_:  `subroutine acc_copyin(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_copyin(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.17.


File: libgomp.info,  Node: acc_present_or_copyin,  Next: acc_create,  Prev: acc_copyin,  Up: OpenACC Runtime Library Routines

5.18 `acc_present_or_copyin' - If the data is not present on the device, allocate device memory and copy from host memory.
==========================================================================================================================

_Description_
     This function tests if the host data specifed by A and of length
     LEN is present or not. If it is not present, then device memory
     will be allocated and the host memory copied. The device address of
     the newly allocated device memory is returned.

     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
     a variable or array element and LEN specifies the length in bytes.

_C/C++_:
     _Prototype_:  `void *acc_present_or_copyin(h_void *a, size_t len);'
     _Prototype_:  `void *acc_pcopyin(h_void *a, size_t len);'

_Fortran_:
     _Interface_:  `subroutine acc_present_or_copyin(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_present_or_copyin(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
     _Interface_:  `subroutine acc_pcopyin(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_pcopyin(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.18.


File: libgomp.info,  Node: acc_create,  Next: acc_present_or_create,  Prev: acc_present_or_copyin,  Up: OpenACC Runtime Library Routines

5.19 `acc_create' - Allocate device memory and map it to host memory.
=====================================================================

_Description_
     This function allocates device memory and maps it to host memory
     specified by the host address A with a length of LEN bytes. In
     C/C++, the function returns the device address of the allocated
     device memory.

     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
     a variable or array element and LEN specifies the length in bytes.

_C/C++_:
     _Prototype_:  `void *acc_create(h_void *a, size_t len);'

_Fortran_:
     _Interface_:  `subroutine acc_create(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_create(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.19.


File: libgomp.info,  Node: acc_present_or_create,  Next: acc_copyout,  Prev: acc_create,  Up: OpenACC Runtime Library Routines

5.20 `acc_present_or_create' - If the data is not present on the device, allocate device memory and map it to host memory.
==========================================================================================================================
d1522 1
a1522 607
_Description_
     This function tests if the host data specifed by A and of length
     LEN is present or not. If it is not present, then device memory
     will be allocated and mapped to host memory. In C/C++, the device
     address of the newly allocated device memory is returned.

     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
     a variable or array element and LEN specifies the length in bytes.

_C/C++_:
     _Prototype_:  `void *acc_present_or_create(h_void *a, size_t len)'
     _Prototype_:  `void *acc_pcreate(h_void *a, size_t len)'

_Fortran_:
     _Interface_:  `subroutine acc_present_or_create(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_present_or_create(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
     _Interface_:  `subroutine acc_pcreate(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_pcreate(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.20.


File: libgomp.info,  Node: acc_copyout,  Next: acc_delete,  Prev: acc_present_or_create,  Up: OpenACC Runtime Library Routines

5.21 `acc_copyout' - Copy device memory to host memory.
=======================================================

_Description_
     This function copies mapped device memory to host memory which is
     specified by host address A for a length LEN bytes in C/C++.

     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
     a variable or array element and LEN specifies the length in bytes.

_C/C++_:
     _Prototype_:  `acc_copyout(h_void *a, size_t len);'

_Fortran_:
     _Interface_:  `subroutine acc_copyout(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_copyout(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.21.


File: libgomp.info,  Node: acc_delete,  Next: acc_update_device,  Prev: acc_copyout,  Up: OpenACC Runtime Library Routines

5.22 `acc_delete' - Free device memory.
=======================================

_Description_
     This function frees previously allocated device memory specified by
     the device address A and the length of LEN bytes.

     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
     a variable or array element and LEN specifies the length in bytes.

_C/C++_:
     _Prototype_:  `acc_delete(h_void *a, size_t len);'

_Fortran_:
     _Interface_:  `subroutine acc_delete(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_delete(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.22.


File: libgomp.info,  Node: acc_update_device,  Next: acc_update_self,  Prev: acc_delete,  Up: OpenACC Runtime Library Routines

5.23 `acc_update_device' - Update device memory from mapped host memory.
========================================================================

_Description_
     This function updates the device copy from the previously mapped
     host memory.  The host memory is specified with the host address A
     and a length of LEN bytes.

     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
     a variable or array element and LEN specifies the length in bytes.

_C/C++_:
     _Prototype_:  `acc_update_device(h_void *a, size_t len);'

_Fortran_:
     _Interface_:  `subroutine acc_update_device(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_update_device(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.23.


File: libgomp.info,  Node: acc_update_self,  Next: acc_map_data,  Prev: acc_update_device,  Up: OpenACC Runtime Library Routines

5.24 `acc_update_self' - Update host memory from mapped device memory.
======================================================================

_Description_
     This function updates the host copy from the previously mapped
     device memory.  The host memory is specified with the host address
     A and a length of LEN bytes.

     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
     a variable or array element and LEN specifies the length in bytes.

_C/C++_:
     _Prototype_:  `acc_update_self(h_void *a, size_t len);'

_Fortran_:
     _Interface_:  `subroutine acc_update_self(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_update_self(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.24.


File: libgomp.info,  Node: acc_map_data,  Next: acc_unmap_data,  Prev: acc_update_self,  Up: OpenACC Runtime Library Routines

5.25 `acc_map_data' - Map previously allocated device memory to host memory.
============================================================================

_Description_
     This function maps previously allocated device and host memory.
     The device memory is specified with the device address D. The host
     memory is specified with the host address H and a length of LEN.

_C/C++_:
     _Prototype_:  `acc_map_data(h_void *h, d_void *d, size_t len);'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.25.


File: libgomp.info,  Node: acc_unmap_data,  Next: acc_deviceptr,  Prev: acc_map_data,  Up: OpenACC Runtime Library Routines

5.26 `acc_unmap_data' - Unmap device memory from host memory.
=============================================================

_Description_
     This function unmaps previously mapped device and host memory. The
     latter specified by H.

_C/C++_:
     _Prototype_:  `acc_unmap_data(h_void *h);'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.26.


File: libgomp.info,  Node: acc_deviceptr,  Next: acc_hostptr,  Prev: acc_unmap_data,  Up: OpenACC Runtime Library Routines

5.27 `acc_deviceptr' - Get device pointer associated with specific host address.
================================================================================

_Description_
     This function returns the device address that has been mapped to
     the host address specified by H.

_C/C++_:
     _Prototype_:  `void *acc_deviceptr(h_void *h);'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.27.


File: libgomp.info,  Node: acc_hostptr,  Next: acc_is_present,  Prev: acc_deviceptr,  Up: OpenACC Runtime Library Routines

5.28 `acc_hostptr' - Get host pointer associated with specific device address.
==============================================================================

_Description_
     This function returns the host address that has been mapped to the
     device address specified by D.

_C/C++_:
     _Prototype_:  `void *acc_hostptr(d_void *d);'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.28.


File: libgomp.info,  Node: acc_is_present,  Next: acc_memcpy_to_device,  Prev: acc_hostptr,  Up: OpenACC Runtime Library Routines

5.29 `acc_is_present' - Indicate whether host variable / array is present on device.
====================================================================================

_Description_
     This function indicates whether the specified host address in A
     and a length of LEN bytes is present on the device. In C/C++, a
     non-zero value is returned to indicate the presence of the mapped
     memory on the device. A zero is returned to indicate the memory is
     not mapped on the device.

     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
     a variable or array element and LEN specifies the length in bytes.
     If the host memory is mapped to device memory, then a `true' is
     returned. Otherwise, a `false' is return to indicate the mapped
     memory is not present.

_C/C++_:
     _Prototype_:  `int acc_is_present(h_void *a, size_t len);'

_Fortran_:
     _Interface_:  `function acc_is_present(a)'
                   `type, dimension(:[,:]...) :: a'
                   `logical acc_is_present'
     _Interface_:  `function acc_is_present(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
                   `logical acc_is_present'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.29.


File: libgomp.info,  Node: acc_memcpy_to_device,  Next: acc_memcpy_from_device,  Prev: acc_is_present,  Up: OpenACC Runtime Library Routines

5.30 `acc_memcpy_to_device' - Copy host memory to device memory.
================================================================

_Description_
     This function copies host memory specified by host address of SRC
     to device memory specified by the device address DEST for a length
     of BYTES bytes.

_C/C++_:
     _Prototype_:  `acc_memcpy_to_device(d_void *dest, h_void *src,
                   size_t bytes);'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.30.


File: libgomp.info,  Node: acc_memcpy_from_device,  Next: acc_get_current_cuda_device,  Prev: acc_memcpy_to_device,  Up: OpenACC Runtime Library Routines

5.31 `acc_memcpy_from_device' - Copy device memory to host memory.
==================================================================

_Description_
     This function copies host memory specified by host address of SRC
     from device memory specified by the device address DEST for a
     length of BYTES bytes.

_C/C++_:
     _Prototype_:  `acc_memcpy_from_device(d_void *dest, h_void *src,
                   size_t bytes);'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     3.2.31.


File: libgomp.info,  Node: acc_get_current_cuda_device,  Next: acc_get_current_cuda_context,  Prev: acc_memcpy_from_device,  Up: OpenACC Runtime Library Routines

5.32 `acc_get_current_cuda_device' - Get CUDA device handle.
============================================================

_Description_
     This function returns the CUDA device handle. This handle is the
     same as used by the CUDA Runtime or Driver API's.

_C/C++_:
     _Prototype_:  `void *acc_get_current_cuda_device(void);'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     A.2.1.1.


File: libgomp.info,  Node: acc_get_current_cuda_context,  Next: acc_get_cuda_stream,  Prev: acc_get_current_cuda_device,  Up: OpenACC Runtime Library Routines

5.33 `acc_get_current_cuda_context' - Get CUDA context handle.
==============================================================

_Description_
     This function returns the CUDA context handle. This handle is the
     same as used by the CUDA Runtime or Driver API's.

_C/C++_:
     _Prototype_:  `acc_get_current_cuda_context(void);'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     A.2.1.2.


File: libgomp.info,  Node: acc_get_cuda_stream,  Next: acc_set_cuda_stream,  Prev: acc_get_current_cuda_context,  Up: OpenACC Runtime Library Routines

5.34 `acc_get_cuda_stream' - Get CUDA stream handle.
====================================================

_Description_
     This function returns the CUDA stream handle. This handle is the
     same as used by the CUDA Runtime or Driver API's.

_C/C++_:
     _Prototype_:  `acc_get_cuda_stream(void);'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     A.2.1.3.


File: libgomp.info,  Node: acc_set_cuda_stream,  Prev: acc_get_cuda_stream,  Up: OpenACC Runtime Library Routines

5.35 `acc_set_cuda_stream' - Set CUDA stream handle.
====================================================

_Description_
     This function associates the stream handle specified by STREAM with
     the asynchronous value specified by ASYNC.

_C/C++_:
     _Prototype_:  `acc_set_cuda_stream(int async void *stream);'

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section
     A.2.1.4.


File: libgomp.info,  Node: OpenACC Environment Variables,  Next: CUDA Streams Usage,  Prev: OpenACC Runtime Library Routines,  Up: Top

6 OpenACC Environment Variables
*******************************

The variables `ACC_DEVICE_TYPE' and `ACC_DEVICE_NUM' are defined by
section 4 of the OpenACC specification in version 2.0.  The variable
`GCC_ACC_NOTIFY' is used for diagnostic purposes.

* Menu:

* ACC_DEVICE_TYPE::
* ACC_DEVICE_NUM::
* GCC_ACC_NOTIFY::


File: libgomp.info,  Node: ACC_DEVICE_TYPE,  Next: ACC_DEVICE_NUM,  Up: OpenACC Environment Variables

6.1 `ACC_DEVICE_TYPE'
=====================

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section 4.1.


File: libgomp.info,  Node: ACC_DEVICE_NUM,  Next: GCC_ACC_NOTIFY,  Prev: ACC_DEVICE_TYPE,  Up: OpenACC Environment Variables

6.2 `ACC_DEVICE_NUM'
====================

_Reference_:
     OpenACC specification v2.0 (http://www.openacc.org/), section 4.2.


File: libgomp.info,  Node: GCC_ACC_NOTIFY,  Prev: ACC_DEVICE_NUM,  Up: OpenACC Environment Variables

6.3 `GCC_ACC_NOTIFY'
====================

_Description_:
     Print debug information pertaining to the accelerator.


File: libgomp.info,  Node: CUDA Streams Usage,  Next: OpenACC Library Interoperability,  Prev: OpenACC Environment Variables,  Up: Top

7 CUDA Streams Usage
********************

This applies to the `nvptx' plugin only.

   The library provides elements that perform asynchronous movement of
data and asynchronous operation of computing constructs.  This
asynchronous functionality is implemented by making use of CUDA
streams(1).

   The primary means by that the asychronous functionality is accessed
is through the use of those OpenACC directives which make use of the
`async' and `wait' clauses.  When the `async' clause is first used with
a directive, it creates a CUDA stream.  If an `async-argument' is used
with the `async' clause, then the stream is associated with the
specified `async-argument'.

   Following the creation of an association between a CUDA stream and
the `async-argument' of an `async' clause, both the `wait' clause and
the `wait' directive can be used.  When either the clause or directive
is used after stream creation, it creates a rendezvous point whereby
execution waits until all operations associated with the
`async-argument', that is, stream, have completed.

   Normally, the management of the streams that are created as a result
of using the `async' clause, is done without any intervention by the
caller.  This implies the association between the `async-argument' and
the CUDA stream will be maintained for the lifetime of the program.
However, this association can be changed through the use of the library
function `acc_set_cuda_stream'.  When the function
`acc_set_cuda_stream' is called, the CUDA stream that was originally
associated with the `async' clause will be destroyed.  Caution should
be taken when changing the association as subsequent references to the
`async-argument' refer to a different CUDA stream.

   ---------- Footnotes ----------

   (1) See "Stream Management" in "CUDA Driver API", TRM-06703-001,
Version 5.5, for additional information


File: libgomp.info,  Node: OpenACC Library Interoperability,  Next: The libgomp ABI,  Prev: CUDA Streams Usage,  Up: Top

8 OpenACC Library Interoperability
**********************************

8.1 Introduction
================

The OpenACC library uses the CUDA Driver API, and may interact with
programs that use the Runtime library directly, or another library
based on the Runtime library, e.g., CUBLAS(1).  This chapter describes
the use cases and what changes are required in order to use both the
OpenACC library and the CUBLAS and Runtime libraries within a program.

8.2 First invocation: NVIDIA CUBLAS library API
===============================================

In this first use case (see below), a function in the CUBLAS library is
called prior to any of the functions in the OpenACC library. More
specifically, the function `cublasCreate()'.

   When invoked, the function initializes the library and allocates the
hardware resources on the host and the device on behalf of the caller.
Once the initialization and allocation has completed, a handle is
returned to the caller. The OpenACC library also requires
initialization and allocation of hardware resources. Since the CUBLAS
library has already allocated the hardware resources for the device,
all that is left to do is to initialize the OpenACC library and acquire
the hardware resources on the host.

   Prior to calling the OpenACC function that initializes the library
and allocate the host hardware resources, you need to acquire the
device number that was allocated during the call to `cublasCreate()'.
The invoking of the runtime library function `cudaGetDevice()'
accomplishes this. Once acquired, the device number is passed along
with the device type as parameters to the OpenACC library function
`acc_set_device_num()'.

   Once the call to `acc_set_device_num()' has completed, the OpenACC
library uses the  context that was created during the call to
`cublasCreate()'. In other words, both libraries will be sharing the
same context.

         /* Create the handle */
         s = cublasCreate(&h);
         if (s != CUBLAS_STATUS_SUCCESS)
         {
             fprintf(stderr, "cublasCreate failed %d\n", s);
             exit(EXIT_FAILURE);
         }

         /* Get the device number */
         e = cudaGetDevice(&dev);
         if (e != cudaSuccess)
         {
             fprintf(stderr, "cudaGetDevice failed %d\n", e);
             exit(EXIT_FAILURE);
         }

         /* Initialize OpenACC library and use device 'dev' */
         acc_set_device_num(dev, acc_device_nvidia);
                                 Use Case 1

8.3 First invocation: OpenACC library API
=========================================

In this second use case (see below), a function in the OpenACC library
is called prior to any of the functions in the CUBLAS library. More
specificially, the function `acc_set_device_num()'.

   In the use case presented here, the function `acc_set_device_num()'
is used to both initialize the OpenACC library and allocate the hardware
resources on the host and the device. In the call to the function, the
call parameters specify which device to use and what device type to
use, i.e., `acc_device_nvidia'. It should be noted that this is but one
method to initialize the OpenACC library and allocate the appropriate
hardware resources. Other methods are available through the use of
environment variables and these will be discussed in the next section.

   Once the call to `acc_set_device_num()' has completed, other OpenACC
functions can be called as seen with multiple calls being made to
`acc_copyin()'. In addition, calls can be made to functions in the
CUBLAS library. In the use case a call to `cublasCreate()' is made
subsequent to the calls to `acc_copyin()'.  As seen in the previous use
case, a call to `cublasCreate()' initializes the CUBLAS library and
allocates the hardware resources on the host and the device.  However,
since the device has already been allocated, `cublasCreate()' will only
initialize the CUBLAS library and allocate the appropriate hardware
resources on the host. The context that was created as part of the
OpenACC initialization is shared with the CUBLAS library, similarly to
the first use case.

         dev = 0;

         acc_set_device_num(dev, acc_device_nvidia);

         /* Copy the first set to the device */
         d_X = acc_copyin(&h_X[0], N * sizeof (float));
         if (d_X == NULL)
         {
             fprintf(stderr, "copyin error h_X\n");
             exit(EXIT_FAILURE);
         }

         /* Copy the second set to the device */
         d_Y = acc_copyin(&h_Y1[0], N * sizeof (float));
         if (d_Y == NULL)
         {
             fprintf(stderr, "copyin error h_Y1\n");
             exit(EXIT_FAILURE);
         }

         /* Create the handle */
         s = cublasCreate(&h);
         if (s != CUBLAS_STATUS_SUCCESS)
         {
             fprintf(stderr, "cublasCreate failed %d\n", s);
             exit(EXIT_FAILURE);
         }

         /* Perform saxpy using CUBLAS library function */
         s = cublasSaxpy(h, N, &alpha, d_X, 1, d_Y, 1);
         if (s != CUBLAS_STATUS_SUCCESS)
         {
             fprintf(stderr, "cublasSaxpy failed %d\n", s);
             exit(EXIT_FAILURE);
         }

         /* Copy the results from the device */
         acc_memcpy_from_device(&h_Y1[0], d_Y, N * sizeof (float));
                                 Use Case 2

8.4 OpenACC library and environment variables
=============================================

There are two environment variables associated with the OpenACC library
that may be used to control the device type and device number:
`ACC_DEVICE_TYPE' and `ACC_DEVICE_NUM', respecively. These two
environement variables can be used as an alternative to calling
`acc_set_device_num()'. As seen in the second use case, the device type
and device number were specified using `acc_set_device_num()'.  If
however, the aforementioned environment variables were set, then the
call to `acc_set_device_num()' would not be required.

   The use of the environment variables is only relevant when an
OpenACC function is called prior to a call to `cudaCreate()'. If
`cudaCreate()' is called prior to a call to an OpenACC function, then
you must call `acc_set_device_num()'(2)

   ---------- Footnotes ----------

   (1) See section 2.26, "Interactions with the CUDA Driver API" in
"CUDA Runtime API", Version 5.5, and section 2.27, "VDPAU
Interoperability", in "CUDA Driver API", TRM-06703-001, Version 5.5,
for additional information on library interoperability.

   (2) More complete information about `ACC_DEVICE_TYPE' and
`ACC_DEVICE_NUM' can be found in sections 4.1 and 4.2 of the OpenACC
(http://www.openacc.org/) Application Programming Interface”, Version
2.0.


File: libgomp.info,  Node: The libgomp ABI,  Next: Reporting Bugs,  Prev: OpenACC Library Interoperability,  Up: Top

9 The libgomp ABI
d1525 2
a1526 2
The following sections present notes on the external ABI as presented
by libgomp.  Only maintainers should need them.
a1543 1
* Implementing OpenACC's PARALLEL construct::
d1548 1
a1548 1
9.1 Implementing MASTER construct
d1561 1
a1561 1
9.2 Implementing CRITICAL construct
d1583 1
a1583 1
9.3 Implementing ATOMIC construct
d1586 1
a1586 1
The target should implement the `__sync' builtins.
d1599 1
a1599 1
9.4 Implementing FLUSH construct
d1602 1
a1602 1
Expands to the `__sync_synchronize' builtin.
d1607 1
a1607 1
9.5 Implementing BARRIER construct
d1615 1
a1615 1
9.6 Implementing THREADPRIVATE construct
d1618 4
a1621 4
In _most_ cases we can map this directly to `__thread'.  Except that
OMP allows constructors for C++ objects.  We can either refuse to
support this (how often is it used?) or we can implement something akin
to .ctors.
d1630 1
a1630 1
9.7 Implementing PRIVATE clause
d1644 1
a1644 1
9.8 Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses
d1653 2
a1654 2
   It is not clear what to do with bare FOR or SECTION blocks.  The
only thing I can figure is that we do something like:
d1672 2
a1673 2
for the two variables, i.e. not something you could write directly in
C.  Presumably this only makes sense if the "outer" x and y are global
d1682 1
a1682 1
9.9 Implementing REDUCTION clause
d1686 4
a1689 4
pointer to an array of the type of the variable, indexed by the
thread's TEAM_ID.  The thread stores its final value into the array,
and after the barrier, the master thread iterates over the array to
collect the values.
d1694 1
a1694 1
9.10 Implementing PARALLEL construct
d1726 3
a1728 3
   The function needs to create the appropriate number of threads
and/or launch them from the dock.  It needs to create the team
structure and assign team ids.
d1733 1
a1733 1
`omp_in_parallel()' state.
d1738 1
a1738 1
9.11 Implementing FOR construct
d1785 2
a1786 2
also pull it into a local variable if we like, but since its supposed
to remain unchanged, we can also not if we like.
d1788 5
a1792 5
   If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be
able to get away with no work-sharing context at all, since we can
simply perform the arithmetic directly in each thread to divide up the
iterations.  Which would mean that we wouldn't need to call any of
these routines.
d1800 1
a1800 1
9.12 Implementing ORDERED construct
d1809 1
a1809 1
9.13 Implementing SECTIONS construct
d1842 1
a1842 1
File: libgomp.info,  Node: Implementing SINGLE construct,  Next: Implementing OpenACC's PARALLEL construct,  Prev: Implementing SECTIONS construct,  Up: The libgomp ABI
d1844 1
a1844 1
9.14 Implementing SINGLE construct
a1878 8
File: libgomp.info,  Node: Implementing OpenACC's PARALLEL construct,  Prev: Implementing SINGLE construct,  Up: The libgomp ABI

9.15 Implementing OpenACC's PARALLEL construct
==============================================

       void GOACC_parallel ()


d1881 2
a1882 2
10 Reporting Bugs
*****************
d1886 2
a1887 2
"openacc", or "openmp", or both to the keywords field in the bug
report, as appropriate.
d1897 1
a1897 1
     Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/'
d1925 3
a1927 3
these rights or asking you to surrender the rights.  Therefore, you
have certain responsibilities if you distribute copies of the software,
or if you modify it: responsibilities to respect the freedom of others.
d1946 9
a1954 10
modified versions of the software inside them, although the
manufacturer can do so.  This is fundamentally incompatible with the
aim of protecting users' freedom to change the software.  The
systematic pattern of such abuse occurs in the area of products for
individuals to use, which is precisely where it is most unacceptable.
Therefore, we have designed this version of the GPL to prohibit the
practice for those products.  If such problems arise substantially in
other domains, we stand ready to extend this provision to those domains
in future versions of the GPL, as needed to protect the freedom of
users.
d1991 2
a1992 2
     infringement under applicable copyright law, except executing it
     on a computer or modifying a private copy.  Propagation includes
d2006 2
a2007 2
     the extent that warranties are provided), that licensees may
     convey the work under this License, and how to view a copy of this
d2015 2
a2016 2
     for making modifications to it.  "Object code" means any
     non-source form of a work.
d2027 4
a2030 4
     Major Component, and (b) serves only to enable use of the work
     with that Major Component, or to implement a Standard Interface
     for which an implementation is available to the public in source
     code form.  A "Major Component", in this context, means a major
d2038 3
a2040 3
     work) run the object code and to modify the work, including
     scripts to control those activities.  However, it does not include
     the work's System Libraries, or general-purpose tools or generally
d2043 4
a2046 4
     Corresponding Source includes interface definition files
     associated with source files for the work, and the source code for
     shared libraries and dynamically linked subprograms that the work
     is specifically designed to require, such as by intimate data
d2063 4
a2066 4
     a covered work is covered by this License only if the output,
     given its content, constitutes a covered work.  This License
     acknowledges your rights of fair use or other equivalent, as
     provided by copyright law.
d2071 8
a2078 8
     sole purpose of having them make modifications exclusively for
     you, or provide you with facilities for running those works,
     provided that you comply with the terms of this License in
     conveying all material for which you do not control copyright.
     Those thus making or running the covered works for you must do so
     exclusively on your behalf, under your direction and control, on
     terms that prohibit them from making any copies of your
     copyrighted material outside their relationship with you.
d2095 2
a2096 2
     with respect to the covered work, and you disclaim any intention
     to limit operation or modification of the work as a means of
d2166 2
a2167 2
          written offer, valid for at least three years and valid for
          as long as you offer spare parts or customer support for that
d2177 2
a2178 2
       c. Convey individual copies of the object code with a copy of
          the written offer to provide the Corresponding Source.  This
d2184 2
a2185 2
          place (gratis or for a charge), and offer equivalent access
          to the Corresponding Source in the same way through the same
d2189 4
a2192 4
          Corresponding Source may be on a different server (operated
          by you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to
          the object code saying where to find the Corresponding Source.
d2194 2
a2195 2
          remain obligated to ensure that it is available for as long
          as needed to satisfy these requirements.
a2201 1

d2209 2
a2210 2
     incorporation into a dwelling.  In determining whether a product
     is a consumer product, doubtful cases shall be resolved in favor of
d2241 5
a2245 5
     warranty, or updates for a work that has been modified or
     installed by the recipient, or for the User Product in which it
     has been modified or installed.  Access to a network may be denied
     when the modification itself materially and adversely affects the
     operation of the network or violates the rules and protocols for
d2275 2
a2276 2
     holders of that material) supplement the terms of this License
     with terms:
d2286 2
a2287 3
          or requiring that modified versions of such material be
          marked in reasonable ways as different from the original
          version; or
d2306 4
a2309 5
     contains a further restriction but permits relicensing or
     conveying under this License, you may add to a covered work
     material governed by the terms of that license document, provided
     that the further restriction does not survive such relicensing or
     conveying.
d2325 2
a2326 2
     under this License (including any patent licenses granted under
     the third paragraph of section 11).
d2330 2
a2331 2
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
d2343 4
a2346 4
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, you do not qualify to receive new
     licenses for the same material under section 10.
d2360 1
a2360 1
 10. Automatic Licensing of Downstream Recipients.
d2374 4
a2377 4
     could give under the previous paragraph, plus a right to
     possession of the Corresponding Source of the work from the
     predecessor in interest, if the predecessor has it or can get it
     with reasonable efforts.
d2381 6
a2386 6
     may not impose a license fee, royalty, or other charge for
     exercise of rights granted under this License, and you may not
     initiate litigation (including a cross-claim or counterclaim in a
     lawsuit) alleging that any patent claim is infringed by making,
     using, selling, offering for sale, or importing the Program or any
     portion of it.
d2388 1
a2388 1
 11. Patents.
d2408 2
a2409 2
     otherwise run, modify and propagate the contents of its
     contributor version.
d2414 3
a2416 3
     patent or covenant not to sue for patent infringement).  To
     "grant" such a patent license to a party means to make such an
     agreement or commitment not to enforce a patent against the party.
d2446 10
a2455 10
     party that is in the business of distributing software, under
     which you make payment to the third party based on the extent of
     your activity of conveying the work, and under which the third
     party grants, to any of the parties who would receive the covered
     work from you, a discriminatory patent license (a) in connection
     with copies of the covered work conveyed by you (or copies made
     from those copies), or (b) primarily for and in connection with
     specific products or compilations that contain the covered work,
     unless you entered into that arrangement, or that patent license
     was granted, prior to 28 March 2007.
d2461 1
a2461 1
 12. No Surrender of Others' Freedom.
d2463 10
a2472 11
     If conditions are imposed on you (whether by court order,
     agreement or otherwise) that contradict the conditions of this
     License, they do not excuse you from the conditions of this
     License.  If you cannot convey a covered work so as to satisfy
     simultaneously your obligations under this License and any other
     pertinent obligations, then as a consequence you may not convey it
     at all.  For example, if you agree to terms that obligate you to
     collect a royalty for further conveying from those to whom you
     convey the Program, the only way you could satisfy both those
     terms and this License would be to refrain entirely from conveying
     the Program.
d2474 1
a2474 1
 13. Use with the GNU Affero General Public License.
d2485 1
a2485 1
 14. Revised Versions of this License.
d2488 3
a2490 4
     versions of the GNU General Public License from time to time.
     Such new versions will be similar in spirit to the present
     version, but may differ in detail to address new problems or
     concerns.
d2496 4
a2499 4
     that numbered version or of any later version published by the
     Free Software Foundation.  If the Program does not specify a
     version number of the GNU General Public License, you may choose
     any version ever published by the Free Software Foundation.
d2511 1
a2511 1
 15. Disclaimer of Warranty.
d2514 1
a2514 1
     APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE
d2518 1
a2518 1
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE
d2523 1
a2523 1
 16. Limitation of Liability.
d2527 2
a2528 2
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
     FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
d2536 1
a2536 1
 17. Interpretation of Sections 15 and 16.
a2544 1

d2575 1
a2575 1
     along with this program.  If not, see `http://www.gnu.org/licenses/'.
d2584 1
a2584 1
     This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
d2586 1
a2586 1
     under certain conditions; type `show c' for details.
d2588 1
a2588 1
   The hypothetical commands `show w' and `show c' should show the
d2596 1
a2596 1
the GNU GPL, see `http://www.gnu.org/licenses/'.
d2603 1
a2603 1
please read `http://www.gnu.org/philosophy/why-not-lgpl.html'.
d2614 1
a2614 1
     `http://fsf.org/'
d2639 2
a2640 2
     of subject matter or whether it is published as a printed book.
     We recommend this License principally for works whose purpose is
d2646 2
a2647 2
     that contains a notice placed by the copyright holder saying it
     can be distributed under the terms of this License.  Such a notice
d2651 3
a2653 3
     of the public is a licensee, and is addressed as "you".  You
     accept the license if you copy, modify or distribute the work in a
     way requiring permission under copyright law.
d2671 6
a2676 6
     titles are designated, as being those of Invariant Sections, in
     the notice that says that the Document is released under this
     License.  If a section does not fit the above definition of
     Secondary then it is not allowed to be designated as Invariant.
     The Document may contain zero Invariant Sections.  If the Document
     does not identify any Invariant Sections then there are none.
d2687 10
a2696 10
     straightforwardly with generic text editors or (for images
     composed of pixels) generic paint programs or (for drawings) some
     widely available drawing editor, and that is suitable for input to
     text formatters or for automatic translation to a variety of
     formats suitable for input to text formatters.  A copy made in an
     otherwise Transparent file format whose markup, or absence of
     markup, has been arranged to thwart or discourage subsequent
     modification by readers is not Transparent.  An image format is
     not Transparent if used for any substantial amount of text.  A
     copy that is not "Transparent" is called "Opaque".
d2700 8
a2707 8
     SGML or XML using a publicly available DTD, and
     standard-conforming simple HTML, PostScript or PDF designed for
     human modification.  Examples of transparent image formats include
     PNG, XCF and JPG.  Opaque formats include proprietary formats that
     can be read and edited only by proprietary word processors, SGML or
     XML for which the DTD and/or processing tools are not generally
     available, and the machine-generated HTML, PostScript or PDF
     produced by some word processors for output purposes only.
d2745 2
a2746 2
     distribute a large enough number of copies you must also follow
     the conditions in section 3.
d2760 5
a2764 6
     front cover must present the full title with all words of the
     title equally prominent and visible.  You may add other material
     on the covers in addition.  Copying with changes limited to the
     covers, as long as they preserve the title of the Document and
     satisfy these conditions, can be treated as verbatim copying in
     other respects.
d2772 11
a2782 12
     numbering more than 100, you must either include a
     machine-readable Transparent copy along with each Opaque copy, or
     state in or with each Opaque copy a computer-network location from
     which the general network-using public has access to download
     using public-standard network protocols a complete Transparent
     copy of the Document, free of added material.  If you use the
     latter option, you must take reasonably prudent steps, when you
     begin distribution of Opaque copies in quantity, to ensure that
     this Transparent copy will remain thus accessible at the stated
     location until at least one year after the last time you
     distribute an Opaque copy (directly or through your agents or
     retailers) of that edition to the public.
d2785 3
a2787 3
     the Document well before redistributing any large number of
     copies, to give them a chance to provide you with an updated
     version of the Document.
d2793 5
a2797 5
     release the Modified Version under precisely this License, with
     the Modified Version filling the role of the Document, thus
     licensing distribution and modification of the Modified Version to
     whoever possesses a copy of it.  In addition, you must do these
     things in the Modified Version:
d2800 5
a2804 5
          distinct from that of the Document, and from those of
          previous versions (which should, if there were any, be listed
          in the History section of the Document).  You may use the
          same title as a previous version if the original publisher of
          that version gives permission.
d2834 6
a2839 6
          authors, and publisher of the Modified Version as given on
          the Title Page.  If there is no section Entitled "History" in
          the Document, create one stating the title, year, authors,
          and publisher of the Document as given on its Title Page,
          then add an item describing the Modified Version as stated in
          the previous sentence.
d2844 5
a2848 5
          previous versions it was based on.  These may be placed in
          the "History" section.  You may omit a network location for a
          work that was published at least four years before the
          Document itself, or if the original publisher of the version
          it refers to gives permission.
d2851 2
a2852 2
          Preserve the Title of the section, and preserve in the
          section all the substance and tone of each of the contributor
d2855 3
a2857 4
       L. Preserve all the Invariant Sections of the Document,
          unaltered in their text and in their titles.  Section numbers
          or the equivalent are not considered part of the section
          titles.
d2870 5
a2874 5
     material copied from the Document, you may at your option
     designate some or all of these sections as invariant.  To do this,
     add their titles to the list of Invariant Sections in the Modified
     Version's license notice.  These titles must be distinct from any
     other section titles.
d2883 9
a2891 9
     and a passage of up to 25 words as a Back-Cover Text, to the end
     of the list of Cover Texts in the Modified Version.  Only one
     passage of Front-Cover Text and one of Back-Cover Text may be
     added by (or through arrangements made by) any one entity.  If the
     Document already includes a cover text for the same cover,
     previously added by you or by arrangement made by the same entity
     you are acting on behalf of, you may not add another; but you may
     replace the old one, on explicit permission from the previous
     publisher that added the old one.
d2901 2
a2902 2
     modified versions, provided that you include in the combination
     all of the Invariant Sections of all of the original documents,
d2929 2
a2930 2
     rules of this License for verbatim copying of each of the
     documents in all other respects.
d2934 3
a2936 3
     a copy of this License into the extracted document, and follow
     this License in all other respects regarding verbatim copying of
     that document.
d2941 2
a2942 2
     separate and independent documents or works, in or on a volume of
     a storage or distribution medium, is called an "aggregate" if the
d2987 2
a2988 2
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
d3000 4
a3003 4
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, receipt of a copy of some or all of
     the same material does not give you any rights to use it.
d3005 1
a3005 1
 10. FUTURE REVISIONS OF THIS LICENSE
d3011 1
a3011 1
     `http://www.gnu.org/copyleft/'.
d3018 5
a3022 5
     published (not as a draft) by the Free Software Foundation.  If
     the Document does not specify a version number of this License,
     you may choose any version ever published (not as a draft) by the
     Free Software Foundation.  If the Document specifies that a proxy
     can decide which future versions of this License can be used, that
d3026 1
a3026 1
 11. RELICENSING
a3055 1

d3072 1
a3072 1
Texts, replace the "with...Texts." line with this:
d3083 3
a3085 3
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License, to
permit their use in free software.
d3115 2
a3116 2
can greatly alter what fraction of the sales price counts as profit.
If the price you pay is $50, ten percent of the profit is probably less
d3126 2
a3127 2
ports such as adding a new CPU to the GNU Compiler Collection
contribute more; major new features or packages contribute the most.
d3146 9
a3154 9
* Environment Variable <1>:              GOMP_RTEMS_THREAD_POOLS.
                                                                (line 6)
* Environment Variable <2>:              GOMP_SPINCOUNT.        (line 6)
* Environment Variable <3>:              GOMP_STACKSIZE.        (line 6)
* Environment Variable <4>:              GOMP_DEBUG.            (line 6)
* Environment Variable <5>:              GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <6>:              OMP_WAIT_POLICY.       (line 6)
* Environment Variable <7>:              OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <8>:              OMP_SCHEDULE.          (line 6)
d3156 7
a3162 10
* Environment Variable <10>:             OMP_PLACES.            (line 6)
* Environment Variable <11>:             OMP_PROC_BIND.         (line 6)
* Environment Variable <12>:             OMP_NUM_THREADS.       (line 6)
* Environment Variable <13>:             OMP_NESTED.            (line 6)
* Environment Variable <14>:             OMP_MAX_TASK_PRIORITY. (line 6)
* Environment Variable <15>:             OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable <16>:             OMP_DYNAMIC.           (line 6)
* Environment Variable <17>:             OMP_DEFAULT_DEVICE.    (line 6)
* Environment Variable <18>:             OMP_DISPLAY_ENV.       (line 6)
* Environment Variable:                  OMP_CANCELLATION.      (line 6)
d3165 3
a3167 3
* Implementation specific setting <1>:   GOMP_RTEMS_THREAD_POOLS.
                                                                (line 6)
* Implementation specific setting <2>:   GOMP_SPINCOUNT.        (line 6)
d3169 1
a3169 3
* Implementation specific setting <4>:   OMP_SCHEDULE.          (line 6)
* Implementation specific setting <5>:   OMP_NUM_THREADS.       (line 6)
* Implementation specific setting:       OMP_NESTED.            (line 6)
d3175 81
a3255 131
Node: Top2130
Node: Enabling OpenMP4536
Node: Runtime Library Routines5323
Node: omp_get_active_level8386
Node: omp_get_ancestor_thread_num9084
Node: omp_get_cancellation10011
Node: omp_get_default_device10823
Node: omp_get_dynamic11497
Node: omp_get_level12370
Node: omp_get_max_active_levels12988
Node: omp_get_max_task_priority13691
Node: omp_get_max_threads14309
Node: omp_get_nested15064
Node: omp_get_num_devices15976
Node: omp_get_num_procs16495
Node: omp_get_num_teams17032
Node: omp_get_num_threads17546
Node: omp_get_proc_bind18633
Node: omp_get_schedule19551
Node: omp_get_team_num20500
Node: omp_get_team_size20997
Node: omp_get_thread_limit21954
Node: omp_get_thread_num22571
Node: omp_in_parallel23440
Node: omp_in_final24087
Node: omp_is_initial_device24759
Node: omp_set_default_device25450
Node: omp_set_dynamic26238
Node: omp_set_max_active_levels27121
Node: omp_set_nested27895
Node: omp_set_num_threads28784
Node: omp_set_schedule29649
Node: omp_init_lock30725
Node: omp_set_lock31375
Node: omp_test_lock32227
Node: omp_unset_lock33200
Node: omp_destroy_lock34128
Node: omp_init_nest_lock34802
Node: omp_set_nest_lock35534
Node: omp_test_nest_lock36451
Node: omp_unset_nest_lock37481
Node: omp_destroy_nest_lock38493
Node: omp_get_wtick39241
Node: omp_get_wtime39831
Node: Environment Variables40605
Node: OMP_CANCELLATION42160
Node: OMP_DISPLAY_ENV42693
Node: OMP_DEFAULT_DEVICE43396
Node: OMP_DYNAMIC44176
Node: OMP_MAX_ACTIVE_LEVELS44772
Node: OMP_MAX_TASK_PRIORITY45422
Node: OMP_NESTED46082
Node: OMP_NUM_THREADS46687
Node: OMP_PROC_BIND47376
Node: OMP_PLACES48568
Node: OMP_STACKSIZE50745
Node: OMP_SCHEDULE51569
Node: OMP_THREAD_LIMIT52267
Node: OMP_WAIT_POLICY52867
Node: GOMP_CPU_AFFINITY53559
Node: GOMP_DEBUG55290
Node: GOMP_STACKSIZE55797
Node: GOMP_SPINCOUNT56626
Node: GOMP_RTEMS_THREAD_POOLS57835
Node: Enabling OpenACC60016
Node: OpenACC Runtime Library Routines61010
Node: acc_get_num_devices64804
Node: acc_set_device_type65527
Node: acc_get_device_type66288
Node: acc_set_device_num67000
Node: acc_get_device_num67799
Node: acc_async_test68592
Node: acc_async_test_all69577
Node: acc_wait70472
Node: acc_wait_all71104
Node: acc_wait_all_async71681
Node: acc_wait_async72430
Node: acc_init73134
Node: acc_shutdown73777
Node: acc_on_device74442
Node: acc_malloc75440
Node: acc_free75937
Node: acc_copyin76363
Node: acc_present_or_copyin77464
Node: acc_create79074
Node: acc_present_or_create80220
Node: acc_copyout81838
Node: acc_delete82853
Node: acc_update_device83820
Node: acc_update_self84924
Node: acc_map_data86020
Node: acc_unmap_data86703
Node: acc_deviceptr87222
Node: acc_hostptr87791
Node: acc_is_present88354
Node: acc_memcpy_to_device89868
Node: acc_memcpy_from_device90529
Node: acc_get_current_cuda_device91211
Node: acc_get_current_cuda_context91806
Node: acc_get_cuda_stream92398
Node: acc_set_cuda_stream92952
Node: OpenACC Environment Variables93483
Node: ACC_DEVICE_TYPE93942
Node: ACC_DEVICE_NUM94178
Node: GCC_ACC_NOTIFY94435
Node: CUDA Streams Usage94658
Ref: CUDA Streams Usage-Footnote-196558
Node: OpenACC Library Interoperability96667
Ref: OpenACC Library Interoperability-Footnote-1103013
Ref: OpenACC Library Interoperability-Footnote-2103265
Node: The libgomp ABI103473
Node: Implementing MASTER construct104329
Node: Implementing CRITICAL construct104743
Node: Implementing ATOMIC construct105482
Node: Implementing FLUSH construct105963
Node: Implementing BARRIER construct106234
Node: Implementing THREADPRIVATE construct106503
Node: Implementing PRIVATE clause107155
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses107736
Node: Implementing REDUCTION clause109060
Node: Implementing PARALLEL construct109617
Node: Implementing FOR construct110874
Node: Implementing ORDERED construct112872
Node: Implementing SECTIONS construct113178
Node: Implementing SINGLE construct113944
Node: Implementing OpenACC's PARALLEL construct114656
Node: Reporting Bugs114914
Node: Copying115276
Node: GNU Free Documentation License152841
Node: Funding177983
Node: Library Index180508
@


1.1.1.10
log
@import GCC 6.5.0.  this is largely a maint release with no
particularly features listed here:

   http://gcc.gnu.org/gcc-6/changes.html

this fixes over 250 PRs in the GCC bugzilla:

   https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=6.5
@
text
@d1 2
a2 2
This is libgomp.info, produced by makeinfo version 6.4 from
libgomp.texi.
d21 3
a23 2
software.  Copies published by the Free Software Foundation raise funds
for GNU development.
d54 2
a55 2
software.  Copies published by the Free Software Foundation raise funds
for GNU development.
d63 5
a67 5
This manual documents the usage of libgomp, the GNU Offloading and Multi
Processing Runtime Library.  This includes the GNU implementation of the
OpenMP (http://www.openmp.org) Application Programming Interface (API)
for multi-platform shared-memory parallel programming in C/C++ and
Fortran, and the GNU implementation of the OpenACC
d111 11
a121 10
compile-time flag '-fopenmp' must be specified.  This enables the OpenMP
directive '#pragma omp' in C/C++ and '!$omp' directives in free form,
'c$omp', '*$omp' and '!$omp' directives in fixed form, '!$' conditional
compilation sentinels in free form and 'c$', '*$' and '!$' sentinels in
fixed form, for Fortran.  The flag also arranges for automatic linking
of the OpenMP runtime library (*note Runtime Library Routines::).

   A complete description of all OpenMP directives accepted may be found
in the OpenMP Application Program Interface (http://www.openmp.org)
manual, version 4.5.
d189 1
a189 1
2.1 'omp_get_active_level' - Number of parallel regions
d197 1
a197 1
     _Prototype_:   'int omp_get_active_level(void);'
d200 1
a200 1
     _Interface_:   'integer function omp_get_active_level()'
d212 1
a212 1
2.2 'omp_get_ancestor_thread_num' - Ancestor thread ID
d218 2
a219 2
     outside zero to 'omp_get_level' -1 is returned; if LEVEL is
     'omp_get_level' the result is identical to 'omp_get_thread_num'.
d222 1
a222 1
     _Prototype_:   'int omp_get_ancestor_thread_num(int level);'
d225 2
a226 2
     _Interface_:   'integer function omp_get_ancestor_thread_num(level)'
                    'integer level'
d238 1
a238 1
2.3 'omp_get_cancellation' - Whether cancellation support is enabled
d242 3
a244 3
     This function returns 'true' if cancellation is activated, 'false'
     otherwise.  Here, 'true' and 'false' represent their
     language-specific counterparts.  Unless 'OMP_CANCELLATION' is set
d248 1
a248 1
     _Prototype_:   'int omp_get_cancellation(void);'
d251 1
a251 1
     _Interface_:   'logical function omp_get_cancellation()'
d262 1
a262 1
2.4 'omp_get_default_device' - Get the default device for target regions
d269 1
a269 1
     _Prototype_:   'int omp_get_default_device(void);'
d272 1
a272 1
     _Interface_:   'integer function omp_get_default_device()'
d283 1
a283 1
2.5 'omp_get_dynamic' - Dynamic teams setting
d287 2
a288 2
     This function returns 'true' if enabled, 'false' otherwise.  Here,
     'true' and 'false' represent their language-specific counterparts.
d291 3
a293 3
     'OMP_DYNAMIC' environment variable or at runtime using
     'omp_set_dynamic'.  If undefined, dynamic adjustment is disabled by
     default.
d296 1
a296 1
     _Prototype_:   'int omp_get_dynamic(void);'
d299 1
a299 1
     _Interface_:   'logical function omp_get_dynamic()'
d310 1
a310 1
2.6 'omp_get_level' - Obtain the current nesting level
d318 1
a318 1
     _Prototype_:   'int omp_get_level(void);'
d321 1
a321 1
     _Interface_:   'integer function omp_level()'
d332 1
a332 1
2.7 'omp_get_max_active_levels' - Maximum number of active regions
d340 1
a340 1
     _Prototype_:   'int omp_get_max_active_levels(void);'
d343 1
a343 1
     _Interface_:   'integer function omp_get_max_active_levels()'
d354 1
a354 1
2.8 'omp_get_max_task_priority' - Maximum priority value
d363 1
a363 1
     _Prototype_:   'int omp_get_max_task_priority(void);'
d366 1
a366 1
     _Interface_:   'integer function omp_get_max_task_priority()'
d374 1
a374 1
2.9 'omp_get_max_threads' - Maximum number of threads of parallel region
d379 1
a379 1
     region that does not use the clause 'num_threads'.
d382 1
a382 1
     _Prototype_:   'int omp_get_max_threads(void);'
d385 1
a385 1
     _Interface_:   'integer function omp_get_max_threads()'
d397 1
a397 1
2.10 'omp_get_nested' - Nested parallel regions
d401 2
a402 2
     This function returns 'true' if nested parallel regions are
     enabled, 'false' otherwise.  Here, 'true' and 'false' represent
d406 2
a407 2
     'OMP_NESTED' environment variable or at runtime using
     'omp_set_nested'.  If undefined, nested parallel regions are
d411 1
a411 1
     _Prototype_:   'int omp_get_nested(void);'
d414 1
a414 1
     _Interface_:   'logical function omp_get_nested()'
d425 1
a425 1
2.11 'omp_get_num_devices' - Number of target devices
d432 1
a432 1
     _Prototype_:   'int omp_get_num_devices(void);'
d435 1
a435 1
     _Interface_:   'integer function omp_get_num_devices()'
d443 1
a443 1
2.12 'omp_get_num_procs' - Number of processors online
d450 1
a450 1
     _Prototype_:   'int omp_get_num_procs(void);'
d453 1
a453 1
     _Interface_:   'integer function omp_get_num_procs()'
d461 1
a461 1
2.13 'omp_get_num_teams' - Number of teams
d468 1
a468 1
     _Prototype_:   'int omp_get_num_teams(void);'
d471 1
a471 1
     _Interface_:   'integer function omp_get_num_teams()'
d479 1
a479 1
2.14 'omp_get_num_threads' - Size of the active team
d483 2
a484 2
     Returns the number of threads in the current team.  In a sequential
     section of the program 'omp_get_num_threads' returns 1.
d487 5
a491 5
     'OMP_NUM_THREADS' environment variable.  At runtime, the size of
     the current team may be set either by the 'NUM_THREADS' clause or
     by 'omp_set_num_threads'.  If none of the above were used to define
     a specific value and 'OMP_DYNAMIC' is disabled, one thread per CPU
     online is used.
d494 1
a494 1
     _Prototype_:   'int omp_get_num_threads(void);'
d497 1
a497 1
     _Interface_:   'integer function omp_get_num_threads()'
d509 1
a509 1
2.15 'omp_get_proc_bind' - Whether theads may be moved between CPUs
d513 5
a517 5
     This functions returns the currently active thread affinity policy,
     which is set via 'OMP_PROC_BIND'.  Possible values are
     'omp_proc_bind_false', 'omp_proc_bind_true',
     'omp_proc_bind_master', 'omp_proc_bind_close' and
     'omp_proc_bind_spread'.
d520 1
a520 1
     _Prototype_:   'omp_proc_bind_t omp_get_proc_bind(void);'
d523 2
a524 2
     _Interface_:   'integer(kind=omp_proc_bind_kind) function
                    omp_get_proc_bind()'
d536 1
a536 1
2.16 'omp_get_schedule' - Obtain the runtime scheduling method
d541 2
a542 2
     set to the value 'omp_sched_static', 'omp_sched_dynamic',
     'omp_sched_guided' or 'omp_sched_auto'.  The second argument,
d546 2
a547 2
     _Prototype_:   'void omp_get_schedule(omp_sched_t *kind, int
                    *chunk_size);'
d550 3
a552 3
     _Interface_:   'subroutine omp_get_schedule(kind, chunk_size)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer chunk_size'
d563 1
a563 1
2.17 'omp_get_team_num' - Get team number
d570 1
a570 1
     _Prototype_:   'int omp_get_team_num(void);'
d573 1
a573 1
     _Interface_:   'integer function omp_get_team_num()'
d581 1
a581 1
2.18 'omp_get_team_size' - Number of threads in a team
d587 3
a589 3
     values of LEVEL outside zero to 'omp_get_level', -1 is returned; if
     LEVEL is zero, 1 is returned, and for 'omp_get_level', the result
     is identical to 'omp_get_num_threads'.
d592 1
a592 1
     _Prototype_:   'int omp_get_team_size(int level);'
d595 2
a596 2
     _Interface_:   'integer function omp_get_team_size(level)'
                    'integer level'
d608 1
a608 1
2.19 'omp_get_thread_limit' - Maximum number of threads
d615 1
a615 1
     _Prototype_:   'int omp_get_thread_limit(void);'
d618 1
a618 1
     _Interface_:   'integer function omp_get_thread_limit()'
d629 1
a629 1
2.20 'omp_get_thread_num' - Current thread ID
d634 4
a637 4
     team.  In a sequential parts of the program, 'omp_get_thread_num'
     always returns 0.  In parallel regions the return value varies from
     0 to 'omp_get_num_threads'-1 inclusive.  The return value of the
     master thread of a team is always 0.
d640 1
a640 1
     _Prototype_:   'int omp_get_thread_num(void);'
d643 1
a643 1
     _Interface_:   'integer function omp_get_thread_num()'
d654 1
a654 1
2.21 'omp_in_parallel' - Whether a parallel region is active
d658 2
a659 2
     This function returns 'true' if currently running in parallel,
     'false' otherwise.  Here, 'true' and 'false' represent their
d663 1
a663 1
     _Prototype_:   'int omp_in_parallel(void);'
d666 1
a666 1
     _Interface_:   'logical function omp_in_parallel()'
d674 1
a674 1
2.22 'omp_in_final' - Whether in final or included task region
d678 2
a679 2
     This function returns 'true' if currently running in a final or
     included task region, 'false' otherwise.  Here, 'true' and 'false'
d683 1
a683 1
     _Prototype_:   'int omp_in_final(void);'
d686 1
a686 1
     _Interface_:   'logical function omp_in_final()'
d694 1
a694 1
2.23 'omp_is_initial_device' - Whether executing on the host device
d698 2
a699 2
     This function returns 'true' if currently running on the host
     device, 'false' otherwise.  Here, 'true' and 'false' represent
d703 1
a703 1
     _Prototype_:   'int omp_is_initial_device(void);'
d706 1
a706 1
     _Interface_:   'logical function omp_is_initial_device()'
d714 1
a714 1
2.24 'omp_set_default_device' - Set the default device for target regions
d722 1
a722 1
     _Prototype_:   'void omp_set_default_device(int device_num);'
d725 2
a726 2
     _Interface_:   'subroutine omp_set_default_device(device_num)'
                    'integer device_num'
d737 1
a737 1
2.25 'omp_set_dynamic' - Enable/disable dynamic teams
d743 2
a744 2
     of 'true' and 'false', where 'true' enables dynamic adjustment of
     team sizes and 'false' disables it.
d747 1
a747 1
     _Prototype_:   'void omp_set_dynamic(int dynamic_threads);'
d750 2
a751 2
     _Interface_:   'subroutine omp_set_dynamic(dynamic_threads)'
                    'logical, intent(in) :: dynamic_threads'
d762 1
a762 1
2.26 'omp_set_max_active_levels' - Limits the number of active parallel regions
d770 1
a770 1
     _Prototype_:   'void omp_set_max_active_levels(int max_levels);'
d773 2
a774 2
     _Interface_:   'subroutine omp_set_max_active_levels(max_levels)'
                    'integer max_levels'
d785 1
a785 1
2.27 'omp_set_nested' - Enable/disable nested parallel regions
d791 2
a792 2
     language-specific equivalent of 'true' and 'false', where 'true'
     enables dynamic adjustment of team sizes and 'false' disables it.
d795 1
a795 1
     _Prototype_:   'void omp_set_nested(int nested);'
d798 2
a799 2
     _Interface_:   'subroutine omp_set_nested(nested)'
                    'logical, intent(in) :: nested'
d810 1
a810 1
2.28 'omp_set_num_threads' - Set upper team size limit
d815 2
a816 2
     parallel sections, if those do not specify a 'num_threads' clause.
     The argument of 'omp_set_num_threads' shall be a positive integer.
d819 1
a819 1
     _Prototype_:   'void omp_set_num_threads(int num_threads);'
d822 2
a823 2
     _Interface_:   'subroutine omp_set_num_threads(num_threads)'
                    'integer, intent(in) :: num_threads'
d835 1
a835 1
2.29 'omp_set_schedule' - Set the runtime scheduling method
d840 2
a841 2
     value 'omp_sched_static', 'omp_sched_dynamic', 'omp_sched_guided'
     or 'omp_sched_auto'.  Except for 'omp_sched_auto', the chunk size
d843 1
a843 1
     value if zero or negative.  For 'omp_sched_auto' the CHUNK_SIZE
d847 2
a848 2
     _Prototype_:   'void omp_set_schedule(omp_sched_t kind, int
                    chunk_size);'
d851 3
a853 3
     _Interface_:   'subroutine omp_set_schedule(kind, chunk_size)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer chunk_size'
d864 1
a864 1
2.30 'omp_init_lock' - Initialize simple lock
d872 1
a872 1
     _Prototype_:   'void omp_init_lock(omp_lock_t *lock);'
d875 2
a876 2
     _Interface_:   'subroutine omp_init_lock(svar)'
                    'integer(omp_lock_kind), intent(out) :: svar'
d887 1
a887 1
2.31 'omp_set_lock' - Wait for and set simple lock
d891 4
a894 4
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  The calling thread is blocked until the lock
     is available.  If the lock is already held by the current thread, a
     deadlock occurs.
d897 1
a897 1
     _Prototype_:   'void omp_set_lock(omp_lock_t *lock);'
d900 2
a901 2
     _Interface_:   'subroutine omp_set_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d913 1
a913 1
2.32 'omp_test_lock' - Test and set simple lock if available
d917 5
a921 5
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  Contrary to 'omp_set_lock', 'omp_test_lock'
     does not block if the lock is not available.  This function returns
     'true' upon success, 'false' otherwise.  Here, 'true' and 'false'
     represent their language-specific counterparts.
d924 1
a924 1
     _Prototype_:   'int omp_test_lock(omp_lock_t *lock);'
d927 2
a928 2
     _Interface_:   'logical function omp_test_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d939 1
a939 1
2.33 'omp_unset_lock' - Unset simple lock
d944 4
a947 4
     'omp_set_lock' or 'omp_test_lock' before.  In addition, the lock
     must be held by the thread calling 'omp_unset_lock'.  Then, the
     lock becomes unlocked.  If one or more threads attempted to set the
     lock before, one of them is chosen to, again, set the lock to
d951 1
a951 1
     _Prototype_:   'void omp_unset_lock(omp_lock_t *lock);'
d954 2
a955 2
     _Interface_:   'subroutine omp_unset_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d966 1
a966 1
2.34 'omp_destroy_lock' - Destroy simple lock
d974 1
a974 1
     _Prototype_:   'void omp_destroy_lock(omp_lock_t *lock);'
d977 2
a978 2
     _Interface_:   'subroutine omp_destroy_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d989 1
a989 1
2.35 'omp_init_nest_lock' - Initialize nested lock
d997 1
a997 1
     _Prototype_:   'void omp_init_nest_lock(omp_nest_lock_t *lock);'
d1000 2
a1001 2
     _Interface_:   'subroutine omp_init_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(out) :: nvar'
d1012 1
a1012 1
2.36 'omp_set_nest_lock' - Wait for and set nested lock
d1016 5
a1020 4
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  The calling thread is blocked until the
     lock is available.  If the lock is already held by the current
     thread, the nesting count for the lock is incremented.
d1023 1
a1023 1
     _Prototype_:   'void omp_set_nest_lock(omp_nest_lock_t *lock);'
d1026 2
a1027 2
     _Interface_:   'subroutine omp_set_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1038 1
a1038 1
2.37 'omp_test_nest_lock' - Test and set nested lock if available
d1042 6
a1047 5
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  Contrary to 'omp_set_nest_lock',
     'omp_test_nest_lock' does not block if the lock is not available.
     If the lock is already held by the current thread, the new nesting
     count is returned.  Otherwise, the return value equals zero.
d1050 1
a1050 1
     _Prototype_:   'int omp_test_nest_lock(omp_nest_lock_t *lock);'
d1053 2
a1054 2
     _Interface_:   'logical function omp_test_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1065 1
a1065 1
2.38 'omp_unset_nest_lock' - Unset nested lock
d1070 1
a1070 1
     'omp_set_nested_lock' or 'omp_test_nested_lock' before.  In
d1072 1
a1072 1
     'omp_unset_nested_lock'.  If the nesting count drops to zero, the
d1078 1
a1078 1
     _Prototype_:   'void omp_unset_nest_lock(omp_nest_lock_t *lock);'
d1081 2
a1082 2
     _Interface_:   'subroutine omp_unset_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1093 1
a1093 1
2.39 'omp_destroy_nest_lock' - Destroy nested lock
d1102 1
a1102 1
     _Prototype_:   'void omp_destroy_nest_lock(omp_nest_lock_t *);'
d1105 2
a1106 2
     _Interface_:   'subroutine omp_destroy_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1117 1
a1117 1
2.40 'omp_get_wtick' - Get timer precision
d1125 1
a1125 1
     _Prototype_:   'double omp_get_wtick(void);'
d1128 1
a1128 1
     _Interface_:   'double precision function omp_get_wtick()'
d1139 1
a1139 1
2.41 'omp_get_wtime' - Elapsed wall clock time
d1150 1
a1150 1
     _Prototype_:   'double omp_get_wtime(void);'
d1153 1
a1153 1
     _Interface_:   'double precision function omp_get_wtime()'
d1167 1
a1167 1
The environment variables which beginning with 'OMP_' are defined by
d1169 1
a1169 1
beginning with 'GOMP_' are GNU extensions.
d1196 1
a1196 1
3.1 'OMP_CANCELLATION' - Set whether cancellation is activated
d1200 3
a1202 3
     If set to 'TRUE', the cancellation is activated.  If set to 'FALSE'
     or if unset, cancellation is disabled and the 'cancel' construct is
     ignored.
d1213 1
a1213 1
3.2 'OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
d1217 1
a1217 1
     If set to 'TRUE', the OpenMP version number and the values
d1219 1
a1219 1
     'stderr'.  If set to 'VERBOSE', it additionally shows the value of
d1221 1
a1221 1
     or set to 'FALSE', this information will not be shown.
d1229 1
a1229 1
3.3 'OMP_DEFAULT_DEVICE' - Set the device used in target regions
d1233 5
a1237 5
     Set to choose the device which is used in a 'target' region, unless
     the value is overridden by 'omp_set_default_device' or by a
     'device' clause.  The value shall be the nonnegative device number.
     If no device with the given device number exists, the code is
     executed on the host.  If unset, device number 0 will be used.
d1248 1
a1248 1
3.4 'OMP_DYNAMIC' - Dynamic adjustment of threads
d1254 2
a1255 2
     'TRUE' or 'FALSE'.  If undefined, dynamic adjustment is disabled by
     default.
d1266 1
a1266 1
3.5 'OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1283 1
a1283 1
3.6 'OMP_MAX_TASK_PRIORITY' - Set the maximum priority
d1286 1
a1286 1
number that can be set for a task.
d1288 2
a1289 2
     Specifies the initial value for the maximum priority value that can
     be set for a task.  The value of this variable shall be a
d1302 1
a1302 1
3.7 'OMP_NESTED' - Nested parallel regions
d1308 1
a1308 1
     environment variable shall be 'TRUE' or 'FALSE'.  If undefined,
d1320 1
a1320 1
3.8 'OMP_NUM_THREADS' - Specifies the number of threads to use
d1324 5
a1328 5
     Specifies the default number of threads to use in parallel regions.
     The value of this variable shall be a comma-separated list of
     positive integers; the value specified the number of threads to use
     for the corresponding nested level.  If undefined one thread per
     CPU is used.
d1339 1
a1339 1
3.9 'OMP_PROC_BIND' - Whether theads may be moved between CPUs
d1344 1
a1344 1
     to 'TRUE', OpenMP theads should not be moved; if set to 'FALSE'
d1346 1
a1346 1
     values 'MASTER', 'CLOSE' and 'SPREAD' can be used to specify the
d1348 3
a1350 3
     'MASTER' the worker threads are in the same place partition as the
     master thread.  With 'CLOSE' those are kept close to the master
     thread in contiguous place partitions.  And with 'SPREAD' a sparse
d1353 2
a1354 2
     When undefined, 'OMP_PROC_BIND' defaults to 'TRUE' when
     'OMP_PLACES' or 'GOMP_CPU_AFFINITY' is set and 'FALSE' otherwise.
d1366 1
a1366 1
3.10 'OMP_PLACES' - Specifies on which CPUs the theads should be placed
d1370 3
a1372 3
     The thread placement can be either specified using an abstract name
     or by an explicit list of the places.  The abstract names
     'threads', 'cores' and 'sockets' can be optionally followed by a
d1374 3
a1376 3
     shall be created.  With 'threads' each place corresponds to a
     single hardware thread; 'cores' to a single core with the
     corresponding number of hardware threads; and with 'sockets' the
d1378 1
a1378 1
     be shown by setting the 'OMP_DISPLAY_ENV' environment variable.
d1391 2
a1392 2
     specifies the same places list: '"{0,1,2}, {3,4,6}, {7,8,9},
     {10,11,12}"'; '"{0:3}, {3:3}, {7:3}, {10:3}"'; and '"{0:2}:4:3"'.
d1394 2
a1395 2
     If 'OMP_PLACES' and 'GOMP_CPU_AFFINITY' are unset and
     'OMP_PROC_BIND' is either unset or 'false', threads may be moved
d1408 1
a1408 1
3.11 'OMP_STACKSIZE' - Set default thread stack size
d1413 7
a1419 7
     is suffixed by 'B', 'K', 'M' or 'G', in which case the size is,
     respectively, in bytes, kilobytes, megabytes or gigabytes.  This is
     different from 'pthread_attr_setstacksize' which gets the number of
     bytes as an argument.  If the stack size cannot be set due to
     system constraints, an error is reported and the initial stack size
     is left unchanged.  If undefined, the stack size is system
     dependent.
d1427 1
a1427 1
3.12 'OMP_SCHEDULE' - How threads are scheduled
d1431 5
a1435 5
     Allows to specify 'schedule type' and 'chunk size'.  The value of
     the variable shall have the form: 'type[,chunk]' where 'type' is
     one of 'static', 'dynamic', 'guided' or 'auto' The optional 'chunk'
     size shall be a positive integer.  If undefined, dynamic scheduling
     and a chunk size of 1 is used.
d1447 1
a1447 1
3.13 'OMP_THREAD_LIMIT' - Set the maximum number of threads
d1464 1
a1464 1
3.14 'OMP_WAIT_POLICY' - How waiting threads are handled
d1469 2
a1470 2
     the value is 'PASSIVE', waiting threads should not consume CPU
     power while waiting; while the value is 'ACTIVE' specifies that
d1483 1
a1483 1
3.15 'GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d1491 2
a1492 2
     (M-N:S). CPU numbers are zero based.  For example,
     'GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
d1496 1
a1496 1
     beginning of the list.  'GOMP_CPU_AFFINITY=0' binds all threads to
d1501 10
a1510 10
     language-specific library functions, e.g., 'getenv' in C or
     'GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
     setting of the 'GOMP_CPU_AFFINITY' environment variable.  A defined
     CPU affinity on startup cannot be changed or disabled during the
     runtime of the application.

     If both 'GOMP_CPU_AFFINITY' and 'OMP_PROC_BIND' are set,
     'OMP_PROC_BIND' has a higher precedence.  If neither has been set
     and 'OMP_PROC_BIND' is unset, or when 'OMP_PROC_BIND' is set to
     'FALSE', the host system will handle the assignment of threads to
d1519 1
a1519 1
3.16 'GOMP_DEBUG' - Enable debugging output
d1523 2
a1524 2
     Enable debugging output.  The variable should be set to '0'
     (disabled, also the default if not set), or '1' (enabled).
d1533 1
a1533 1
3.17 'GOMP_STACKSIZE' - Set default thread stack size
d1538 1
a1538 1
     from 'pthread_attr_setstacksize' which gets the number of bytes as
d1555 1
a1555 1
3.18 'GOMP_SPINCOUNT' - Set the busy-wait spin count
d1561 1
a1561 1
     value may be either 'INFINITE', 'INFINITY' to always wait actively
d1564 9
a1572 8
     suffixes acting as multiplication factors: 'k' (kilo, thousand),
     'M' (mega, million), 'G' (giga, billion), or 'T' (tera, trillion).
     If undefined, 0 is used when 'OMP_WAIT_POLICY' is 'PASSIVE',
     300,000 is used when 'OMP_WAIT_POLICY' is undefined and 30 billion
     is used when 'OMP_WAIT_POLICY' is 'ACTIVE'.  If there are more
     OpenMP threads than available CPUs, 1000 and 100 spins are used for
     'OMP_WAIT_POLICY' being 'ACTIVE' or undefined, respectively; unless
     the 'GOMP_SPINCOUNT' is lower or 'OMP_WAIT_POLICY' is 'PASSIVE'.
d1580 1
a1580 1
3.19 'GOMP_RTEMS_THREAD_POOLS' - Set the RTEMS specific thread pools
d1586 4
a1589 4
     thread pools.  The format for 'GOMP_RTEMS_THREAD_POOLS' is a list
     of optional '<thread-pool-count>[$<priority>]@@<scheduler-name>'
     configurations separated by ':' where:
        * '<thread-pool-count>' is the thread pool count for this
d1591 3
a1593 2
        * '$<priority>' is an optional priority for the worker threads
          of a thread pool according to 'pthread_setschedparam'.  In
d1599 2
a1600 1
        * '@@<scheduler-name>' is the scheduler instance name according
d1603 5
a1607 4
     instance, then each OpenMP master thread of this scheduler instance
     will use its own dynamically allocated thread pool.  To limit the
     worker thread count of the thread pools, each OpenMP master thread
     must call 'omp_set_num_threads'.
d1609 2
a1610 2
     Lets suppose we have three scheduler instances 'IO', 'WRK0', and
     'WRK1' with 'GOMP_RTEMS_THREAD_POOLS' set to '"1@@WRK0:3$4@@WRK1"'.
d1612 1
a1612 1
     'IO'.  In the scheduler instance 'WRK0' there is one thread pool
d1615 3
a1617 3
     master thread that created it.  In the scheduler instance 'WRK1'
     there are three thread pools available and their worker threads run
     at priority four.
d1626 4
a1629 4
compile-time flag '-fopenacc' must be specified.  This enables the
OpenACC directive '#pragma acc' in C/C++ and '!$accp' directives in free
form, 'c$acc', '*$acc' and '!$acc' directives in fixed form, '!$'
conditional compilation sentinels in free form and 'c$', '*$' and '!$'
d1639 2
a1640 2
future versions of GCC. See <https://gcc.gnu.org/wiki/OpenACC> for more
information.
d1650 3
a1652 3
throw exceptions.  Generally, they are available only for the host, with
the exception of 'acc_on_device', which is available for both the host
and the acceleration device.
d1715 1
a1715 1
5.1 'acc_get_num_devices' - Get number of devices for given device type
d1723 1
a1723 1
     _Prototype_:   'int acc_get_num_devices(acc_device_t devicetype);'
d1726 2
a1727 2
     _Interface_:   'integer function acc_get_num_devices(devicetype)'
                    'integer(kind=acc_device_kind) devicetype'
d1736 1
a1736 1
5.2 'acc_set_device_type' - Set type of device accelerator to use.
d1745 1
a1745 1
     _Prototype_:   'acc_set_device_type(acc_device_t devicetype);'
d1748 2
a1749 2
     _Interface_:   'subroutine acc_set_device_type(devicetype)'
                    'integer(kind=acc_device_kind) devicetype'
d1758 1
a1758 1
5.3 'acc_get_device_type' - Get type of device accelerator to be used.
d1766 1
a1766 1
     _Prototype_:   'acc_device_t acc_get_device_type(void);'
d1769 2
a1770 2
     _Interface_:   'function acc_get_device_type(void)'
                    'integer(kind=acc_device_kind) acc_get_device_type'
d1779 1
a1779 1
5.4 'acc_set_device_num' - Set device number to use.
d1788 2
a1789 1
     _Prototype_:   'acc_set_device_num(int num, acc_device_t devicetype);'
d1792 3
a1794 3
     _Interface_:   'subroutine acc_set_device_num(devicenum, devicetype)'
                    'integer devicenum'
                    'integer(kind=acc_device_kind) devicetype'
d1803 1
a1803 1
5.5 'acc_get_device_num' - Get device number to be used.
d1812 1
a1812 1
     _Prototype_:   'int acc_get_device_num(acc_device_t devicetype);'
d1815 3
a1817 3
     _Interface_:   'function acc_get_device_num(devicetype)'
                    'integer(kind=acc_device_kind) devicetype'
                    'integer acc_get_device_num'
d1826 1
a1826 1
5.6 'acc_async_test' - Test for completion of a specific asynchronous operation.
d1831 4
a1834 4
     specified in ARG.  In C/C++, a non-zero value will be returned to
     indicate the specified asynchronous operation has completed.  While
     Fortran will return a 'true'.  If the asynchrounous operation has
     not completed, C/C++ returns a zero and Fortran returns a 'false'.
d1837 1
a1837 1
     _Prototype_:   'int acc_async_test(int arg);'
d1840 3
a1842 3
     _Interface_:   'function acc_async_test(arg)'
                    'integer(kind=acc_handle_kind) arg'
                    'logical acc_async_test'
d1851 1
a1851 1
5.7 'acc_async_test_all' - Tests for completion of all asynchronous operations.
d1857 3
a1859 3
     asynchronous operations have completed.  While Fortran will return
     a 'true'.  If any asynchronous operation has not completed, C/C++
     returns a zero and Fortran returns a 'false'.
d1862 1
a1862 1
     _Prototype_:   'int acc_async_test_all(void);'
d1865 2
a1866 2
     _Interface_:   'function acc_async_test()'
                    'logical acc_get_device_num'
d1875 1
a1875 1
5.8 'acc_wait' - Wait for completion of a specific asynchronous operation.
d1883 1
a1883 1
     _Prototype_:   'acc_wait(arg);'
d1886 2
a1887 2
     _Interface_:   'subroutine acc_wait(arg)'
                    'integer(acc_handle_kind) arg'
d1896 1
a1896 1
5.9 'acc_wait_all' - Waits for completion of all asynchronous operations.
d1904 1
a1904 1
     _Prototype_:   'acc_wait_all(void);'
d1907 1
a1907 1
     _Interface_:   'subroutine acc_wait_async()'
d1916 1
a1916 1
5.10 'acc_wait_all_async' - Wait for completion of all asynchronous operations.
d1925 1
a1925 1
     _Prototype_:   'acc_wait_all_async(int async);'
d1928 2
a1929 2
     _Interface_:   'subroutine acc_wait_all_async(async)'
                    'integer(acc_handle_kind) async'
d1938 1
a1938 1
5.11 'acc_wait_async' - Wait for completion of asynchronous operations.
d1946 1
a1946 1
     _Prototype_:   'acc_wait_async(int arg, int async);'
d1949 2
a1950 2
     _Interface_:   'subroutine acc_wait_async(arg, async)'
                    'integer(acc_handle_kind) arg, async'
d1959 1
a1959 1
5.12 'acc_init' - Initialize runtime for a specific device type.
d1963 2
a1964 2
     This function initializes the runtime for the device type specified
     in DEVICETYPE.
d1967 1
a1967 1
     _Prototype_:   'acc_init(acc_device_t devicetype);'
d1970 2
a1971 2
     _Interface_:   'subroutine acc_init(devicetype)'
                    'integer(acc_device_kind) devicetype'
d1980 1
a1980 1
5.13 'acc_shutdown' - Shuts down the runtime for a specific device type.
d1988 1
a1988 1
     _Prototype_:   'acc_shutdown(acc_device_t devicetype);'
d1991 2
a1992 2
     _Interface_:   'subroutine acc_shutdown(devicetype)'
                    'integer(acc_device_kind) devicetype'
d2001 1
a2001 1
5.14 'acc_on_device' - Whether executing on a particular device
d2006 1
a2006 1
     particular device specified in DEVICETYPE.  In C/C++ a non-zero
d2008 1
a2008 1
     specified device type.  In Fortran, 'true' will be returned.  If
d2010 1
a2010 1
     will return a zero, while Fortran will return 'false'.
d2013 1
a2013 1
     _Prototype_:   'acc_on_device(acc_device_t devicetype);'
d2016 3
a2018 3
     _Interface_:   'function acc_on_device(devicetype)'
                    'integer(acc_device_kind) devicetype'
                    'logical acc_on_device'
d2027 1
a2027 1
5.15 'acc_malloc' - Allocate device memory.
d2031 1
a2031 1
     This function allocates LEN bytes of device memory.  It returns the
d2035 1
a2035 1
     _Prototype_:   'd_void* acc_malloc(size_t len);'
d2044 1
a2044 1
5.16 'acc_free' - Free device memory.
d2048 1
a2048 1
     Free previously allocated device memory at the device address 'a'.
d2051 1
a2051 1
     _Prototype_:   'acc_free(d_void *a);'
d2060 1
a2060 1
5.17 'acc_copyin' - Allocate device memory and copy host memory to it.
d2065 1
a2065 1
     maps it to the specified host address in A.  The device address of
d2068 3
a2070 3
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
     a variable or array element and LEN specifies the length in bytes.
d2073 1
a2073 1
     _Prototype_:   'void *acc_copyin(h_void *a, size_t len);'
d2076 5
a2080 5
     _Interface_:   'subroutine acc_copyin(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_copyin(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2089 1
a2089 1
5.18 'acc_present_or_copyin' - If the data is not present on the device, allocate device memory and copy from host memory.
d2094 3
a2096 3
     LEN is present or not.  If it is not present, then device memory
     will be allocated and the host memory copied.  The device address
     of the newly allocated device memory is returned.
d2098 2
a2099 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2103 2
a2104 2
     _Prototype_:   'void *acc_present_or_copyin(h_void *a, size_t len);'
     _Prototype_:   'void *acc_pcopyin(h_void *a, size_t len);'
d2107 10
a2116 10
     _Interface_:   'subroutine acc_present_or_copyin(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_present_or_copyin(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_pcopyin(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_pcopyin(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2125 1
a2125 1
5.19 'acc_create' - Allocate device memory and map it to host memory.
d2130 1
a2130 1
     specified by the host address A with a length of LEN bytes.  In
d2134 2
a2135 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2139 1
a2139 1
     _Prototype_:   'void *acc_create(h_void *a, size_t len);'
d2142 5
a2146 5
     _Interface_:   'subroutine acc_create(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_create(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2155 1
a2155 1
5.20 'acc_present_or_create' - If the data is not present on the device, allocate device memory and map it to host memory.
d2160 2
a2161 2
     LEN is present or not.  If it is not present, then device memory
     will be allocated and mapped to host memory.  In C/C++, the device
d2164 2
a2165 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2169 2
a2170 2
     _Prototype_:   'void *acc_present_or_create(h_void *a, size_t len)'
     _Prototype_:   'void *acc_pcreate(h_void *a, size_t len)'
d2173 10
a2182 10
     _Interface_:   'subroutine acc_present_or_create(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_present_or_create(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_pcreate(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_pcreate(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2191 1
a2191 1
5.21 'acc_copyout' - Copy device memory to host memory.
d2198 2
a2199 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2203 1
a2203 1
     _Prototype_:   'acc_copyout(h_void *a, size_t len);'
d2206 5
a2210 5
     _Interface_:   'subroutine acc_copyout(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_copyout(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2219 1
a2219 1
5.22 'acc_delete' - Free device memory.
d2226 2
a2227 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2231 1
a2231 1
     _Prototype_:   'acc_delete(h_void *a, size_t len);'
d2234 5
a2238 5
     _Interface_:   'subroutine acc_delete(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_delete(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2247 1
a2247 1
5.23 'acc_update_device' - Update device memory from mapped host memory.
d2255 2
a2256 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2260 1
a2260 1
     _Prototype_:   'acc_update_device(h_void *a, size_t len);'
d2263 5
a2267 5
     _Interface_:   'subroutine acc_update_device(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_update_device(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2276 1
a2276 1
5.24 'acc_update_self' - Update host memory from mapped device memory.
d2284 2
a2285 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2289 1
a2289 1
     _Prototype_:   'acc_update_self(h_void *a, size_t len);'
d2292 5
a2296 5
     _Interface_:   'subroutine acc_update_self(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_update_self(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2305 1
a2305 1
5.25 'acc_map_data' - Map previously allocated device memory to host memory.
d2310 1
a2310 1
     The device memory is specified with the device address D.  The host
d2314 1
a2314 1
     _Prototype_:   'acc_map_data(h_void *h, d_void *d, size_t len);'
d2323 1
a2323 1
5.26 'acc_unmap_data' - Unmap device memory from host memory.
d2327 1
a2327 1
     This function unmaps previously mapped device and host memory.  The
d2331 1
a2331 1
     _Prototype_:   'acc_unmap_data(h_void *h);'
d2340 1
a2340 1
5.27 'acc_deviceptr' - Get device pointer associated with specific host address.
d2348 1
a2348 1
     _Prototype_:   'void *acc_deviceptr(h_void *h);'
d2357 1
a2357 1
5.28 'acc_hostptr' - Get host pointer associated with specific device address.
d2365 1
a2365 1
     _Prototype_:   'void *acc_hostptr(d_void *d);'
d2374 1
a2374 1
5.29 'acc_is_present' - Indicate whether host variable / array is present on device.
d2378 2
a2379 2
     This function indicates whether the specified host address in A and
     a length of LEN bytes is present on the device.  In C/C++, a
d2381 1
a2381 1
     memory on the device.  A zero is returned to indicate the memory is
d2384 2
a2385 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2387 2
a2388 2
     If the host memory is mapped to device memory, then a 'true' is
     returned.  Otherwise, a 'false' is return to indicate the mapped
d2392 1
a2392 1
     _Prototype_:   'int acc_is_present(h_void *a, size_t len);'
d2395 7
a2401 7
     _Interface_:   'function acc_is_present(a)'
                    'type, dimension(:[,:]...) :: a'
                    'logical acc_is_present'
     _Interface_:   'function acc_is_present(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'logical acc_is_present'
d2410 1
a2410 1
5.30 'acc_memcpy_to_device' - Copy host memory to device memory.
d2419 2
a2420 2
     _Prototype_:   'acc_memcpy_to_device(d_void *dest, h_void *src, size_t
                    bytes);'
d2429 1
a2429 1
5.31 'acc_memcpy_from_device' - Copy device memory to host memory.
d2438 2
a2439 2
     _Prototype_:   'acc_memcpy_from_device(d_void *dest, h_void *src,
                    size_t bytes);'
d2448 1
a2448 1
5.32 'acc_get_current_cuda_device' - Get CUDA device handle.
d2452 1
a2452 1
     This function returns the CUDA device handle.  This handle is the
d2456 1
a2456 1
     _Prototype_:   'void *acc_get_current_cuda_device(void);'
d2465 1
a2465 1
5.33 'acc_get_current_cuda_context' - Get CUDA context handle.
d2469 1
a2469 1
     This function returns the CUDA context handle.  This handle is the
d2473 1
a2473 1
     _Prototype_:   'acc_get_current_cuda_context(void);'
d2482 1
a2482 1
5.34 'acc_get_cuda_stream' - Get CUDA stream handle.
d2486 1
a2486 1
     This function returns the CUDA stream handle.  This handle is the
d2490 1
a2490 1
     _Prototype_:   'acc_get_cuda_stream(void);'
d2499 1
a2499 1
5.35 'acc_set_cuda_stream' - Set CUDA stream handle.
d2507 1
a2507 1
     _Prototype_:   'acc_set_cuda_stream(int async void *stream);'
d2519 1
a2519 1
The variables 'ACC_DEVICE_TYPE' and 'ACC_DEVICE_NUM' are defined by
d2521 1
a2521 1
'GCC_ACC_NOTIFY' is used for diagnostic purposes.
d2532 1
a2532 1
6.1 'ACC_DEVICE_TYPE'
d2541 1
a2541 1
6.2 'ACC_DEVICE_NUM'
d2550 1
a2550 1
6.3 'GCC_ACC_NOTIFY'
d2562 1
a2562 1
This applies to the 'nvptx' plugin only.
d2571 4
a2574 4
'async' and 'wait' clauses.  When the 'async' clause is first used with
a directive, it creates a CUDA stream.  If an 'async-argument' is used
with the 'async' clause, then the stream is associated with the
specified 'async-argument'.
d2577 2
a2578 2
the 'async-argument' of an 'async' clause, both the 'wait' clause and
the 'wait' directive can be used.  When either the clause or directive
d2581 1
a2581 1
'async-argument', that is, stream, have completed.
d2584 2
a2585 2
of using the 'async' clause, is done without any intervention by the
caller.  This implies the association between the 'async-argument' and
d2588 5
a2592 5
function 'acc_set_cuda_stream'.  When the function 'acc_set_cuda_stream'
is called, the CUDA stream that was originally associated with the
'async' clause will be destroyed.  Caution should be taken when changing
the association as subsequent references to the 'async-argument' refer
to a different CUDA stream.
d2609 4
a2612 4
programs that use the Runtime library directly, or another library based
on the Runtime library, e.g., CUBLAS(1). This chapter describes the use
cases and what changes are required in order to use both the OpenACC
library and the CUBLAS and Runtime libraries within a program.
d2618 2
a2619 2
called prior to any of the functions in the OpenACC library.  More
specifically, the function 'cublasCreate()'.
d2624 5
a2628 5
returned to the caller.  The OpenACC library also requires
initialization and allocation of hardware resources.  Since the CUBLAS
library has already allocated the hardware resources for the device, all
that is left to do is to initialize the OpenACC library and acquire the
hardware resources on the host.
d2631 10
a2640 10
and allocate the host hardware resources, you need to acquire the device
number that was allocated during the call to 'cublasCreate()'.  The
invoking of the runtime library function 'cudaGetDevice()' accomplishes
this.  Once acquired, the device number is passed along with the device
type as parameters to the OpenACC library function
'acc_set_device_num()'.

   Once the call to 'acc_set_device_num()' has completed, the OpenACC
library uses the context that was created during the call to
'cublasCreate()'.  In other words, both libraries will be sharing the
d2661 1
a2661 2

                              Use Case 1
d2667 2
a2668 2
is called prior to any of the functions in the CUBLAS library.  More
specificially, the function 'acc_set_device_num()'.
d2670 1
a2670 1
   In the use case presented here, the function 'acc_set_device_num()'
d2672 3
a2674 3
resources on the host and the device.  In the call to the function, the
call parameters specify which device to use and what device type to use,
i.e., 'acc_device_nvidia'.  It should be noted that this is but one
d2676 1
a2676 1
hardware resources.  Other methods are available through the use of
d2679 1
a2679 1
   Once the call to 'acc_set_device_num()' has completed, other OpenACC
d2681 4
a2684 4
'acc_copyin()'.  In addition, calls can be made to functions in the
CUBLAS library.  In the use case a call to 'cublasCreate()' is made
subsequent to the calls to 'acc_copyin()'.  As seen in the previous use
case, a call to 'cublasCreate()' initializes the CUBLAS library and
d2686 1
a2686 1
since the device has already been allocated, 'cublasCreate()' will only
d2688 1
a2688 1
resources on the host.  The context that was created as part of the
d2730 1
a2730 2

                              Use Case 2
d2737 1
a2737 1
'ACC_DEVICE_TYPE' and 'ACC_DEVICE_NUM', respecively.  These two
d2739 2
a2740 2
'acc_set_device_num()'.  As seen in the second use case, the device type
and device number were specified using 'acc_set_device_num()'.  If
d2742 1
a2742 1
call to 'acc_set_device_num()' would not be required.
d2744 4
a2747 4
   The use of the environment variables is only relevant when an OpenACC
function is called prior to a call to 'cudaCreate()'.  If 'cudaCreate()'
is called prior to a call to an OpenACC function, then you must call
'acc_set_device_num()'(2)
d2753 2
a2754 2
Interoperability", in "CUDA Driver API", TRM-06703-001, Version 5.5, for
additional information on library interoperability.
d2756 2
a2757 2
   (2) More complete information about 'ACC_DEVICE_TYPE' and
'ACC_DEVICE_NUM' can be found in sections 4.1 and 4.2 of the OpenACC
d2767 2
a2768 2
The following sections present notes on the external ABI as presented by
libgomp.  Only maintainers should need them.
d2829 1
a2829 1
The target should implement the '__sync' builtins.
d2845 1
a2845 1
Expands to the '__sync_synchronize' builtin.
d2861 4
a2864 4
In _most_ cases we can map this directly to '__thread'.  Except that OMP
allows constructors for C++ objects.  We can either refuse to support
this (how often is it used?)  or we can implement something akin to
.ctors.
d2896 2
a2897 2
   It is not clear what to do with bare FOR or SECTION blocks.  The only
thing I can figure is that we do something like:
d2915 2
a2916 2
for the two variables, i.e.  not something you could write directly in
C. Presumably this only makes sense if the "outer" x and y are global
d2929 4
a2932 4
pointer to an array of the type of the variable, indexed by the thread's
TEAM_ID.  The thread stores its final value into the array, and after
the barrier, the master thread iterates over the array to collect the
values.
d2969 3
a2971 3
   The function needs to create the appropriate number of threads and/or
launch them from the dock.  It needs to create the team structure and
assign team ids.
d2976 1
a2976 1
'omp_in_parallel()' state.
d3028 2
a3029 2
also pull it into a local variable if we like, but since its supposed to
remain unchanged, we can also not if we like.
d3031 5
a3035 5
   If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be able
to get away with no work-sharing context at all, since we can simply
perform the arithmetic directly in each thread to divide up the
iterations.  Which would mean that we wouldn't need to call any of these
routines.
d3137 2
a3138 2
"openacc", or "openmp", or both to the keywords field in the bug report,
as appropriate.
d3148 1
a3148 1
     Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
d3176 3
a3178 3
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
d3197 10
a3206 9
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
d3243 2
a3244 2
     infringement under applicable copyright law, except executing it on
     a computer or modifying a private copy.  Propagation includes
d3258 2
a3259 2
     the extent that warranties are provided), that licensees may convey
     the work under this License, and how to view a copy of this
d3267 2
a3268 2
     for making modifications to it.  "Object code" means any non-source
     form of a work.
d3279 4
a3282 4
     Major Component, and (b) serves only to enable use of the work with
     that Major Component, or to implement a Standard Interface for
     which an implementation is available to the public in source code
     form.  A "Major Component", in this context, means a major
d3290 3
a3292 3
     work) run the object code and to modify the work, including scripts
     to control those activities.  However, it does not include the
     work's System Libraries, or general-purpose tools or generally
d3295 4
a3298 4
     Corresponding Source includes interface definition files associated
     with source files for the work, and the source code for shared
     libraries and dynamically linked subprograms that the work is
     specifically designed to require, such as by intimate data
d3315 4
a3318 4
     a covered work is covered by this License only if the output, given
     its content, constitutes a covered work.  This License acknowledges
     your rights of fair use or other equivalent, as provided by
     copyright law.
d3323 8
a3330 8
     sole purpose of having them make modifications exclusively for you,
     or provide you with facilities for running those works, provided
     that you comply with the terms of this License in conveying all
     material for which you do not control copyright.  Those thus making
     or running the covered works for you must do so exclusively on your
     behalf, under your direction and control, on terms that prohibit
     them from making any copies of your copyrighted material outside
     their relationship with you.
d3347 2
a3348 2
     with respect to the covered work, and you disclaim any intention to
     limit operation or modification of the work as a means of
d3418 2
a3419 2
          written offer, valid for at least three years and valid for as
          long as you offer spare parts or customer support for that
d3429 2
a3430 2
       c. Convey individual copies of the object code with a copy of the
          written offer to provide the Corresponding Source.  This
d3436 2
a3437 2
          place (gratis or for a charge), and offer equivalent access to
          the Corresponding Source in the same way through the same
d3441 4
a3444 4
          Corresponding Source may be on a different server (operated by
          you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to the
          object code saying where to find the Corresponding Source.
d3446 2
a3447 2
          remain obligated to ensure that it is available for as long as
          needed to satisfy these requirements.
d3454 1
d3462 2
a3463 2
     incorporation into a dwelling.  In determining whether a product is
     a consumer product, doubtful cases shall be resolved in favor of
d3494 5
a3498 5
     warranty, or updates for a work that has been modified or installed
     by the recipient, or for the User Product in which it has been
     modified or installed.  Access to a network may be denied when the
     modification itself materially and adversely affects the operation
     of the network or violates the rules and protocols for
d3528 2
a3529 2
     holders of that material) supplement the terms of this License with
     terms:
d3539 3
a3541 2
          or requiring that modified versions of such material be marked
          in reasonable ways as different from the original version; or
d3560 5
a3564 4
     contains a further restriction but permits relicensing or conveying
     under this License, you may add to a covered work material governed
     by the terms of that license document, provided that the further
     restriction does not survive such relicensing or conveying.
d3580 2
a3581 2
     under this License (including any patent licenses granted under the
     third paragraph of section 11).
d3585 2
a3586 2
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
d3598 4
a3601 4
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, you do not qualify to receive new licenses
     for the same material under section 10.
d3615 1
a3615 1
  10. Automatic Licensing of Downstream Recipients.
d3629 4
a3632 4
     could give under the previous paragraph, plus a right to possession
     of the Corresponding Source of the work from the predecessor in
     interest, if the predecessor has it or can get it with reasonable
     efforts.
d3636 6
a3641 6
     may not impose a license fee, royalty, or other charge for exercise
     of rights granted under this License, and you may not initiate
     litigation (including a cross-claim or counterclaim in a lawsuit)
     alleging that any patent claim is infringed by making, using,
     selling, offering for sale, or importing the Program or any portion
     of it.
d3643 1
a3643 1
  11. Patents.
d3663 2
a3664 2
     otherwise run, modify and propagate the contents of its contributor
     version.
d3669 3
a3671 3
     patent or covenant not to sue for patent infringement).  To "grant"
     such a patent license to a party means to make such an agreement or
     commitment not to enforce a patent against the party.
d3701 10
a3710 10
     party that is in the business of distributing software, under which
     you make payment to the third party based on the extent of your
     activity of conveying the work, and under which the third party
     grants, to any of the parties who would receive the covered work
     from you, a discriminatory patent license (a) in connection with
     copies of the covered work conveyed by you (or copies made from
     those copies), or (b) primarily for and in connection with specific
     products or compilations that contain the covered work, unless you
     entered into that arrangement, or that patent license was granted,
     prior to 28 March 2007.
d3716 1
a3716 1
  12. No Surrender of Others' Freedom.
d3718 11
a3728 10
     If conditions are imposed on you (whether by court order, agreement
     or otherwise) that contradict the conditions of this License, they
     do not excuse you from the conditions of this License.  If you
     cannot convey a covered work so as to satisfy simultaneously your
     obligations under this License and any other pertinent obligations,
     then as a consequence you may not convey it at all.  For example,
     if you agree to terms that obligate you to collect a royalty for
     further conveying from those to whom you convey the Program, the
     only way you could satisfy both those terms and this License would
     be to refrain entirely from conveying the Program.
d3730 1
a3730 1
  13. Use with the GNU Affero General Public License.
d3741 1
a3741 1
  14. Revised Versions of this License.
d3744 4
a3747 3
     versions of the GNU General Public License from time to time.  Such
     new versions will be similar in spirit to the present version, but
     may differ in detail to address new problems or concerns.
d3753 4
a3756 4
     that numbered version or of any later version published by the Free
     Software Foundation.  If the Program does not specify a version
     number of the GNU General Public License, you may choose any
     version ever published by the Free Software Foundation.
d3768 1
a3768 1
  15. Disclaimer of Warranty.
d3771 1
a3771 1
     APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
d3775 1
a3775 1
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
d3780 1
a3780 1
  16. Limitation of Liability.
d3784 2
a3785 2
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
     DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
d3793 1
a3793 1
  17. Interpretation of Sections 15 and 16.
d3802 1
d3833 1
a3833 1
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
d3842 1
a3842 1
     This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
d3844 1
a3844 1
     under certain conditions; type 'show c' for details.
d3846 1
a3846 1
   The hypothetical commands 'show w' and 'show c' should show the
d3854 1
a3854 1
the GNU GPL, see <http://www.gnu.org/licenses/>.
d3861 1
a3861 1
please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
d3872 1
a3872 1
     <http://fsf.org/>
d3897 2
a3898 2
     of subject matter or whether it is published as a printed book.  We
     recommend this License principally for works whose purpose is
d3904 2
a3905 2
     that contains a notice placed by the copyright holder saying it can
     be distributed under the terms of this License.  Such a notice
d3909 3
a3911 3
     of the public is a licensee, and is addressed as "you".  You accept
     the license if you copy, modify or distribute the work in a way
     requiring permission under copyright law.
d3929 6
a3934 6
     titles are designated, as being those of Invariant Sections, in the
     notice that says that the Document is released under this License.
     If a section does not fit the above definition of Secondary then it
     is not allowed to be designated as Invariant.  The Document may
     contain zero Invariant Sections.  If the Document does not identify
     any Invariant Sections then there are none.
d3945 10
a3954 10
     straightforwardly with generic text editors or (for images composed
     of pixels) generic paint programs or (for drawings) some widely
     available drawing editor, and that is suitable for input to text
     formatters or for automatic translation to a variety of formats
     suitable for input to text formatters.  A copy made in an otherwise
     Transparent file format whose markup, or absence of markup, has
     been arranged to thwart or discourage subsequent modification by
     readers is not Transparent.  An image format is not Transparent if
     used for any substantial amount of text.  A copy that is not
     "Transparent" is called "Opaque".
d3958 8
a3965 8
     SGML or XML using a publicly available DTD, and standard-conforming
     simple HTML, PostScript or PDF designed for human modification.
     Examples of transparent image formats include PNG, XCF and JPG.
     Opaque formats include proprietary formats that can be read and
     edited only by proprietary word processors, SGML or XML for which
     the DTD and/or processing tools are not generally available, and
     the machine-generated HTML, PostScript or PDF produced by some word
     processors for output purposes only.
d4003 2
a4004 2
     distribute a large enough number of copies you must also follow the
     conditions in section 3.
d4018 6
a4023 5
     front cover must present the full title with all words of the title
     equally prominent and visible.  You may add other material on the
     covers in addition.  Copying with changes limited to the covers, as
     long as they preserve the title of the Document and satisfy these
     conditions, can be treated as verbatim copying in other respects.
d4031 12
a4042 11
     numbering more than 100, you must either include a machine-readable
     Transparent copy along with each Opaque copy, or state in or with
     each Opaque copy a computer-network location from which the general
     network-using public has access to download using public-standard
     network protocols a complete Transparent copy of the Document, free
     of added material.  If you use the latter option, you must take
     reasonably prudent steps, when you begin distribution of Opaque
     copies in quantity, to ensure that this Transparent copy will
     remain thus accessible at the stated location until at least one
     year after the last time you distribute an Opaque copy (directly or
     through your agents or retailers) of that edition to the public.
d4045 3
a4047 3
     the Document well before redistributing any large number of copies,
     to give them a chance to provide you with an updated version of the
     Document.
d4053 5
a4057 5
     release the Modified Version under precisely this License, with the
     Modified Version filling the role of the Document, thus licensing
     distribution and modification of the Modified Version to whoever
     possesses a copy of it.  In addition, you must do these things in
     the Modified Version:
d4060 5
a4064 5
          distinct from that of the Document, and from those of previous
          versions (which should, if there were any, be listed in the
          History section of the Document).  You may use the same title
          as a previous version if the original publisher of that
          version gives permission.
d4094 6
a4099 6
          authors, and publisher of the Modified Version as given on the
          Title Page.  If there is no section Entitled "History" in the
          Document, create one stating the title, year, authors, and
          publisher of the Document as given on its Title Page, then add
          an item describing the Modified Version as stated in the
          previous sentence.
d4104 5
a4108 5
          previous versions it was based on.  These may be placed in the
          "History" section.  You may omit a network location for a work
          that was published at least four years before the Document
          itself, or if the original publisher of the version it refers
          to gives permission.
d4111 2
a4112 2
          Preserve the Title of the section, and preserve in the section
          all the substance and tone of each of the contributor
d4115 4
a4118 3
       L. Preserve all the Invariant Sections of the Document, unaltered
          in their text and in their titles.  Section numbers or the
          equivalent are not considered part of the section titles.
d4131 5
a4135 5
     material copied from the Document, you may at your option designate
     some or all of these sections as invariant.  To do this, add their
     titles to the list of Invariant Sections in the Modified Version's
     license notice.  These titles must be distinct from any other
     section titles.
d4144 9
a4152 9
     and a passage of up to 25 words as a Back-Cover Text, to the end of
     the list of Cover Texts in the Modified Version.  Only one passage
     of Front-Cover Text and one of Back-Cover Text may be added by (or
     through arrangements made by) any one entity.  If the Document
     already includes a cover text for the same cover, previously added
     by you or by arrangement made by the same entity you are acting on
     behalf of, you may not add another; but you may replace the old
     one, on explicit permission from the previous publisher that added
     the old one.
d4162 2
a4163 2
     modified versions, provided that you include in the combination all
     of the Invariant Sections of all of the original documents,
d4190 2
a4191 2
     rules of this License for verbatim copying of each of the documents
     in all other respects.
d4195 3
a4197 3
     a copy of this License into the extracted document, and follow this
     License in all other respects regarding verbatim copying of that
     document.
d4202 2
a4203 2
     separate and independent documents or works, in or on a volume of a
     storage or distribution medium, is called an "aggregate" if the
d4248 2
a4249 2
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
d4261 4
a4264 4
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, receipt of a copy of some or all of the
     same material does not give you any rights to use it.
d4266 1
a4266 1
  10. FUTURE REVISIONS OF THIS LICENSE
d4272 1
a4272 1
     <http://www.gnu.org/copyleft/>.
d4279 5
a4283 5
     published (not as a draft) by the Free Software Foundation.  If the
     Document does not specify a version number of this License, you may
     choose any version ever published (not as a draft) by the Free
     Software Foundation.  If the Document specifies that a proxy can
     decide which future versions of this License can be used, that
d4287 1
a4287 1
  11. RELICENSING
d4317 1
d4334 1
a4334 1
Texts, replace the "with...Texts."  line with this:
d4345 3
a4347 3
recommend releasing these examples in parallel under your choice of free
software license, such as the GNU General Public License, to permit
their use in free software.
d4377 2
a4378 2
can greatly alter what fraction of the sales price counts as profit.  If
the price you pay is $50, ten percent of the profit is probably less
d4388 2
a4389 2
ports such as adding a new CPU to the GNU Compiler Collection contribute
more; major new features or packages contribute the most.
d4408 19
d4428 1
a4428 18
* Environment Variable <1>:              OMP_DISPLAY_ENV.       (line 6)
* Environment Variable <2>:              OMP_DEFAULT_DEVICE.    (line 6)
* Environment Variable <3>:              OMP_DYNAMIC.           (line 6)
* Environment Variable <4>:              OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable <5>:              OMP_MAX_TASK_PRIORITY. (line 6)
* Environment Variable <6>:              OMP_NESTED.            (line 6)
* Environment Variable <7>:              OMP_NUM_THREADS.       (line 6)
* Environment Variable <8>:              OMP_PROC_BIND.         (line 6)
* Environment Variable <9>:              OMP_PLACES.            (line 6)
* Environment Variable <10>:             OMP_STACKSIZE.         (line 6)
* Environment Variable <11>:             OMP_SCHEDULE.          (line 6)
* Environment Variable <12>:             OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <13>:             OMP_WAIT_POLICY.       (line 6)
* Environment Variable <14>:             GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <15>:             GOMP_DEBUG.            (line 6)
* Environment Variable <16>:             GOMP_STACKSIZE.        (line 6)
* Environment Variable <17>:             GOMP_SPINCOUNT.        (line 6)
* Environment Variable <18>:             GOMP_RTEMS_THREAD_POOLS.
d4430 1
a4430 1
* FDL, GNU Free Documentation License:   GNU Free Documentation License.
d4432 4
a4436 6
* Implementation specific setting <1>:   OMP_NUM_THREADS.       (line 6)
* Implementation specific setting <2>:   OMP_SCHEDULE.          (line 6)
* Implementation specific setting <3>:   GOMP_STACKSIZE.        (line 6)
* Implementation specific setting <4>:   GOMP_SPINCOUNT.        (line 6)
* Implementation specific setting <5>:   GOMP_RTEMS_THREAD_POOLS.
                                                                (line 6)
d4442 131
a4572 131
Node: Top2083
Node: Enabling OpenMP4489
Node: Runtime Library Routines5276
Node: omp_get_active_level8339
Node: omp_get_ancestor_thread_num9039
Node: omp_get_cancellation9969
Node: omp_get_default_device10783
Node: omp_get_dynamic11459
Node: omp_get_level12334
Node: omp_get_max_active_levels12954
Node: omp_get_max_task_priority13659
Node: omp_get_max_threads14279
Node: omp_get_nested15036
Node: omp_get_num_devices15950
Node: omp_get_num_procs16471
Node: omp_get_num_teams17010
Node: omp_get_num_threads17526
Node: omp_get_proc_bind18615
Node: omp_get_schedule19536
Node: omp_get_team_num20490
Node: omp_get_team_size20989
Node: omp_get_thread_limit21949
Node: omp_get_thread_num22568
Node: omp_in_parallel23439
Node: omp_in_final24088
Node: omp_is_initial_device24762
Node: omp_set_default_device25455
Node: omp_set_dynamic26246
Node: omp_set_max_active_levels27132
Node: omp_set_nested27909
Node: omp_set_num_threads28801
Node: omp_set_schedule29669
Node: omp_init_lock30750
Node: omp_set_lock31403
Node: omp_test_lock32258
Node: omp_unset_lock33234
Node: omp_destroy_lock34165
Node: omp_init_nest_lock34842
Node: omp_set_nest_lock35577
Node: omp_test_nest_lock36492
Node: omp_unset_nest_lock37519
Node: omp_destroy_nest_lock38534
Node: omp_get_wtick39285
Node: omp_get_wtime39877
Node: Environment Variables40653
Node: OMP_CANCELLATION42208
Node: OMP_DISPLAY_ENV42741
Node: OMP_DEFAULT_DEVICE43444
Node: OMP_DYNAMIC44224
Node: OMP_MAX_ACTIVE_LEVELS44820
Node: OMP_MAX_TASK_PRIORITY45470
Node: OMP_NESTED46128
Node: OMP_NUM_THREADS46733
Node: OMP_PROC_BIND47421
Node: OMP_PLACES48613
Node: OMP_STACKSIZE50790
Node: OMP_SCHEDULE51614
Node: OMP_THREAD_LIMIT52312
Node: OMP_WAIT_POLICY52912
Node: GOMP_CPU_AFFINITY53604
Node: GOMP_DEBUG55334
Node: GOMP_STACKSIZE55841
Node: GOMP_SPINCOUNT56670
Node: GOMP_RTEMS_THREAD_POOLS57874
Node: Enabling OpenACC60052
Node: OpenACC Runtime Library Routines61045
Node: acc_get_num_devices64839
Node: acc_set_device_type65565
Node: acc_get_device_type66329
Node: acc_set_device_num67044
Node: acc_get_device_num67828
Node: acc_async_test68625
Node: acc_async_test_all69617
Node: acc_wait70517
Node: acc_wait_all71152
Node: acc_wait_all_async71731
Node: acc_wait_async72483
Node: acc_init73190
Node: acc_shutdown73836
Node: acc_on_device74504
Node: acc_malloc75508
Node: acc_free76007
Node: acc_copyin76434
Node: acc_present_or_copyin77544
Node: acc_create79170
Node: acc_present_or_create80325
Node: acc_copyout81959
Node: acc_delete82982
Node: acc_update_device83957
Node: acc_update_self85069
Node: acc_map_data86173
Node: acc_unmap_data86858
Node: acc_deviceptr87379
Node: acc_hostptr87949
Node: acc_is_present88513
Node: acc_memcpy_to_device90040
Node: acc_memcpy_from_device90703
Node: acc_get_current_cuda_device91387
Node: acc_get_current_cuda_context91984
Node: acc_get_cuda_stream92578
Node: acc_set_cuda_stream93134
Node: OpenACC Environment Variables93666
Node: ACC_DEVICE_TYPE94125
Node: ACC_DEVICE_NUM94361
Node: GCC_ACC_NOTIFY94618
Node: CUDA Streams Usage94841
Ref: CUDA Streams Usage-Footnote-196741
Node: OpenACC Library Interoperability96850
Ref: OpenACC Library Interoperability-Footnote-1103206
Ref: OpenACC Library Interoperability-Footnote-2103458
Node: The libgomp ABI103666
Node: Implementing MASTER construct104522
Node: Implementing CRITICAL construct104936
Node: Implementing ATOMIC construct105675
Node: Implementing FLUSH construct106156
Node: Implementing BARRIER construct106427
Node: Implementing THREADPRIVATE construct106696
Node: Implementing PRIVATE clause107349
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses107930
Node: Implementing REDUCTION clause109254
Node: Implementing PARALLEL construct109811
Node: Implementing FOR construct111068
Node: Implementing ORDERED construct113066
Node: Implementing SECTIONS construct113372
Node: Implementing SINGLE construct114138
Node: Implementing OpenACC's PARALLEL construct114850
Node: Reporting Bugs115108
Node: Copying115470
Node: GNU Free Documentation License153017
Node: Funding178140
Node: Library Index180666
@


1.1.1.11
log
@import GCC 7.4.0.  main changes include:

The non-standard C++0x type traits has_trivial_default_constructor,
has_trivial_copy_constructor and has_trivial_copy_assign have been
removed.

On ARM targets (arm*-*-*), a bug introduced in GCC 5 that affects
conformance to the procedure call standard (AAPCS) has been fixed.

Many optimiser improvements

DWARF-5 support.

Many new and enhanced warnings.

Warnings about format strings now underline the pertinent part of
the string, and can offer suggested fixes.

Several new warnings related to buffer overflows and buffer
truncation.

New __builtin_add_overflow_p, __builtin_sub_overflow_p,
__builtin_mul_overflow_p built-ins added that test for overflow.

The C++ front end has experimental support for all of the current
C++17 draft.

The -fverbose-asm option has been expanded to prints comments
showing the source lines that correspond to the assembly.

The gcc and g++ driver programs will now provide suggestions for
misspelled arguments to command-line options.


AArch64 specific:

GCC has been updated to the latest revision of the procedure call
standard (AAPCS64) to provide support for parameter passing when
data types have been over-aligned.

The ARMv8.2-A and ARMv8.3-A architecture are now supported.

ARM specific:

Support for the ARMv5 and ARMv5E architectures has been
deprecated (which have no known implementations).

A new command-line option -mpure-code has been added. It does not
allow constant data to be placed in code sections.

x86 specific:

Support for the AVX-512 4FMAPS, 4VNNIW, VPOPCNTDQ and Software
Guard Extensions (SGX) ISA extensions has been added.

PPC specific:

GCC now diagnoses inline assembly that clobbers register r2.

RISC-V specific:

Support for the RISC-V instruction set has been added.

SH specific:

Support for SH5/SH64 has been removed.

Support for SH2A has been enhanced.
@
text
@d1 2
a2 2
This is libgomp.info, produced by makeinfo version 4.13 from
/space/rguenther/gcc-7.4.0/gcc-7.4.0/libgomp/libgomp.texi.
d4 1
a4 1
Copyright (C) 2006-2017 Free Software Foundation, Inc.
d21 2
a22 3
software.  Copies published by the Free Software Foundation raise
funds for GNU development.

d36 1
a36 1
   Copyright (C) 2006-2017 Free Software Foundation, Inc.
d53 2
a54 2
software.  Copies published by the Free Software Foundation raise
funds for GNU development.
d62 5
a66 5
This manual documents the usage of libgomp, the GNU Offloading and
Multi Processing Runtime Library.  This includes the GNU implementation
of the OpenMP (http://www.openmp.org) Application Programming Interface
(API) for multi-platform shared-memory parallel programming in C/C++
and Fortran, and the GNU implementation of the OpenACC
d110 10
a119 11
compile-time flag `-fopenmp' must be specified.  This enables the
OpenMP directive `#pragma omp' in C/C++ and `!$omp' directives in free
form, `c$omp', `*$omp' and `!$omp' directives in fixed form, `!$'
conditional compilation sentinels in free form and `c$', `*$' and `!$'
sentinels in fixed form, for Fortran.  The flag also arranges for
automatic linking of the OpenMP runtime library (*note Runtime Library
Routines::).

   A complete description of all OpenMP directives accepted may be
found in the OpenMP Application Program Interface
(http://www.openmp.org) manual, version 4.5.
d187 1
a187 1
2.1 `omp_get_active_level' - Number of parallel regions
d195 1
a195 1
     _Prototype_:  `int omp_get_active_level(void);'
d198 1
a198 1
     _Interface_:  `integer function omp_get_active_level()'
d210 1
a210 1
2.2 `omp_get_ancestor_thread_num' - Ancestor thread ID
d216 2
a217 2
     outside zero to `omp_get_level' -1 is returned; if LEVEL is
     `omp_get_level' the result is identical to `omp_get_thread_num'.
d220 1
a220 1
     _Prototype_:  `int omp_get_ancestor_thread_num(int level);'
d223 2
a224 2
     _Interface_:  `integer function omp_get_ancestor_thread_num(level)'
                   `integer level'
d236 1
a236 1
2.3 `omp_get_cancellation' - Whether cancellation support is enabled
d240 3
a242 3
     This function returns `true' if cancellation is activated, `false'
     otherwise.  Here, `true' and `false' represent their
     language-specific counterparts.  Unless `OMP_CANCELLATION' is set
d246 1
a246 1
     _Prototype_:  `int omp_get_cancellation(void);'
d249 1
a249 1
     _Interface_:  `logical function omp_get_cancellation()'
d260 1
a260 1
2.4 `omp_get_default_device' - Get the default device for target regions
d267 1
a267 1
     _Prototype_:  `int omp_get_default_device(void);'
d270 1
a270 1
     _Interface_:  `integer function omp_get_default_device()'
d281 1
a281 1
2.5 `omp_get_dynamic' - Dynamic teams setting
d285 2
a286 2
     This function returns `true' if enabled, `false' otherwise.  Here,
     `true' and `false' represent their language-specific counterparts.
d289 3
a291 3
     `OMP_DYNAMIC' environment variable or at runtime using
     `omp_set_dynamic'.  If undefined, dynamic adjustment is disabled
     by default.
d294 1
a294 1
     _Prototype_:  `int omp_get_dynamic(void);'
d297 1
a297 1
     _Interface_:  `logical function omp_get_dynamic()'
d308 1
a308 1
2.6 `omp_get_level' - Obtain the current nesting level
d316 1
a316 1
     _Prototype_:  `int omp_get_level(void);'
d319 1
a319 1
     _Interface_:  `integer function omp_level()'
d330 1
a330 1
2.7 `omp_get_max_active_levels' - Maximum number of active regions
d338 1
a338 1
     _Prototype_:  `int omp_get_max_active_levels(void);'
d341 1
a341 1
     _Interface_:  `integer function omp_get_max_active_levels()'
d352 1
a352 1
2.8 `omp_get_max_task_priority' - Maximum priority value
d361 1
a361 1
     _Prototype_:  `int omp_get_max_task_priority(void);'
d364 1
a364 1
     _Interface_:  `integer function omp_get_max_task_priority()'
d372 1
a372 1
2.9 `omp_get_max_threads' - Maximum number of threads of parallel region
d377 1
a377 1
     region that does not use the clause `num_threads'.
d380 1
a380 1
     _Prototype_:  `int omp_get_max_threads(void);'
d383 1
a383 1
     _Interface_:  `integer function omp_get_max_threads()'
d395 1
a395 1
2.10 `omp_get_nested' - Nested parallel regions
d399 2
a400 2
     This function returns `true' if nested parallel regions are
     enabled, `false' otherwise.  Here, `true' and `false' represent
d404 2
a405 2
     `OMP_NESTED' environment variable or at runtime using
     `omp_set_nested'.  If undefined, nested parallel regions are
d409 1
a409 1
     _Prototype_:  `int omp_get_nested(void);'
d412 1
a412 1
     _Interface_:  `logical function omp_get_nested()'
d423 1
a423 1
2.11 `omp_get_num_devices' - Number of target devices
d430 1
a430 1
     _Prototype_:  `int omp_get_num_devices(void);'
d433 1
a433 1
     _Interface_:  `integer function omp_get_num_devices()'
d441 1
a441 1
2.12 `omp_get_num_procs' - Number of processors online
d448 1
a448 1
     _Prototype_:  `int omp_get_num_procs(void);'
d451 1
a451 1
     _Interface_:  `integer function omp_get_num_procs()'
d459 1
a459 1
2.13 `omp_get_num_teams' - Number of teams
d466 1
a466 1
     _Prototype_:  `int omp_get_num_teams(void);'
d469 1
a469 1
     _Interface_:  `integer function omp_get_num_teams()'
d477 1
a477 1
2.14 `omp_get_num_threads' - Size of the active team
d481 2
a482 2
     Returns the number of threads in the current team.  In a
     sequential section of the program `omp_get_num_threads' returns 1.
d485 5
a489 5
     `OMP_NUM_THREADS' environment variable.  At runtime, the size of
     the current team may be set either by the `NUM_THREADS' clause or
     by `omp_set_num_threads'.  If none of the above were used to
     define a specific value and `OMP_DYNAMIC' is disabled, one thread
     per CPU online is used.
d492 1
a492 1
     _Prototype_:  `int omp_get_num_threads(void);'
d495 1
a495 1
     _Interface_:  `integer function omp_get_num_threads()'
d507 1
a507 1
2.15 `omp_get_proc_bind' - Whether theads may be moved between CPUs
d511 5
a515 5
     This functions returns the currently active thread affinity
     policy, which is set via `OMP_PROC_BIND'.  Possible values are
     `omp_proc_bind_false', `omp_proc_bind_true',
     `omp_proc_bind_master', `omp_proc_bind_close' and
     `omp_proc_bind_spread'.
d518 1
a518 1
     _Prototype_:  `omp_proc_bind_t omp_get_proc_bind(void);'
d521 2
a522 2
     _Interface_:  `integer(kind=omp_proc_bind_kind) function
                   omp_get_proc_bind()'
d534 1
a534 1
2.16 `omp_get_schedule' - Obtain the runtime scheduling method
d539 2
a540 2
     set to the value `omp_sched_static', `omp_sched_dynamic',
     `omp_sched_guided' or `omp_sched_auto'.  The second argument,
d544 2
a545 2
     _Prototype_:  `void omp_get_schedule(omp_sched_t *kind, int
                   *chunk_size);'
d548 3
a550 3
     _Interface_:  `subroutine omp_get_schedule(kind, chunk_size)'
                   `integer(kind=omp_sched_kind) kind'
                   `integer chunk_size'
d561 1
a561 1
2.17 `omp_get_team_num' - Get team number
d568 1
a568 1
     _Prototype_:  `int omp_get_team_num(void);'
d571 1
a571 1
     _Interface_:  `integer function omp_get_team_num()'
d579 1
a579 1
2.18 `omp_get_team_size' - Number of threads in a team
d585 3
a587 3
     values of LEVEL outside zero to `omp_get_level', -1 is returned;
     if LEVEL is zero, 1 is returned, and for `omp_get_level', the
     result is identical to `omp_get_num_threads'.
d590 1
a590 1
     _Prototype_:  `int omp_get_team_size(int level);'
d593 2
a594 2
     _Interface_:  `integer function omp_get_team_size(level)'
                   `integer level'
d606 1
a606 1
2.19 `omp_get_thread_limit' - Maximum number of threads
d613 1
a613 1
     _Prototype_:  `int omp_get_thread_limit(void);'
d616 1
a616 1
     _Interface_:  `integer function omp_get_thread_limit()'
d627 1
a627 1
2.20 `omp_get_thread_num' - Current thread ID
d632 4
a635 4
     team.  In a sequential parts of the program, `omp_get_thread_num'
     always returns 0.  In parallel regions the return value varies
     from 0 to `omp_get_num_threads'-1 inclusive.  The return value of
     the master thread of a team is always 0.
d638 1
a638 1
     _Prototype_:  `int omp_get_thread_num(void);'
d641 1
a641 1
     _Interface_:  `integer function omp_get_thread_num()'
d652 1
a652 1
2.21 `omp_in_parallel' - Whether a parallel region is active
d656 2
a657 2
     This function returns `true' if currently running in parallel,
     `false' otherwise.  Here, `true' and `false' represent their
d661 1
a661 1
     _Prototype_:  `int omp_in_parallel(void);'
d664 1
a664 1
     _Interface_:  `logical function omp_in_parallel()'
d672 1
a672 1
2.22 `omp_in_final' - Whether in final or included task region
d676 2
a677 2
     This function returns `true' if currently running in a final or
     included task region, `false' otherwise.  Here, `true' and `false'
d681 1
a681 1
     _Prototype_:  `int omp_in_final(void);'
d684 1
a684 1
     _Interface_:  `logical function omp_in_final()'
d692 1
a692 1
2.23 `omp_is_initial_device' - Whether executing on the host device
d696 2
a697 2
     This function returns `true' if currently running on the host
     device, `false' otherwise.  Here, `true' and `false' represent
d701 1
a701 1
     _Prototype_:  `int omp_is_initial_device(void);'
d704 1
a704 1
     _Interface_:  `logical function omp_is_initial_device()'
d712 1
a712 1
2.24 `omp_set_default_device' - Set the default device for target regions
d720 1
a720 1
     _Prototype_:  `void omp_set_default_device(int device_num);'
d723 2
a724 2
     _Interface_:  `subroutine omp_set_default_device(device_num)'
                   `integer device_num'
d735 1
a735 1
2.25 `omp_set_dynamic' - Enable/disable dynamic teams
d741 2
a742 2
     of `true' and `false', where `true' enables dynamic adjustment of
     team sizes and `false' disables it.
d745 1
a745 1
     _Prototype_:  `void omp_set_dynamic(int dynamic_threads);'
d748 2
a749 2
     _Interface_:  `subroutine omp_set_dynamic(dynamic_threads)'
                   `logical, intent(in) :: dynamic_threads'
d760 1
a760 1
2.26 `omp_set_max_active_levels' - Limits the number of active parallel regions
d768 1
a768 1
     _Prototype_:  `void omp_set_max_active_levels(int max_levels);'
d771 2
a772 2
     _Interface_:  `subroutine omp_set_max_active_levels(max_levels)'
                   `integer max_levels'
d783 1
a783 1
2.27 `omp_set_nested' - Enable/disable nested parallel regions
d789 2
a790 2
     language-specific equivalent of `true' and `false', where `true'
     enables dynamic adjustment of team sizes and `false' disables it.
d793 1
a793 1
     _Prototype_:  `void omp_set_nested(int nested);'
d796 2
a797 2
     _Interface_:  `subroutine omp_set_nested(nested)'
                   `logical, intent(in) :: nested'
d808 1
a808 1
2.28 `omp_set_num_threads' - Set upper team size limit
d813 2
a814 2
     parallel sections, if those do not specify a `num_threads' clause.
     The argument of `omp_set_num_threads' shall be a positive integer.
d817 1
a817 1
     _Prototype_:  `void omp_set_num_threads(int num_threads);'
d820 2
a821 2
     _Interface_:  `subroutine omp_set_num_threads(num_threads)'
                   `integer, intent(in) :: num_threads'
d833 1
a833 1
2.29 `omp_set_schedule' - Set the runtime scheduling method
d838 2
a839 2
     value `omp_sched_static', `omp_sched_dynamic', `omp_sched_guided'
     or `omp_sched_auto'.  Except for `omp_sched_auto', the chunk size
d841 1
a841 1
     value if zero or negative.  For `omp_sched_auto' the CHUNK_SIZE
d845 2
a846 2
     _Prototype_:  `void omp_set_schedule(omp_sched_t kind, int
                   chunk_size);'
d849 3
a851 3
     _Interface_:  `subroutine omp_set_schedule(kind, chunk_size)'
                   `integer(kind=omp_sched_kind) kind'
                   `integer chunk_size'
d862 1
a862 1
2.30 `omp_init_lock' - Initialize simple lock
d870 1
a870 1
     _Prototype_:  `void omp_init_lock(omp_lock_t *lock);'
d873 2
a874 2
     _Interface_:  `subroutine omp_init_lock(svar)'
                   `integer(omp_lock_kind), intent(out) :: svar'
d885 1
a885 1
2.31 `omp_set_lock' - Wait for and set simple lock
d889 4
a892 4
     Before setting a simple lock, the lock variable must be
     initialized by `omp_init_lock'.  The calling thread is blocked
     until the lock is available.  If the lock is already held by the
     current thread, a deadlock occurs.
d895 1
a895 1
     _Prototype_:  `void omp_set_lock(omp_lock_t *lock);'
d898 2
a899 2
     _Interface_:  `subroutine omp_set_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d911 1
a911 1
2.32 `omp_test_lock' - Test and set simple lock if available
d915 5
a919 5
     Before setting a simple lock, the lock variable must be
     initialized by `omp_init_lock'.  Contrary to `omp_set_lock',
     `omp_test_lock' does not block if the lock is not available.  This
     function returns `true' upon success, `false' otherwise.  Here,
     `true' and `false' represent their language-specific counterparts.
d922 1
a922 1
     _Prototype_:  `int omp_test_lock(omp_lock_t *lock);'
d925 2
a926 2
     _Interface_:  `logical function omp_test_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d937 1
a937 1
2.33 `omp_unset_lock' - Unset simple lock
d942 4
a945 4
     `omp_set_lock' or `omp_test_lock' before.  In addition, the lock
     must be held by the thread calling `omp_unset_lock'.  Then, the
     lock becomes unlocked.  If one or more threads attempted to set
     the lock before, one of them is chosen to, again, set the lock to
d949 1
a949 1
     _Prototype_:  `void omp_unset_lock(omp_lock_t *lock);'
d952 2
a953 2
     _Interface_:  `subroutine omp_unset_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d964 1
a964 1
2.34 `omp_destroy_lock' - Destroy simple lock
d972 1
a972 1
     _Prototype_:  `void omp_destroy_lock(omp_lock_t *lock);'
d975 2
a976 2
     _Interface_:  `subroutine omp_destroy_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d987 1
a987 1
2.35 `omp_init_nest_lock' - Initialize nested lock
d995 1
a995 1
     _Prototype_:  `void omp_init_nest_lock(omp_nest_lock_t *lock);'
d998 2
a999 2
     _Interface_:  `subroutine omp_init_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(out) :: nvar'
d1010 1
a1010 1
2.36 `omp_set_nest_lock' - Wait for and set nested lock
d1014 4
a1017 5
     Before setting a nested lock, the lock variable must be
     initialized by `omp_init_nest_lock'.  The calling thread is
     blocked until the lock is available.  If the lock is already held
     by the current thread, the nesting count for the lock is
     incremented.
d1020 1
a1020 1
     _Prototype_:  `void omp_set_nest_lock(omp_nest_lock_t *lock);'
d1023 2
a1024 2
     _Interface_:  `subroutine omp_set_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1035 1
a1035 1
2.37 `omp_test_nest_lock' - Test and set nested lock if available
d1039 5
a1043 6
     Before setting a nested lock, the lock variable must be
     initialized by `omp_init_nest_lock'.  Contrary to
     `omp_set_nest_lock', `omp_test_nest_lock' does not block if the
     lock is not available.  If the lock is already held by the current
     thread, the new nesting count is returned.  Otherwise, the return
     value equals zero.
d1046 1
a1046 1
     _Prototype_:  `int omp_test_nest_lock(omp_nest_lock_t *lock);'
d1049 2
a1050 2
     _Interface_:  `logical function omp_test_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1061 1
a1061 1
2.38 `omp_unset_nest_lock' - Unset nested lock
d1066 1
a1066 1
     `omp_set_nested_lock' or `omp_test_nested_lock' before.  In
d1068 1
a1068 1
     `omp_unset_nested_lock'.  If the nesting count drops to zero, the
d1074 1
a1074 1
     _Prototype_:  `void omp_unset_nest_lock(omp_nest_lock_t *lock);'
d1077 2
a1078 2
     _Interface_:  `subroutine omp_unset_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1089 1
a1089 1
2.39 `omp_destroy_nest_lock' - Destroy nested lock
d1098 1
a1098 1
     _Prototype_:  `void omp_destroy_nest_lock(omp_nest_lock_t *);'
d1101 2
a1102 2
     _Interface_:  `subroutine omp_destroy_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1113 1
a1113 1
2.40 `omp_get_wtick' - Get timer precision
d1121 1
a1121 1
     _Prototype_:  `double omp_get_wtick(void);'
d1124 1
a1124 1
     _Interface_:  `double precision function omp_get_wtick()'
d1135 1
a1135 1
2.41 `omp_get_wtime' - Elapsed wall clock time
d1146 1
a1146 1
     _Prototype_:  `double omp_get_wtime(void);'
d1149 1
a1149 1
     _Interface_:  `double precision function omp_get_wtime()'
d1163 1
a1163 1
The environment variables which beginning with `OMP_' are defined by
d1165 1
a1165 1
beginning with `GOMP_' are GNU extensions.
d1192 1
a1192 1
3.1 `OMP_CANCELLATION' - Set whether cancellation is activated
d1196 3
a1198 3
     If set to `TRUE', the cancellation is activated.  If set to
     `FALSE' or if unset, cancellation is disabled and the `cancel'
     construct is ignored.
d1209 1
a1209 1
3.2 `OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
d1213 1
a1213 1
     If set to `TRUE', the OpenMP version number and the values
d1215 1
a1215 1
     `stderr'.  If set to `VERBOSE', it additionally shows the value of
d1217 1
a1217 1
     or set to `FALSE', this information will not be shown.
d1225 1
a1225 1
3.3 `OMP_DEFAULT_DEVICE' - Set the device used in target regions
d1229 5
a1233 5
     Set to choose the device which is used in a `target' region,
     unless the value is overridden by `omp_set_default_device' or by a
     `device' clause.  The value shall be the nonnegative device
     number. If no device with the given device number exists, the code
     is executed on the host.  If unset, device number 0 will be used.
d1244 1
a1244 1
3.4 `OMP_DYNAMIC' - Dynamic adjustment of threads
d1250 2
a1251 2
     `TRUE' or `FALSE'.  If undefined, dynamic adjustment is disabled
     by default.
d1262 1
a1262 1
3.5 `OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1279 1
a1279 1
3.6 `OMP_MAX_TASK_PRIORITY' - Set the maximum priority
d1282 1
a1282 1
number that can be set for a task.  
d1284 2
a1285 2
     Specifies the initial value for the maximum priority value that
     can be set for a task.  The value of this variable shall be a
d1298 1
a1298 1
3.7 `OMP_NESTED' - Nested parallel regions
d1304 1
a1304 1
     environment variable shall be `TRUE' or `FALSE'.  If undefined,
d1316 1
a1316 1
3.8 `OMP_NUM_THREADS' - Specifies the number of threads to use
d1320 5
a1324 5
     Specifies the default number of threads to use in parallel
     regions.  The value of this variable shall be a comma-separated
     list of positive integers; the value specified the number of
     threads to use for the corresponding nested level.  If undefined
     one thread per CPU is used.
d1335 1
a1335 1
3.9 `OMP_PROC_BIND' - Whether theads may be moved between CPUs
d1340 1
a1340 1
     to `TRUE', OpenMP theads should not be moved; if set to `FALSE'
d1342 1
a1342 1
     values `MASTER', `CLOSE' and `SPREAD' can be used to specify the
d1344 3
a1346 3
     `MASTER' the worker threads are in the same place partition as the
     master thread.  With `CLOSE' those are kept close to the master
     thread in contiguous place partitions.  And with `SPREAD' a sparse
d1349 2
a1350 2
     When undefined, `OMP_PROC_BIND' defaults to `TRUE' when
     `OMP_PLACES' or `GOMP_CPU_AFFINITY' is set and `FALSE' otherwise.
d1362 1
a1362 1
3.10 `OMP_PLACES' - Specifies on which CPUs the theads should be placed
d1366 3
a1368 3
     The thread placement can be either specified using an abstract
     name or by an explicit list of the places.  The abstract names
     `threads', `cores' and `sockets' can be optionally followed by a
d1370 3
a1372 3
     shall be created.  With `threads' each place corresponds to a
     single hardware thread; `cores' to a single core with the
     corresponding number of hardware threads; and with `sockets' the
d1374 1
a1374 1
     be shown by setting the `OMP_DISPLAY_ENV' environment variable.
d1387 2
a1388 2
     specifies the same places list: `"{0,1,2}, {3,4,6}, {7,8,9},
     {10,11,12}"'; `"{0:3}, {3:3}, {7:3}, {10:3}"'; and `"{0:2}:4:3"'.
d1390 2
a1391 2
     If `OMP_PLACES' and `GOMP_CPU_AFFINITY' are unset and
     `OMP_PROC_BIND' is either unset or `false', threads may be moved
d1404 1
a1404 1
3.11 `OMP_STACKSIZE' - Set default thread stack size
d1409 7
a1415 7
     is suffixed by `B', `K', `M' or `G', in which case the size is,
     respectively, in bytes, kilobytes, megabytes or gigabytes.  This
     is different from `pthread_attr_setstacksize' which gets the
     number of bytes as an argument.  If the stack size cannot be set
     due to system constraints, an error is reported and the initial
     stack size is left unchanged.  If undefined, the stack size is
     system dependent.
d1423 1
a1423 1
3.12 `OMP_SCHEDULE' - How threads are scheduled
d1427 5
a1431 5
     Allows to specify `schedule type' and `chunk size'.  The value of
     the variable shall have the form: `type[,chunk]' where `type' is
     one of `static', `dynamic', `guided' or `auto' The optional
     `chunk' size shall be a positive integer.  If undefined, dynamic
     scheduling and a chunk size of 1 is used.
d1443 1
a1443 1
3.13 `OMP_THREAD_LIMIT' - Set the maximum number of threads
d1460 1
a1460 1
3.14 `OMP_WAIT_POLICY' - How waiting threads are handled
d1465 2
a1466 2
     the value is `PASSIVE', waiting threads should not consume CPU
     power while waiting; while the value is `ACTIVE' specifies that
d1479 1
a1479 1
3.15 `GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d1487 2
a1488 2
     (M-N:S).  CPU numbers are zero based.  For example,
     `GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
d1492 1
a1492 1
     beginning of the list.  `GOMP_CPU_AFFINITY=0' binds all threads to
d1497 10
a1506 10
     language-specific library functions, e.g., `getenv' in C or
     `GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
     setting of the `GOMP_CPU_AFFINITY' environment variable.  A
     defined CPU affinity on startup cannot be changed or disabled
     during the runtime of the application.

     If both `GOMP_CPU_AFFINITY' and `OMP_PROC_BIND' are set,
     `OMP_PROC_BIND' has a higher precedence.  If neither has been set
     and `OMP_PROC_BIND' is unset, or when `OMP_PROC_BIND' is set to
     `FALSE', the host system will handle the assignment of threads to
d1515 1
a1515 1
3.16 `GOMP_DEBUG' - Enable debugging output
d1519 2
a1520 2
     Enable debugging output.  The variable should be set to `0'
     (disabled, also the default if not set), or `1' (enabled).
d1529 1
a1529 1
3.17 `GOMP_STACKSIZE' - Set default thread stack size
d1534 1
a1534 1
     from `pthread_attr_setstacksize' which gets the number of bytes as
d1551 1
a1551 1
3.18 `GOMP_SPINCOUNT' - Set the busy-wait spin count
d1557 1
a1557 1
     value may be either `INFINITE', `INFINITY' to always wait actively
d1560 8
a1567 9
     suffixes acting as multiplication factors: `k' (kilo, thousand),
     `M' (mega, million), `G' (giga, billion), or `T' (tera, trillion).
     If undefined, 0 is used when `OMP_WAIT_POLICY' is `PASSIVE',
     300,000 is used when `OMP_WAIT_POLICY' is undefined and 30 billion
     is used when `OMP_WAIT_POLICY' is `ACTIVE'.  If there are more
     OpenMP threads than available CPUs, 1000 and 100 spins are used
     for `OMP_WAIT_POLICY' being `ACTIVE' or undefined, respectively;
     unless the `GOMP_SPINCOUNT' is lower or `OMP_WAIT_POLICY' is
     `PASSIVE'.
d1575 1
a1575 1
3.19 `GOMP_RTEMS_THREAD_POOLS' - Set the RTEMS specific thread pools
d1581 4
a1584 4
     thread pools.  The format for `GOMP_RTEMS_THREAD_POOLS' is a list
     of optional `<thread-pool-count>[$<priority>]@@<scheduler-name>'
     configurations separated by `:' where:
        * `<thread-pool-count>' is the thread pool count for this
d1586 2
a1587 3

        * `$<priority>' is an optional priority for the worker threads
          of a thread pool according to `pthread_setschedparam'.  In
d1593 1
a1593 2

        * `@@<scheduler-name>' is the scheduler instance name according
d1596 4
a1599 5
     instance, then each OpenMP master thread of this scheduler
     instance will use its own dynamically allocated thread pool.  To
     limit the worker thread count of the thread pools, each OpenMP
     master thread must call `omp_set_num_threads'.

d1601 2
a1602 2
     Lets suppose we have three scheduler instances `IO', `WRK0', and
     `WRK1' with `GOMP_RTEMS_THREAD_POOLS' set to `"1@@WRK0:3$4@@WRK1"'.
d1604 1
a1604 1
     `IO'.  In the scheduler instance `WRK0' there is one thread pool
d1607 3
a1609 3
     master thread that created it.  In the scheduler instance `WRK1'
     there are three thread pools available and their worker threads
     run at priority four.
d1618 4
a1621 4
compile-time flag `-fopenacc' must be specified.  This enables the
OpenACC directive `#pragma acc' in C/C++ and `!$accp' directives in
free form, `c$acc', `*$acc' and `!$acc' directives in fixed form, `!$'
conditional compilation sentinels in free form and `c$', `*$' and `!$'
d1631 2
a1632 2
future versions of GCC.  See `https://gcc.gnu.org/wiki/OpenACC' for
more information.
d1642 3
a1644 3
throw exceptions.  Generally, they are available only for the host,
with the exception of `acc_on_device', which is available for both the
host and the acceleration device.
d1707 1
a1707 1
5.1 `acc_get_num_devices' - Get number of devices for given device type
d1715 1
a1715 1
     _Prototype_:  `int acc_get_num_devices(acc_device_t devicetype);'
d1718 2
a1719 2
     _Interface_:  `integer function acc_get_num_devices(devicetype)'
                   `integer(kind=acc_device_kind) devicetype'
d1728 1
a1728 1
5.2 `acc_set_device_type' - Set type of device accelerator to use.
d1737 1
a1737 1
     _Prototype_:  `acc_set_device_type(acc_device_t devicetype);'
d1740 2
a1741 2
     _Interface_:  `subroutine acc_set_device_type(devicetype)'
                   `integer(kind=acc_device_kind) devicetype'
d1750 1
a1750 1
5.3 `acc_get_device_type' - Get type of device accelerator to be used.
d1758 1
a1758 1
     _Prototype_:  `acc_device_t acc_get_device_type(void);'
d1761 2
a1762 2
     _Interface_:  `function acc_get_device_type(void)'
                   `integer(kind=acc_device_kind) acc_get_device_type'
d1771 1
a1771 1
5.4 `acc_set_device_num' - Set device number to use.
d1780 1
a1780 2
     _Prototype_:  `acc_set_device_num(int num, acc_device_t
                   devicetype);'
d1783 3
a1785 3
     _Interface_:  `subroutine acc_set_device_num(devicenum, devicetype)'
                   `integer devicenum'
                   `integer(kind=acc_device_kind) devicetype'
d1794 1
a1794 1
5.5 `acc_get_device_num' - Get device number to be used.
d1803 1
a1803 1
     _Prototype_:  `int acc_get_device_num(acc_device_t devicetype);'
d1806 3
a1808 3
     _Interface_:  `function acc_get_device_num(devicetype)'
                   `integer(kind=acc_device_kind) devicetype'
                   `integer acc_get_device_num'
d1817 1
a1817 1
5.6 `acc_async_test' - Test for completion of a specific asynchronous operation.
d1822 4
a1825 4
     specified in ARG. In C/C++, a non-zero value will be returned to
     indicate the specified asynchronous operation has completed. While
     Fortran will return a `true'. If the asynchrounous operation has
     not completed, C/C++ returns a zero and Fortran returns a `false'.
d1828 1
a1828 1
     _Prototype_:  `int acc_async_test(int arg);'
d1831 3
a1833 3
     _Interface_:  `function acc_async_test(arg)'
                   `integer(kind=acc_handle_kind) arg'
                   `logical acc_async_test'
d1842 1
a1842 1
5.7 `acc_async_test_all' - Tests for completion of all asynchronous operations.
d1848 3
a1850 3
     asynchronous operations have completed. While Fortran will return
     a `true'. If any asynchronous operation has not completed, C/C++
     returns a zero and Fortran returns a `false'.
d1853 1
a1853 1
     _Prototype_:  `int acc_async_test_all(void);'
d1856 2
a1857 2
     _Interface_:  `function acc_async_test()'
                   `logical acc_get_device_num'
d1866 1
a1866 1
5.8 `acc_wait' - Wait for completion of a specific asynchronous operation.
d1874 1
a1874 1
     _Prototype_:  `acc_wait(arg);'
d1877 2
a1878 2
     _Interface_:  `subroutine acc_wait(arg)'
                   `integer(acc_handle_kind) arg'
d1887 1
a1887 1
5.9 `acc_wait_all' - Waits for completion of all asynchronous operations.
d1895 1
a1895 1
     _Prototype_:  `acc_wait_all(void);'
d1898 1
a1898 1
     _Interface_:  `subroutine acc_wait_async()'
d1907 1
a1907 1
5.10 `acc_wait_all_async' - Wait for completion of all asynchronous operations.
d1916 1
a1916 1
     _Prototype_:  `acc_wait_all_async(int async);'
d1919 2
a1920 2
     _Interface_:  `subroutine acc_wait_all_async(async)'
                   `integer(acc_handle_kind) async'
d1929 1
a1929 1
5.11 `acc_wait_async' - Wait for completion of asynchronous operations.
d1937 1
a1937 1
     _Prototype_:  `acc_wait_async(int arg, int async);'
d1940 2
a1941 2
     _Interface_:  `subroutine acc_wait_async(arg, async)'
                   `integer(acc_handle_kind) arg, async'
d1950 1
a1950 1
5.12 `acc_init' - Initialize runtime for a specific device type.
d1954 2
a1955 2
     This function initializes the runtime for the device type
     specified in DEVICETYPE.
d1958 1
a1958 1
     _Prototype_:  `acc_init(acc_device_t devicetype);'
d1961 2
a1962 2
     _Interface_:  `subroutine acc_init(devicetype)'
                   `integer(acc_device_kind) devicetype'
d1971 1
a1971 1
5.13 `acc_shutdown' - Shuts down the runtime for a specific device type.
d1979 1
a1979 1
     _Prototype_:  `acc_shutdown(acc_device_t devicetype);'
d1982 2
a1983 2
     _Interface_:  `subroutine acc_shutdown(devicetype)'
                   `integer(acc_device_kind) devicetype'
d1992 1
a1992 1
5.14 `acc_on_device' - Whether executing on a particular device
d1997 1
a1997 1
     particular device specified in DEVICETYPE. In C/C++ a non-zero
d1999 1
a1999 1
     specified device type.  In Fortran, `true' will be returned. If
d2001 1
a2001 1
     will return a zero, while Fortran will return `false'.
d2004 1
a2004 1
     _Prototype_:  `acc_on_device(acc_device_t devicetype);'
d2007 3
a2009 3
     _Interface_:  `function acc_on_device(devicetype)'
                   `integer(acc_device_kind) devicetype'
                   `logical acc_on_device'
d2018 1
a2018 1
5.15 `acc_malloc' - Allocate device memory.
d2022 1
a2022 1
     This function allocates LEN bytes of device memory. It returns the
d2026 1
a2026 1
     _Prototype_:  `d_void* acc_malloc(size_t len);'
d2035 1
a2035 1
5.16 `acc_free' - Free device memory.
d2039 1
a2039 1
     Free previously allocated device memory at the device address `a'.
d2042 1
a2042 1
     _Prototype_:  `acc_free(d_void *a);'
d2051 1
a2051 1
5.17 `acc_copyin' - Allocate device memory and copy host memory to it.
d2056 1
a2056 1
     maps it to the specified host address in A. The device address of
d2059 3
a2061 3
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies a
     variable or array element and LEN specifies the length in bytes.
d2064 1
a2064 1
     _Prototype_:  `void *acc_copyin(h_void *a, size_t len);'
d2067 5
a2071 5
     _Interface_:  `subroutine acc_copyin(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_copyin(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2080 1
a2080 1
5.18 `acc_present_or_copyin' - If the data is not present on the device, allocate device memory and copy from host memory.
d2085 3
a2087 3
     LEN is present or not. If it is not present, then device memory
     will be allocated and the host memory copied. The device address of
     the newly allocated device memory is returned.
d2089 2
a2090 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2094 2
a2095 2
     _Prototype_:  `void *acc_present_or_copyin(h_void *a, size_t len);'
     _Prototype_:  `void *acc_pcopyin(h_void *a, size_t len);'
d2098 10
a2107 10
     _Interface_:  `subroutine acc_present_or_copyin(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_present_or_copyin(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
     _Interface_:  `subroutine acc_pcopyin(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_pcopyin(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2116 1
a2116 1
5.19 `acc_create' - Allocate device memory and map it to host memory.
d2121 1
a2121 1
     specified by the host address A with a length of LEN bytes. In
d2125 2
a2126 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2130 1
a2130 1
     _Prototype_:  `void *acc_create(h_void *a, size_t len);'
d2133 5
a2137 5
     _Interface_:  `subroutine acc_create(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_create(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2146 1
a2146 1
5.20 `acc_present_or_create' - If the data is not present on the device, allocate device memory and map it to host memory.
d2151 2
a2152 2
     LEN is present or not. If it is not present, then device memory
     will be allocated and mapped to host memory. In C/C++, the device
d2155 2
a2156 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2160 2
a2161 2
     _Prototype_:  `void *acc_present_or_create(h_void *a, size_t len)'
     _Prototype_:  `void *acc_pcreate(h_void *a, size_t len)'
d2164 10
a2173 10
     _Interface_:  `subroutine acc_present_or_create(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_present_or_create(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
     _Interface_:  `subroutine acc_pcreate(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_pcreate(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2182 1
a2182 1
5.21 `acc_copyout' - Copy device memory to host memory.
d2189 2
a2190 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2194 1
a2194 1
     _Prototype_:  `acc_copyout(h_void *a, size_t len);'
d2197 5
a2201 5
     _Interface_:  `subroutine acc_copyout(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_copyout(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2210 1
a2210 1
5.22 `acc_delete' - Free device memory.
d2217 2
a2218 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2222 1
a2222 1
     _Prototype_:  `acc_delete(h_void *a, size_t len);'
d2225 5
a2229 5
     _Interface_:  `subroutine acc_delete(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_delete(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2238 1
a2238 1
5.23 `acc_update_device' - Update device memory from mapped host memory.
d2246 2
a2247 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2251 1
a2251 1
     _Prototype_:  `acc_update_device(h_void *a, size_t len);'
d2254 5
a2258 5
     _Interface_:  `subroutine acc_update_device(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_update_device(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2267 1
a2267 1
5.24 `acc_update_self' - Update host memory from mapped device memory.
d2275 2
a2276 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2280 1
a2280 1
     _Prototype_:  `acc_update_self(h_void *a, size_t len);'
d2283 5
a2287 5
     _Interface_:  `subroutine acc_update_self(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_update_self(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2296 1
a2296 1
5.25 `acc_map_data' - Map previously allocated device memory to host memory.
d2301 1
a2301 1
     The device memory is specified with the device address D. The host
d2305 1
a2305 1
     _Prototype_:  `acc_map_data(h_void *h, d_void *d, size_t len);'
d2314 1
a2314 1
5.26 `acc_unmap_data' - Unmap device memory from host memory.
d2318 1
a2318 1
     This function unmaps previously mapped device and host memory. The
d2322 1
a2322 1
     _Prototype_:  `acc_unmap_data(h_void *h);'
d2331 1
a2331 1
5.27 `acc_deviceptr' - Get device pointer associated with specific host address.
d2339 1
a2339 1
     _Prototype_:  `void *acc_deviceptr(h_void *h);'
d2348 1
a2348 1
5.28 `acc_hostptr' - Get host pointer associated with specific device address.
d2356 1
a2356 1
     _Prototype_:  `void *acc_hostptr(d_void *d);'
d2365 1
a2365 1
5.29 `acc_is_present' - Indicate whether host variable / array is present on device.
d2369 2
a2370 2
     This function indicates whether the specified host address in A
     and a length of LEN bytes is present on the device. In C/C++, a
d2372 1
a2372 1
     memory on the device. A zero is returned to indicate the memory is
d2375 2
a2376 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2378 2
a2379 2
     If the host memory is mapped to device memory, then a `true' is
     returned. Otherwise, a `false' is return to indicate the mapped
d2383 1
a2383 1
     _Prototype_:  `int acc_is_present(h_void *a, size_t len);'
d2386 7
a2392 7
     _Interface_:  `function acc_is_present(a)'
                   `type, dimension(:[,:]...) :: a'
                   `logical acc_is_present'
     _Interface_:  `function acc_is_present(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
                   `logical acc_is_present'
d2401 1
a2401 1
5.30 `acc_memcpy_to_device' - Copy host memory to device memory.
d2410 2
a2411 2
     _Prototype_:  `acc_memcpy_to_device(d_void *dest, h_void *src,
                   size_t bytes);'
d2420 1
a2420 1
5.31 `acc_memcpy_from_device' - Copy device memory to host memory.
d2429 2
a2430 2
     _Prototype_:  `acc_memcpy_from_device(d_void *dest, h_void *src,
                   size_t bytes);'
d2439 1
a2439 1
5.32 `acc_get_current_cuda_device' - Get CUDA device handle.
d2443 1
a2443 1
     This function returns the CUDA device handle. This handle is the
d2447 1
a2447 1
     _Prototype_:  `void *acc_get_current_cuda_device(void);'
d2456 1
a2456 1
5.33 `acc_get_current_cuda_context' - Get CUDA context handle.
d2460 1
a2460 1
     This function returns the CUDA context handle. This handle is the
d2464 1
a2464 1
     _Prototype_:  `acc_get_current_cuda_context(void);'
d2473 1
a2473 1
5.34 `acc_get_cuda_stream' - Get CUDA stream handle.
d2477 1
a2477 1
     This function returns the CUDA stream handle. This handle is the
d2481 1
a2481 1
     _Prototype_:  `acc_get_cuda_stream(void);'
d2490 1
a2490 1
5.35 `acc_set_cuda_stream' - Set CUDA stream handle.
d2498 1
a2498 1
     _Prototype_:  `acc_set_cuda_stream(int async void *stream);'
d2510 1
a2510 1
The variables `ACC_DEVICE_TYPE' and `ACC_DEVICE_NUM' are defined by
d2512 1
a2512 1
`GCC_ACC_NOTIFY' is used for diagnostic purposes.
d2523 1
a2523 1
6.1 `ACC_DEVICE_TYPE'
d2532 1
a2532 1
6.2 `ACC_DEVICE_NUM'
d2541 1
a2541 1
6.3 `GCC_ACC_NOTIFY'
d2553 1
a2553 1
This applies to the `nvptx' plugin only.
d2562 4
a2565 4
`async' and `wait' clauses.  When the `async' clause is first used with
a directive, it creates a CUDA stream.  If an `async-argument' is used
with the `async' clause, then the stream is associated with the
specified `async-argument'.
d2568 2
a2569 2
the `async-argument' of an `async' clause, both the `wait' clause and
the `wait' directive can be used.  When either the clause or directive
d2572 1
a2572 1
`async-argument', that is, stream, have completed.
d2575 2
a2576 2
of using the `async' clause, is done without any intervention by the
caller.  This implies the association between the `async-argument' and
d2579 5
a2583 5
function `acc_set_cuda_stream'.  When the function
`acc_set_cuda_stream' is called, the CUDA stream that was originally
associated with the `async' clause will be destroyed.  Caution should
be taken when changing the association as subsequent references to the
`async-argument' refer to a different CUDA stream.
d2600 4
a2603 4
programs that use the Runtime library directly, or another library
based on the Runtime library, e.g., CUBLAS(1).  This chapter describes
the use cases and what changes are required in order to use both the
OpenACC library and the CUBLAS and Runtime libraries within a program.
d2609 2
a2610 2
called prior to any of the functions in the OpenACC library. More
specifically, the function `cublasCreate()'.
d2615 5
a2619 5
returned to the caller. The OpenACC library also requires
initialization and allocation of hardware resources. Since the CUBLAS
library has already allocated the hardware resources for the device,
all that is left to do is to initialize the OpenACC library and acquire
the hardware resources on the host.
d2622 10
a2631 10
and allocate the host hardware resources, you need to acquire the
device number that was allocated during the call to `cublasCreate()'.
The invoking of the runtime library function `cudaGetDevice()'
accomplishes this. Once acquired, the device number is passed along
with the device type as parameters to the OpenACC library function
`acc_set_device_num()'.

   Once the call to `acc_set_device_num()' has completed, the OpenACC
library uses the  context that was created during the call to
`cublasCreate()'. In other words, both libraries will be sharing the
d2652 2
a2653 1
                                 Use Case 1
d2659 2
a2660 2
is called prior to any of the functions in the CUBLAS library. More
specificially, the function `acc_set_device_num()'.
d2662 1
a2662 1
   In the use case presented here, the function `acc_set_device_num()'
d2664 3
a2666 3
resources on the host and the device. In the call to the function, the
call parameters specify which device to use and what device type to
use, i.e., `acc_device_nvidia'. It should be noted that this is but one
d2668 1
a2668 1
hardware resources. Other methods are available through the use of
d2671 1
a2671 1
   Once the call to `acc_set_device_num()' has completed, other OpenACC
d2673 4
a2676 4
`acc_copyin()'. In addition, calls can be made to functions in the
CUBLAS library. In the use case a call to `cublasCreate()' is made
subsequent to the calls to `acc_copyin()'.  As seen in the previous use
case, a call to `cublasCreate()' initializes the CUBLAS library and
d2678 1
a2678 1
since the device has already been allocated, `cublasCreate()' will only
d2680 1
a2680 1
resources on the host. The context that was created as part of the
d2722 2
a2723 1
                                 Use Case 2
d2730 1
a2730 1
`ACC_DEVICE_TYPE' and `ACC_DEVICE_NUM', respecively. These two
d2732 2
a2733 2
`acc_set_device_num()'. As seen in the second use case, the device type
and device number were specified using `acc_set_device_num()'.  If
d2735 1
a2735 1
call to `acc_set_device_num()' would not be required.
d2737 4
a2740 4
   The use of the environment variables is only relevant when an
OpenACC function is called prior to a call to `cudaCreate()'. If
`cudaCreate()' is called prior to a call to an OpenACC function, then
you must call `acc_set_device_num()'(2)
d2746 2
a2747 2
Interoperability", in "CUDA Driver API", TRM-06703-001, Version 5.5,
for additional information on library interoperability.
d2749 2
a2750 2
   (2) More complete information about `ACC_DEVICE_TYPE' and
`ACC_DEVICE_NUM' can be found in sections 4.1 and 4.2 of the OpenACC
d2760 2
a2761 2
The following sections present notes on the external ABI as presented
by libgomp.  Only maintainers should need them.
d2822 1
a2822 1
The target should implement the `__sync' builtins.
d2838 1
a2838 1
Expands to the `__sync_synchronize' builtin.
d2854 4
a2857 4
In _most_ cases we can map this directly to `__thread'.  Except that
OMP allows constructors for C++ objects.  We can either refuse to
support this (how often is it used?) or we can implement something akin
to .ctors.
d2889 2
a2890 2
   It is not clear what to do with bare FOR or SECTION blocks.  The
only thing I can figure is that we do something like:
d2908 2
a2909 2
for the two variables, i.e. not something you could write directly in
C.  Presumably this only makes sense if the "outer" x and y are global
d2922 4
a2925 4
pointer to an array of the type of the variable, indexed by the
thread's TEAM_ID.  The thread stores its final value into the array,
and after the barrier, the master thread iterates over the array to
collect the values.
d2962 3
a2964 3
   The function needs to create the appropriate number of threads
and/or launch them from the dock.  It needs to create the team
structure and assign team ids.
d2969 1
a2969 1
`omp_in_parallel()' state.
d3021 2
a3022 2
also pull it into a local variable if we like, but since its supposed
to remain unchanged, we can also not if we like.
d3024 5
a3028 5
   If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be
able to get away with no work-sharing context at all, since we can
simply perform the arithmetic directly in each thread to divide up the
iterations.  Which would mean that we wouldn't need to call any of
these routines.
d3130 2
a3131 2
"openacc", or "openmp", or both to the keywords field in the bug
report, as appropriate.
d3141 1
a3141 1
     Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/'
d3169 3
a3171 3
these rights or asking you to surrender the rights.  Therefore, you
have certain responsibilities if you distribute copies of the software,
or if you modify it: responsibilities to respect the freedom of others.
d3190 9
a3198 10
modified versions of the software inside them, although the
manufacturer can do so.  This is fundamentally incompatible with the
aim of protecting users' freedom to change the software.  The
systematic pattern of such abuse occurs in the area of products for
individuals to use, which is precisely where it is most unacceptable.
Therefore, we have designed this version of the GPL to prohibit the
practice for those products.  If such problems arise substantially in
other domains, we stand ready to extend this provision to those domains
in future versions of the GPL, as needed to protect the freedom of
users.
d3235 2
a3236 2
     infringement under applicable copyright law, except executing it
     on a computer or modifying a private copy.  Propagation includes
d3250 2
a3251 2
     the extent that warranties are provided), that licensees may
     convey the work under this License, and how to view a copy of this
d3259 2
a3260 2
     for making modifications to it.  "Object code" means any
     non-source form of a work.
d3271 4
a3274 4
     Major Component, and (b) serves only to enable use of the work
     with that Major Component, or to implement a Standard Interface
     for which an implementation is available to the public in source
     code form.  A "Major Component", in this context, means a major
d3282 3
a3284 3
     work) run the object code and to modify the work, including
     scripts to control those activities.  However, it does not include
     the work's System Libraries, or general-purpose tools or generally
d3287 4
a3290 4
     Corresponding Source includes interface definition files
     associated with source files for the work, and the source code for
     shared libraries and dynamically linked subprograms that the work
     is specifically designed to require, such as by intimate data
d3307 4
a3310 4
     a covered work is covered by this License only if the output,
     given its content, constitutes a covered work.  This License
     acknowledges your rights of fair use or other equivalent, as
     provided by copyright law.
d3315 8
a3322 8
     sole purpose of having them make modifications exclusively for
     you, or provide you with facilities for running those works,
     provided that you comply with the terms of this License in
     conveying all material for which you do not control copyright.
     Those thus making or running the covered works for you must do so
     exclusively on your behalf, under your direction and control, on
     terms that prohibit them from making any copies of your
     copyrighted material outside their relationship with you.
d3339 2
a3340 2
     with respect to the covered work, and you disclaim any intention
     to limit operation or modification of the work as a means of
d3410 2
a3411 2
          written offer, valid for at least three years and valid for
          as long as you offer spare parts or customer support for that
d3421 2
a3422 2
       c. Convey individual copies of the object code with a copy of
          the written offer to provide the Corresponding Source.  This
d3428 2
a3429 2
          place (gratis or for a charge), and offer equivalent access
          to the Corresponding Source in the same way through the same
d3433 4
a3436 4
          Corresponding Source may be on a different server (operated
          by you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to
          the object code saying where to find the Corresponding Source.
d3438 2
a3439 2
          remain obligated to ensure that it is available for as long
          as needed to satisfy these requirements.
a3445 1

d3453 2
a3454 2
     incorporation into a dwelling.  In determining whether a product
     is a consumer product, doubtful cases shall be resolved in favor of
d3485 5
a3489 5
     warranty, or updates for a work that has been modified or
     installed by the recipient, or for the User Product in which it
     has been modified or installed.  Access to a network may be denied
     when the modification itself materially and adversely affects the
     operation of the network or violates the rules and protocols for
d3519 2
a3520 2
     holders of that material) supplement the terms of this License
     with terms:
d3530 2
a3531 3
          or requiring that modified versions of such material be
          marked in reasonable ways as different from the original
          version; or
d3550 4
a3553 5
     contains a further restriction but permits relicensing or
     conveying under this License, you may add to a covered work
     material governed by the terms of that license document, provided
     that the further restriction does not survive such relicensing or
     conveying.
d3569 2
a3570 2
     under this License (including any patent licenses granted under
     the third paragraph of section 11).
d3574 2
a3575 2
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
d3587 4
a3590 4
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, you do not qualify to receive new
     licenses for the same material under section 10.
d3604 1
a3604 1
 10. Automatic Licensing of Downstream Recipients.
d3618 4
a3621 4
     could give under the previous paragraph, plus a right to
     possession of the Corresponding Source of the work from the
     predecessor in interest, if the predecessor has it or can get it
     with reasonable efforts.
d3625 6
a3630 6
     may not impose a license fee, royalty, or other charge for
     exercise of rights granted under this License, and you may not
     initiate litigation (including a cross-claim or counterclaim in a
     lawsuit) alleging that any patent claim is infringed by making,
     using, selling, offering for sale, or importing the Program or any
     portion of it.
d3632 1
a3632 1
 11. Patents.
d3652 2
a3653 2
     otherwise run, modify and propagate the contents of its
     contributor version.
d3658 3
a3660 3
     patent or covenant not to sue for patent infringement).  To
     "grant" such a patent license to a party means to make such an
     agreement or commitment not to enforce a patent against the party.
d3690 10
a3699 10
     party that is in the business of distributing software, under
     which you make payment to the third party based on the extent of
     your activity of conveying the work, and under which the third
     party grants, to any of the parties who would receive the covered
     work from you, a discriminatory patent license (a) in connection
     with copies of the covered work conveyed by you (or copies made
     from those copies), or (b) primarily for and in connection with
     specific products or compilations that contain the covered work,
     unless you entered into that arrangement, or that patent license
     was granted, prior to 28 March 2007.
d3705 1
a3705 1
 12. No Surrender of Others' Freedom.
d3707 10
a3716 11
     If conditions are imposed on you (whether by court order,
     agreement or otherwise) that contradict the conditions of this
     License, they do not excuse you from the conditions of this
     License.  If you cannot convey a covered work so as to satisfy
     simultaneously your obligations under this License and any other
     pertinent obligations, then as a consequence you may not convey it
     at all.  For example, if you agree to terms that obligate you to
     collect a royalty for further conveying from those to whom you
     convey the Program, the only way you could satisfy both those
     terms and this License would be to refrain entirely from conveying
     the Program.
d3718 1
a3718 1
 13. Use with the GNU Affero General Public License.
d3729 1
a3729 1
 14. Revised Versions of this License.
d3732 3
a3734 4
     versions of the GNU General Public License from time to time.
     Such new versions will be similar in spirit to the present
     version, but may differ in detail to address new problems or
     concerns.
d3740 4
a3743 4
     that numbered version or of any later version published by the
     Free Software Foundation.  If the Program does not specify a
     version number of the GNU General Public License, you may choose
     any version ever published by the Free Software Foundation.
d3755 1
a3755 1
 15. Disclaimer of Warranty.
d3758 1
a3758 1
     APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE
d3762 1
a3762 1
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE
d3767 1
a3767 1
 16. Limitation of Liability.
d3771 2
a3772 2
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
     FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
d3780 1
a3780 1
 17. Interpretation of Sections 15 and 16.
a3788 1

d3819 1
a3819 1
     along with this program.  If not, see `http://www.gnu.org/licenses/'.
d3828 1
a3828 1
     This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
d3830 1
a3830 1
     under certain conditions; type `show c' for details.
d3832 1
a3832 1
   The hypothetical commands `show w' and `show c' should show the
d3840 1
a3840 1
the GNU GPL, see `http://www.gnu.org/licenses/'.
d3847 1
a3847 1
please read `http://www.gnu.org/philosophy/why-not-lgpl.html'.
d3858 1
a3858 1
     `http://fsf.org/'
d3883 2
a3884 2
     of subject matter or whether it is published as a printed book.
     We recommend this License principally for works whose purpose is
d3890 2
a3891 2
     that contains a notice placed by the copyright holder saying it
     can be distributed under the terms of this License.  Such a notice
d3895 3
a3897 3
     of the public is a licensee, and is addressed as "you".  You
     accept the license if you copy, modify or distribute the work in a
     way requiring permission under copyright law.
d3915 6
a3920 6
     titles are designated, as being those of Invariant Sections, in
     the notice that says that the Document is released under this
     License.  If a section does not fit the above definition of
     Secondary then it is not allowed to be designated as Invariant.
     The Document may contain zero Invariant Sections.  If the Document
     does not identify any Invariant Sections then there are none.
d3931 10
a3940 10
     straightforwardly with generic text editors or (for images
     composed of pixels) generic paint programs or (for drawings) some
     widely available drawing editor, and that is suitable for input to
     text formatters or for automatic translation to a variety of
     formats suitable for input to text formatters.  A copy made in an
     otherwise Transparent file format whose markup, or absence of
     markup, has been arranged to thwart or discourage subsequent
     modification by readers is not Transparent.  An image format is
     not Transparent if used for any substantial amount of text.  A
     copy that is not "Transparent" is called "Opaque".
d3944 8
a3951 8
     SGML or XML using a publicly available DTD, and
     standard-conforming simple HTML, PostScript or PDF designed for
     human modification.  Examples of transparent image formats include
     PNG, XCF and JPG.  Opaque formats include proprietary formats that
     can be read and edited only by proprietary word processors, SGML or
     XML for which the DTD and/or processing tools are not generally
     available, and the machine-generated HTML, PostScript or PDF
     produced by some word processors for output purposes only.
d3989 2
a3990 2
     distribute a large enough number of copies you must also follow
     the conditions in section 3.
d4004 5
a4008 6
     front cover must present the full title with all words of the
     title equally prominent and visible.  You may add other material
     on the covers in addition.  Copying with changes limited to the
     covers, as long as they preserve the title of the Document and
     satisfy these conditions, can be treated as verbatim copying in
     other respects.
d4016 11
a4026 12
     numbering more than 100, you must either include a
     machine-readable Transparent copy along with each Opaque copy, or
     state in or with each Opaque copy a computer-network location from
     which the general network-using public has access to download
     using public-standard network protocols a complete Transparent
     copy of the Document, free of added material.  If you use the
     latter option, you must take reasonably prudent steps, when you
     begin distribution of Opaque copies in quantity, to ensure that
     this Transparent copy will remain thus accessible at the stated
     location until at least one year after the last time you
     distribute an Opaque copy (directly or through your agents or
     retailers) of that edition to the public.
d4029 3
a4031 3
     the Document well before redistributing any large number of
     copies, to give them a chance to provide you with an updated
     version of the Document.
d4037 5
a4041 5
     release the Modified Version under precisely this License, with
     the Modified Version filling the role of the Document, thus
     licensing distribution and modification of the Modified Version to
     whoever possesses a copy of it.  In addition, you must do these
     things in the Modified Version:
d4044 5
a4048 5
          distinct from that of the Document, and from those of
          previous versions (which should, if there were any, be listed
          in the History section of the Document).  You may use the
          same title as a previous version if the original publisher of
          that version gives permission.
d4078 6
a4083 6
          authors, and publisher of the Modified Version as given on
          the Title Page.  If there is no section Entitled "History" in
          the Document, create one stating the title, year, authors,
          and publisher of the Document as given on its Title Page,
          then add an item describing the Modified Version as stated in
          the previous sentence.
d4088 5
a4092 5
          previous versions it was based on.  These may be placed in
          the "History" section.  You may omit a network location for a
          work that was published at least four years before the
          Document itself, or if the original publisher of the version
          it refers to gives permission.
d4095 2
a4096 2
          Preserve the Title of the section, and preserve in the
          section all the substance and tone of each of the contributor
d4099 3
a4101 4
       L. Preserve all the Invariant Sections of the Document,
          unaltered in their text and in their titles.  Section numbers
          or the equivalent are not considered part of the section
          titles.
d4114 5
a4118 5
     material copied from the Document, you may at your option
     designate some or all of these sections as invariant.  To do this,
     add their titles to the list of Invariant Sections in the Modified
     Version's license notice.  These titles must be distinct from any
     other section titles.
d4127 9
a4135 9
     and a passage of up to 25 words as a Back-Cover Text, to the end
     of the list of Cover Texts in the Modified Version.  Only one
     passage of Front-Cover Text and one of Back-Cover Text may be
     added by (or through arrangements made by) any one entity.  If the
     Document already includes a cover text for the same cover,
     previously added by you or by arrangement made by the same entity
     you are acting on behalf of, you may not add another; but you may
     replace the old one, on explicit permission from the previous
     publisher that added the old one.
d4145 2
a4146 2
     modified versions, provided that you include in the combination
     all of the Invariant Sections of all of the original documents,
d4173 2
a4174 2
     rules of this License for verbatim copying of each of the
     documents in all other respects.
d4178 3
a4180 3
     a copy of this License into the extracted document, and follow
     this License in all other respects regarding verbatim copying of
     that document.
d4185 2
a4186 2
     separate and independent documents or works, in or on a volume of
     a storage or distribution medium, is called an "aggregate" if the
d4231 2
a4232 2
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
d4244 4
a4247 4
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, receipt of a copy of some or all of
     the same material does not give you any rights to use it.
d4249 1
a4249 1
 10. FUTURE REVISIONS OF THIS LICENSE
d4255 1
a4255 1
     `http://www.gnu.org/copyleft/'.
d4262 5
a4266 5
     published (not as a draft) by the Free Software Foundation.  If
     the Document does not specify a version number of this License,
     you may choose any version ever published (not as a draft) by the
     Free Software Foundation.  If the Document specifies that a proxy
     can decide which future versions of this License can be used, that
d4270 1
a4270 1
 11. RELICENSING
a4299 1

d4316 1
a4316 1
Texts, replace the "with...Texts." line with this:
d4327 3
a4329 3
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License, to
permit their use in free software.
d4359 2
a4360 2
can greatly alter what fraction of the sales price counts as profit.
If the price you pay is $50, ten percent of the profit is probably less
d4370 2
a4371 2
ports such as adding a new CPU to the GNU Compiler Collection
contribute more; major new features or packages contribute the most.
d4390 19
a4408 1
* Environment Variable <1>:              GOMP_RTEMS_THREAD_POOLS.
a4409 18
* Environment Variable <2>:              GOMP_SPINCOUNT.        (line 6)
* Environment Variable <3>:              GOMP_STACKSIZE.        (line 6)
* Environment Variable <4>:              GOMP_DEBUG.            (line 6)
* Environment Variable <5>:              GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <6>:              OMP_WAIT_POLICY.       (line 6)
* Environment Variable <7>:              OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <8>:              OMP_SCHEDULE.          (line 6)
* Environment Variable <9>:              OMP_STACKSIZE.         (line 6)
* Environment Variable <10>:             OMP_PLACES.            (line 6)
* Environment Variable <11>:             OMP_PROC_BIND.         (line 6)
* Environment Variable <12>:             OMP_NUM_THREADS.       (line 6)
* Environment Variable <13>:             OMP_NESTED.            (line 6)
* Environment Variable <14>:             OMP_MAX_TASK_PRIORITY. (line 6)
* Environment Variable <15>:             OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable <16>:             OMP_DYNAMIC.           (line 6)
* Environment Variable <17>:             OMP_DEFAULT_DEVICE.    (line 6)
* Environment Variable <18>:             OMP_DISPLAY_ENV.       (line 6)
* Environment Variable:                  OMP_CANCELLATION.      (line 6)
d4412 6
a4417 1
* Implementation specific setting <1>:   GOMP_RTEMS_THREAD_POOLS.
a4418 5
* Implementation specific setting <2>:   GOMP_SPINCOUNT.        (line 6)
* Implementation specific setting <3>:   GOMP_STACKSIZE.        (line 6)
* Implementation specific setting <4>:   OMP_SCHEDULE.          (line 6)
* Implementation specific setting <5>:   OMP_NUM_THREADS.       (line 6)
* Implementation specific setting:       OMP_NESTED.            (line 6)
d4424 131
a4554 131
Node: Top2130
Node: Enabling OpenMP4536
Node: Runtime Library Routines5323
Node: omp_get_active_level8386
Node: omp_get_ancestor_thread_num9084
Node: omp_get_cancellation10011
Node: omp_get_default_device10823
Node: omp_get_dynamic11497
Node: omp_get_level12370
Node: omp_get_max_active_levels12988
Node: omp_get_max_task_priority13691
Node: omp_get_max_threads14309
Node: omp_get_nested15064
Node: omp_get_num_devices15976
Node: omp_get_num_procs16495
Node: omp_get_num_teams17032
Node: omp_get_num_threads17546
Node: omp_get_proc_bind18633
Node: omp_get_schedule19551
Node: omp_get_team_num20500
Node: omp_get_team_size20997
Node: omp_get_thread_limit21954
Node: omp_get_thread_num22571
Node: omp_in_parallel23440
Node: omp_in_final24087
Node: omp_is_initial_device24759
Node: omp_set_default_device25450
Node: omp_set_dynamic26238
Node: omp_set_max_active_levels27121
Node: omp_set_nested27895
Node: omp_set_num_threads28784
Node: omp_set_schedule29649
Node: omp_init_lock30725
Node: omp_set_lock31375
Node: omp_test_lock32227
Node: omp_unset_lock33200
Node: omp_destroy_lock34128
Node: omp_init_nest_lock34802
Node: omp_set_nest_lock35534
Node: omp_test_nest_lock36451
Node: omp_unset_nest_lock37481
Node: omp_destroy_nest_lock38493
Node: omp_get_wtick39241
Node: omp_get_wtime39831
Node: Environment Variables40605
Node: OMP_CANCELLATION42160
Node: OMP_DISPLAY_ENV42693
Node: OMP_DEFAULT_DEVICE43396
Node: OMP_DYNAMIC44176
Node: OMP_MAX_ACTIVE_LEVELS44772
Node: OMP_MAX_TASK_PRIORITY45422
Node: OMP_NESTED46082
Node: OMP_NUM_THREADS46687
Node: OMP_PROC_BIND47376
Node: OMP_PLACES48568
Node: OMP_STACKSIZE50745
Node: OMP_SCHEDULE51569
Node: OMP_THREAD_LIMIT52267
Node: OMP_WAIT_POLICY52867
Node: GOMP_CPU_AFFINITY53559
Node: GOMP_DEBUG55290
Node: GOMP_STACKSIZE55797
Node: GOMP_SPINCOUNT56626
Node: GOMP_RTEMS_THREAD_POOLS57835
Node: Enabling OpenACC60016
Node: OpenACC Runtime Library Routines61010
Node: acc_get_num_devices64804
Node: acc_set_device_type65527
Node: acc_get_device_type66288
Node: acc_set_device_num67000
Node: acc_get_device_num67799
Node: acc_async_test68592
Node: acc_async_test_all69577
Node: acc_wait70472
Node: acc_wait_all71104
Node: acc_wait_all_async71681
Node: acc_wait_async72430
Node: acc_init73134
Node: acc_shutdown73777
Node: acc_on_device74442
Node: acc_malloc75440
Node: acc_free75937
Node: acc_copyin76363
Node: acc_present_or_copyin77464
Node: acc_create79074
Node: acc_present_or_create80220
Node: acc_copyout81838
Node: acc_delete82853
Node: acc_update_device83820
Node: acc_update_self84924
Node: acc_map_data86020
Node: acc_unmap_data86703
Node: acc_deviceptr87222
Node: acc_hostptr87791
Node: acc_is_present88354
Node: acc_memcpy_to_device89868
Node: acc_memcpy_from_device90529
Node: acc_get_current_cuda_device91211
Node: acc_get_current_cuda_context91806
Node: acc_get_cuda_stream92398
Node: acc_set_cuda_stream92952
Node: OpenACC Environment Variables93483
Node: ACC_DEVICE_TYPE93942
Node: ACC_DEVICE_NUM94178
Node: GCC_ACC_NOTIFY94435
Node: CUDA Streams Usage94658
Ref: CUDA Streams Usage-Footnote-196558
Node: OpenACC Library Interoperability96667
Ref: OpenACC Library Interoperability-Footnote-1103013
Ref: OpenACC Library Interoperability-Footnote-2103265
Node: The libgomp ABI103473
Node: Implementing MASTER construct104329
Node: Implementing CRITICAL construct104743
Node: Implementing ATOMIC construct105482
Node: Implementing FLUSH construct105963
Node: Implementing BARRIER construct106234
Node: Implementing THREADPRIVATE construct106503
Node: Implementing PRIVATE clause107155
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses107736
Node: Implementing REDUCTION clause109060
Node: Implementing PARALLEL construct109617
Node: Implementing FOR construct110874
Node: Implementing ORDERED construct112872
Node: Implementing SECTIONS construct113178
Node: Implementing SINGLE construct113944
Node: Implementing OpenACC's PARALLEL construct114656
Node: Reporting Bugs114914
Node: Copying115276
Node: GNU Free Documentation License152841
Node: Funding177983
Node: Library Index180508
@


1.1.1.12
log
@import GCC 8.3.  it includes these new features:
- many optimisations improved: inter-procedural, profile-directed,
  LTO, loops including user-controllable unroll support, and more.
- columns numbers added to line numbers in dwarf
- gcov extended significantly
- many sanitizer updates
- many new warning messages
- many better hints and more useful error messages
- minor ABI changes on x86-64 libstdc++, and some c++17 modes
- draft c++2a features
- better c++17 experimental support
- Armv8.4-A supported, better 8.2-A and 8.3-A support, including
  32 bit arm port.  cortex a-55, a-75 and a-55.a-75 combo support.
- in the GCC bugzilla, 8.1 shows 1149 bugs fixed, 8.2 shows 100, and
  8.3 shows 158.
@
text
@d1 2
a2 2
This is libgomp.info, produced by makeinfo version 6.5 from
libgomp.texi.
d4 1
a4 1
Copyright (C) 2006-2018 Free Software Foundation, Inc.
d21 3
a23 2
software.  Copies published by the Free Software Foundation raise funds
for GNU development.
d37 1
a37 1
   Copyright (C) 2006-2018 Free Software Foundation, Inc.
d54 2
a55 2
software.  Copies published by the Free Software Foundation raise funds
for GNU development.
d63 6
a68 6
This manual documents the usage of libgomp, the GNU Offloading and Multi
Processing Runtime Library.  This includes the GNU implementation of the
OpenMP (http://www.openmp.org) Application Programming Interface (API)
for multi-platform shared-memory parallel programming in C/C++ and
Fortran, and the GNU implementation of the OpenACC
(https://www.openacc.org) Application Programming Interface (API) for
d111 11
a121 10
compile-time flag '-fopenmp' must be specified.  This enables the OpenMP
directive '#pragma omp' in C/C++ and '!$omp' directives in free form,
'c$omp', '*$omp' and '!$omp' directives in fixed form, '!$' conditional
compilation sentinels in free form and 'c$', '*$' and '!$' sentinels in
fixed form, for Fortran.  The flag also arranges for automatic linking
of the OpenMP runtime library (*note Runtime Library Routines::).

   A complete description of all OpenMP directives accepted may be found
in the OpenMP Application Program Interface (http://www.openmp.org)
manual, version 4.5.
d189 1
a189 1
2.1 'omp_get_active_level' - Number of parallel regions
d197 1
a197 1
     _Prototype_:   'int omp_get_active_level(void);'
d200 1
a200 1
     _Interface_:   'integer function omp_get_active_level()'
d212 1
a212 1
2.2 'omp_get_ancestor_thread_num' - Ancestor thread ID
d218 2
a219 2
     outside zero to 'omp_get_level' -1 is returned; if LEVEL is
     'omp_get_level' the result is identical to 'omp_get_thread_num'.
d222 1
a222 1
     _Prototype_:   'int omp_get_ancestor_thread_num(int level);'
d225 2
a226 2
     _Interface_:   'integer function omp_get_ancestor_thread_num(level)'
                    'integer level'
d238 1
a238 1
2.3 'omp_get_cancellation' - Whether cancellation support is enabled
d242 3
a244 3
     This function returns 'true' if cancellation is activated, 'false'
     otherwise.  Here, 'true' and 'false' represent their
     language-specific counterparts.  Unless 'OMP_CANCELLATION' is set
d248 1
a248 1
     _Prototype_:   'int omp_get_cancellation(void);'
d251 1
a251 1
     _Interface_:   'logical function omp_get_cancellation()'
d262 1
a262 1
2.4 'omp_get_default_device' - Get the default device for target regions
d269 1
a269 1
     _Prototype_:   'int omp_get_default_device(void);'
d272 1
a272 1
     _Interface_:   'integer function omp_get_default_device()'
d283 1
a283 1
2.5 'omp_get_dynamic' - Dynamic teams setting
d287 2
a288 2
     This function returns 'true' if enabled, 'false' otherwise.  Here,
     'true' and 'false' represent their language-specific counterparts.
d291 3
a293 3
     'OMP_DYNAMIC' environment variable or at runtime using
     'omp_set_dynamic'.  If undefined, dynamic adjustment is disabled by
     default.
d296 1
a296 1
     _Prototype_:   'int omp_get_dynamic(void);'
d299 1
a299 1
     _Interface_:   'logical function omp_get_dynamic()'
d310 1
a310 1
2.6 'omp_get_level' - Obtain the current nesting level
d318 1
a318 1
     _Prototype_:   'int omp_get_level(void);'
d321 1
a321 1
     _Interface_:   'integer function omp_level()'
d332 1
a332 1
2.7 'omp_get_max_active_levels' - Maximum number of active regions
d340 1
a340 1
     _Prototype_:   'int omp_get_max_active_levels(void);'
d343 1
a343 1
     _Interface_:   'integer function omp_get_max_active_levels()'
d354 1
a354 1
2.8 'omp_get_max_task_priority' - Maximum priority value
d363 1
a363 1
     _Prototype_:   'int omp_get_max_task_priority(void);'
d366 1
a366 1
     _Interface_:   'integer function omp_get_max_task_priority()'
d374 1
a374 1
2.9 'omp_get_max_threads' - Maximum number of threads of parallel region
d379 1
a379 1
     region that does not use the clause 'num_threads'.
d382 1
a382 1
     _Prototype_:   'int omp_get_max_threads(void);'
d385 1
a385 1
     _Interface_:   'integer function omp_get_max_threads()'
d397 1
a397 1
2.10 'omp_get_nested' - Nested parallel regions
d401 2
a402 2
     This function returns 'true' if nested parallel regions are
     enabled, 'false' otherwise.  Here, 'true' and 'false' represent
d406 2
a407 2
     'OMP_NESTED' environment variable or at runtime using
     'omp_set_nested'.  If undefined, nested parallel regions are
d411 1
a411 1
     _Prototype_:   'int omp_get_nested(void);'
d414 1
a414 1
     _Interface_:   'logical function omp_get_nested()'
d425 1
a425 1
2.11 'omp_get_num_devices' - Number of target devices
d432 1
a432 1
     _Prototype_:   'int omp_get_num_devices(void);'
d435 1
a435 1
     _Interface_:   'integer function omp_get_num_devices()'
d443 1
a443 1
2.12 'omp_get_num_procs' - Number of processors online
d450 1
a450 1
     _Prototype_:   'int omp_get_num_procs(void);'
d453 1
a453 1
     _Interface_:   'integer function omp_get_num_procs()'
d461 1
a461 1
2.13 'omp_get_num_teams' - Number of teams
d468 1
a468 1
     _Prototype_:   'int omp_get_num_teams(void);'
d471 1
a471 1
     _Interface_:   'integer function omp_get_num_teams()'
d479 1
a479 1
2.14 'omp_get_num_threads' - Size of the active team
d483 2
a484 2
     Returns the number of threads in the current team.  In a sequential
     section of the program 'omp_get_num_threads' returns 1.
d487 5
a491 5
     'OMP_NUM_THREADS' environment variable.  At runtime, the size of
     the current team may be set either by the 'NUM_THREADS' clause or
     by 'omp_set_num_threads'.  If none of the above were used to define
     a specific value and 'OMP_DYNAMIC' is disabled, one thread per CPU
     online is used.
d494 1
a494 1
     _Prototype_:   'int omp_get_num_threads(void);'
d497 1
a497 1
     _Interface_:   'integer function omp_get_num_threads()'
d509 1
a509 1
2.15 'omp_get_proc_bind' - Whether theads may be moved between CPUs
d513 5
a517 5
     This functions returns the currently active thread affinity policy,
     which is set via 'OMP_PROC_BIND'.  Possible values are
     'omp_proc_bind_false', 'omp_proc_bind_true',
     'omp_proc_bind_master', 'omp_proc_bind_close' and
     'omp_proc_bind_spread'.
d520 1
a520 1
     _Prototype_:   'omp_proc_bind_t omp_get_proc_bind(void);'
d523 2
a524 2
     _Interface_:   'integer(kind=omp_proc_bind_kind) function
                    omp_get_proc_bind()'
d536 1
a536 1
2.16 'omp_get_schedule' - Obtain the runtime scheduling method
d541 2
a542 2
     set to the value 'omp_sched_static', 'omp_sched_dynamic',
     'omp_sched_guided' or 'omp_sched_auto'.  The second argument,
d546 2
a547 2
     _Prototype_:   'void omp_get_schedule(omp_sched_t *kind, int
                    *chunk_size);'
d550 3
a552 3
     _Interface_:   'subroutine omp_get_schedule(kind, chunk_size)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer chunk_size'
d563 1
a563 1
2.17 'omp_get_team_num' - Get team number
d570 1
a570 1
     _Prototype_:   'int omp_get_team_num(void);'
d573 1
a573 1
     _Interface_:   'integer function omp_get_team_num()'
d581 1
a581 1
2.18 'omp_get_team_size' - Number of threads in a team
d587 3
a589 3
     values of LEVEL outside zero to 'omp_get_level', -1 is returned; if
     LEVEL is zero, 1 is returned, and for 'omp_get_level', the result
     is identical to 'omp_get_num_threads'.
d592 1
a592 1
     _Prototype_:   'int omp_get_team_size(int level);'
d595 2
a596 2
     _Interface_:   'integer function omp_get_team_size(level)'
                    'integer level'
d608 1
a608 1
2.19 'omp_get_thread_limit' - Maximum number of threads
d615 1
a615 1
     _Prototype_:   'int omp_get_thread_limit(void);'
d618 1
a618 1
     _Interface_:   'integer function omp_get_thread_limit()'
d629 1
a629 1
2.20 'omp_get_thread_num' - Current thread ID
d634 4
a637 4
     team.  In a sequential parts of the program, 'omp_get_thread_num'
     always returns 0.  In parallel regions the return value varies from
     0 to 'omp_get_num_threads'-1 inclusive.  The return value of the
     master thread of a team is always 0.
d640 1
a640 1
     _Prototype_:   'int omp_get_thread_num(void);'
d643 1
a643 1
     _Interface_:   'integer function omp_get_thread_num()'
d654 1
a654 1
2.21 'omp_in_parallel' - Whether a parallel region is active
d658 2
a659 2
     This function returns 'true' if currently running in parallel,
     'false' otherwise.  Here, 'true' and 'false' represent their
d663 1
a663 1
     _Prototype_:   'int omp_in_parallel(void);'
d666 1
a666 1
     _Interface_:   'logical function omp_in_parallel()'
d674 1
a674 1
2.22 'omp_in_final' - Whether in final or included task region
d678 2
a679 2
     This function returns 'true' if currently running in a final or
     included task region, 'false' otherwise.  Here, 'true' and 'false'
d683 1
a683 1
     _Prototype_:   'int omp_in_final(void);'
d686 1
a686 1
     _Interface_:   'logical function omp_in_final()'
d694 1
a694 1
2.23 'omp_is_initial_device' - Whether executing on the host device
d698 2
a699 2
     This function returns 'true' if currently running on the host
     device, 'false' otherwise.  Here, 'true' and 'false' represent
d703 1
a703 1
     _Prototype_:   'int omp_is_initial_device(void);'
d706 1
a706 1
     _Interface_:   'logical function omp_is_initial_device()'
d714 1
a714 1
2.24 'omp_set_default_device' - Set the default device for target regions
d722 1
a722 1
     _Prototype_:   'void omp_set_default_device(int device_num);'
d725 2
a726 2
     _Interface_:   'subroutine omp_set_default_device(device_num)'
                    'integer device_num'
d737 1
a737 1
2.25 'omp_set_dynamic' - Enable/disable dynamic teams
d743 2
a744 2
     of 'true' and 'false', where 'true' enables dynamic adjustment of
     team sizes and 'false' disables it.
d747 1
a747 1
     _Prototype_:   'void omp_set_dynamic(int dynamic_threads);'
d750 2
a751 2
     _Interface_:   'subroutine omp_set_dynamic(dynamic_threads)'
                    'logical, intent(in) :: dynamic_threads'
d762 1
a762 1
2.26 'omp_set_max_active_levels' - Limits the number of active parallel regions
d770 1
a770 1
     _Prototype_:   'void omp_set_max_active_levels(int max_levels);'
d773 2
a774 2
     _Interface_:   'subroutine omp_set_max_active_levels(max_levels)'
                    'integer max_levels'
d785 1
a785 1
2.27 'omp_set_nested' - Enable/disable nested parallel regions
d791 2
a792 2
     language-specific equivalent of 'true' and 'false', where 'true'
     enables dynamic adjustment of team sizes and 'false' disables it.
d795 1
a795 1
     _Prototype_:   'void omp_set_nested(int nested);'
d798 2
a799 2
     _Interface_:   'subroutine omp_set_nested(nested)'
                    'logical, intent(in) :: nested'
d810 1
a810 1
2.28 'omp_set_num_threads' - Set upper team size limit
d815 2
a816 2
     parallel sections, if those do not specify a 'num_threads' clause.
     The argument of 'omp_set_num_threads' shall be a positive integer.
d819 1
a819 1
     _Prototype_:   'void omp_set_num_threads(int num_threads);'
d822 2
a823 2
     _Interface_:   'subroutine omp_set_num_threads(num_threads)'
                    'integer, intent(in) :: num_threads'
d835 1
a835 1
2.29 'omp_set_schedule' - Set the runtime scheduling method
d840 2
a841 2
     value 'omp_sched_static', 'omp_sched_dynamic', 'omp_sched_guided'
     or 'omp_sched_auto'.  Except for 'omp_sched_auto', the chunk size
d843 1
a843 1
     value if zero or negative.  For 'omp_sched_auto' the CHUNK_SIZE
d847 2
a848 2
     _Prototype_:   'void omp_set_schedule(omp_sched_t kind, int
                    chunk_size);'
d851 3
a853 3
     _Interface_:   'subroutine omp_set_schedule(kind, chunk_size)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer chunk_size'
d864 1
a864 1
2.30 'omp_init_lock' - Initialize simple lock
d872 1
a872 1
     _Prototype_:   'void omp_init_lock(omp_lock_t *lock);'
d875 2
a876 2
     _Interface_:   'subroutine omp_init_lock(svar)'
                    'integer(omp_lock_kind), intent(out) :: svar'
d887 1
a887 1
2.31 'omp_set_lock' - Wait for and set simple lock
d891 4
a894 4
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  The calling thread is blocked until the lock
     is available.  If the lock is already held by the current thread, a
     deadlock occurs.
d897 1
a897 1
     _Prototype_:   'void omp_set_lock(omp_lock_t *lock);'
d900 2
a901 2
     _Interface_:   'subroutine omp_set_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d913 1
a913 1
2.32 'omp_test_lock' - Test and set simple lock if available
d917 5
a921 5
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  Contrary to 'omp_set_lock', 'omp_test_lock'
     does not block if the lock is not available.  This function returns
     'true' upon success, 'false' otherwise.  Here, 'true' and 'false'
     represent their language-specific counterparts.
d924 1
a924 1
     _Prototype_:   'int omp_test_lock(omp_lock_t *lock);'
d927 2
a928 2
     _Interface_:   'logical function omp_test_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d939 1
a939 1
2.33 'omp_unset_lock' - Unset simple lock
d944 4
a947 4
     'omp_set_lock' or 'omp_test_lock' before.  In addition, the lock
     must be held by the thread calling 'omp_unset_lock'.  Then, the
     lock becomes unlocked.  If one or more threads attempted to set the
     lock before, one of them is chosen to, again, set the lock to
d951 1
a951 1
     _Prototype_:   'void omp_unset_lock(omp_lock_t *lock);'
d954 2
a955 2
     _Interface_:   'subroutine omp_unset_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d966 1
a966 1
2.34 'omp_destroy_lock' - Destroy simple lock
d974 1
a974 1
     _Prototype_:   'void omp_destroy_lock(omp_lock_t *lock);'
d977 2
a978 2
     _Interface_:   'subroutine omp_destroy_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d989 1
a989 1
2.35 'omp_init_nest_lock' - Initialize nested lock
d997 1
a997 1
     _Prototype_:   'void omp_init_nest_lock(omp_nest_lock_t *lock);'
d1000 2
a1001 2
     _Interface_:   'subroutine omp_init_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(out) :: nvar'
d1012 1
a1012 1
2.36 'omp_set_nest_lock' - Wait for and set nested lock
d1016 5
a1020 4
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  The calling thread is blocked until the
     lock is available.  If the lock is already held by the current
     thread, the nesting count for the lock is incremented.
d1023 1
a1023 1
     _Prototype_:   'void omp_set_nest_lock(omp_nest_lock_t *lock);'
d1026 2
a1027 2
     _Interface_:   'subroutine omp_set_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1038 1
a1038 1
2.37 'omp_test_nest_lock' - Test and set nested lock if available
d1042 6
a1047 5
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  Contrary to 'omp_set_nest_lock',
     'omp_test_nest_lock' does not block if the lock is not available.
     If the lock is already held by the current thread, the new nesting
     count is returned.  Otherwise, the return value equals zero.
d1050 1
a1050 1
     _Prototype_:   'int omp_test_nest_lock(omp_nest_lock_t *lock);'
d1053 2
a1054 2
     _Interface_:   'logical function omp_test_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1065 1
a1065 1
2.38 'omp_unset_nest_lock' - Unset nested lock
d1070 1
a1070 1
     'omp_set_nested_lock' or 'omp_test_nested_lock' before.  In
d1072 1
a1072 1
     'omp_unset_nested_lock'.  If the nesting count drops to zero, the
d1078 1
a1078 1
     _Prototype_:   'void omp_unset_nest_lock(omp_nest_lock_t *lock);'
d1081 2
a1082 2
     _Interface_:   'subroutine omp_unset_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1093 1
a1093 1
2.39 'omp_destroy_nest_lock' - Destroy nested lock
d1102 1
a1102 1
     _Prototype_:   'void omp_destroy_nest_lock(omp_nest_lock_t *);'
d1105 2
a1106 2
     _Interface_:   'subroutine omp_destroy_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1117 1
a1117 1
2.40 'omp_get_wtick' - Get timer precision
d1125 1
a1125 1
     _Prototype_:   'double omp_get_wtick(void);'
d1128 1
a1128 1
     _Interface_:   'double precision function omp_get_wtick()'
d1139 1
a1139 1
2.41 'omp_get_wtime' - Elapsed wall clock time
d1150 1
a1150 1
     _Prototype_:   'double omp_get_wtime(void);'
d1153 1
a1153 1
     _Interface_:   'double precision function omp_get_wtime()'
d1167 1
a1167 1
The environment variables which beginning with 'OMP_' are defined by
d1169 1
a1169 1
beginning with 'GOMP_' are GNU extensions.
d1196 1
a1196 1
3.1 'OMP_CANCELLATION' - Set whether cancellation is activated
d1200 3
a1202 3
     If set to 'TRUE', the cancellation is activated.  If set to 'FALSE'
     or if unset, cancellation is disabled and the 'cancel' construct is
     ignored.
d1213 1
a1213 1
3.2 'OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
d1217 1
a1217 1
     If set to 'TRUE', the OpenMP version number and the values
d1219 1
a1219 1
     'stderr'.  If set to 'VERBOSE', it additionally shows the value of
d1221 1
a1221 1
     or set to 'FALSE', this information will not be shown.
d1229 1
a1229 1
3.3 'OMP_DEFAULT_DEVICE' - Set the device used in target regions
d1233 5
a1237 5
     Set to choose the device which is used in a 'target' region, unless
     the value is overridden by 'omp_set_default_device' or by a
     'device' clause.  The value shall be the nonnegative device number.
     If no device with the given device number exists, the code is
     executed on the host.  If unset, device number 0 will be used.
d1248 1
a1248 1
3.4 'OMP_DYNAMIC' - Dynamic adjustment of threads
d1254 2
a1255 2
     'TRUE' or 'FALSE'.  If undefined, dynamic adjustment is disabled by
     default.
d1266 1
a1266 1
3.5 'OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1283 1
a1283 1
3.6 'OMP_MAX_TASK_PRIORITY' - Set the maximum priority
d1286 1
a1286 1
number that can be set for a task.
d1288 2
a1289 2
     Specifies the initial value for the maximum priority value that can
     be set for a task.  The value of this variable shall be a
d1302 1
a1302 1
3.7 'OMP_NESTED' - Nested parallel regions
d1308 1
a1308 1
     environment variable shall be 'TRUE' or 'FALSE'.  If undefined,
d1320 1
a1320 1
3.8 'OMP_NUM_THREADS' - Specifies the number of threads to use
d1324 5
a1328 5
     Specifies the default number of threads to use in parallel regions.
     The value of this variable shall be a comma-separated list of
     positive integers; the value specified the number of threads to use
     for the corresponding nested level.  If undefined one thread per
     CPU is used.
d1339 1
a1339 1
3.9 'OMP_PROC_BIND' - Whether theads may be moved between CPUs
d1344 1
a1344 1
     to 'TRUE', OpenMP theads should not be moved; if set to 'FALSE'
d1346 1
a1346 1
     values 'MASTER', 'CLOSE' and 'SPREAD' can be used to specify the
d1348 3
a1350 3
     'MASTER' the worker threads are in the same place partition as the
     master thread.  With 'CLOSE' those are kept close to the master
     thread in contiguous place partitions.  And with 'SPREAD' a sparse
d1353 2
a1354 2
     When undefined, 'OMP_PROC_BIND' defaults to 'TRUE' when
     'OMP_PLACES' or 'GOMP_CPU_AFFINITY' is set and 'FALSE' otherwise.
d1366 1
a1366 1
3.10 'OMP_PLACES' - Specifies on which CPUs the theads should be placed
d1370 3
a1372 3
     The thread placement can be either specified using an abstract name
     or by an explicit list of the places.  The abstract names
     'threads', 'cores' and 'sockets' can be optionally followed by a
d1374 3
a1376 3
     shall be created.  With 'threads' each place corresponds to a
     single hardware thread; 'cores' to a single core with the
     corresponding number of hardware threads; and with 'sockets' the
d1378 1
a1378 1
     be shown by setting the 'OMP_DISPLAY_ENV' environment variable.
d1391 2
a1392 2
     specifies the same places list: '"{0,1,2}, {3,4,6}, {7,8,9},
     {10,11,12}"'; '"{0:3}, {3:3}, {7:3}, {10:3}"'; and '"{0:2}:4:3"'.
d1394 2
a1395 2
     If 'OMP_PLACES' and 'GOMP_CPU_AFFINITY' are unset and
     'OMP_PROC_BIND' is either unset or 'false', threads may be moved
d1408 1
a1408 1
3.11 'OMP_STACKSIZE' - Set default thread stack size
d1413 7
a1419 7
     is suffixed by 'B', 'K', 'M' or 'G', in which case the size is,
     respectively, in bytes, kilobytes, megabytes or gigabytes.  This is
     different from 'pthread_attr_setstacksize' which gets the number of
     bytes as an argument.  If the stack size cannot be set due to
     system constraints, an error is reported and the initial stack size
     is left unchanged.  If undefined, the stack size is system
     dependent.
d1427 1
a1427 1
3.12 'OMP_SCHEDULE' - How threads are scheduled
d1431 5
a1435 5
     Allows to specify 'schedule type' and 'chunk size'.  The value of
     the variable shall have the form: 'type[,chunk]' where 'type' is
     one of 'static', 'dynamic', 'guided' or 'auto' The optional 'chunk'
     size shall be a positive integer.  If undefined, dynamic scheduling
     and a chunk size of 1 is used.
d1447 1
a1447 1
3.13 'OMP_THREAD_LIMIT' - Set the maximum number of threads
d1464 1
a1464 1
3.14 'OMP_WAIT_POLICY' - How waiting threads are handled
d1469 2
a1470 2
     the value is 'PASSIVE', waiting threads should not consume CPU
     power while waiting; while the value is 'ACTIVE' specifies that
d1483 1
a1483 1
3.15 'GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d1491 2
a1492 2
     (M-N:S). CPU numbers are zero based.  For example,
     'GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
d1496 1
a1496 1
     beginning of the list.  'GOMP_CPU_AFFINITY=0' binds all threads to
d1501 10
a1510 10
     language-specific library functions, e.g., 'getenv' in C or
     'GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
     setting of the 'GOMP_CPU_AFFINITY' environment variable.  A defined
     CPU affinity on startup cannot be changed or disabled during the
     runtime of the application.

     If both 'GOMP_CPU_AFFINITY' and 'OMP_PROC_BIND' are set,
     'OMP_PROC_BIND' has a higher precedence.  If neither has been set
     and 'OMP_PROC_BIND' is unset, or when 'OMP_PROC_BIND' is set to
     'FALSE', the host system will handle the assignment of threads to
d1519 1
a1519 1
3.16 'GOMP_DEBUG' - Enable debugging output
d1523 2
a1524 2
     Enable debugging output.  The variable should be set to '0'
     (disabled, also the default if not set), or '1' (enabled).
d1533 1
a1533 1
3.17 'GOMP_STACKSIZE' - Set default thread stack size
d1538 1
a1538 1
     from 'pthread_attr_setstacksize' which gets the number of bytes as
d1555 1
a1555 1
3.18 'GOMP_SPINCOUNT' - Set the busy-wait spin count
d1561 1
a1561 1
     value may be either 'INFINITE', 'INFINITY' to always wait actively
d1564 9
a1572 8
     suffixes acting as multiplication factors: 'k' (kilo, thousand),
     'M' (mega, million), 'G' (giga, billion), or 'T' (tera, trillion).
     If undefined, 0 is used when 'OMP_WAIT_POLICY' is 'PASSIVE',
     300,000 is used when 'OMP_WAIT_POLICY' is undefined and 30 billion
     is used when 'OMP_WAIT_POLICY' is 'ACTIVE'.  If there are more
     OpenMP threads than available CPUs, 1000 and 100 spins are used for
     'OMP_WAIT_POLICY' being 'ACTIVE' or undefined, respectively; unless
     the 'GOMP_SPINCOUNT' is lower or 'OMP_WAIT_POLICY' is 'PASSIVE'.
d1580 1
a1580 1
3.19 'GOMP_RTEMS_THREAD_POOLS' - Set the RTEMS specific thread pools
d1586 4
a1589 4
     thread pools.  The format for 'GOMP_RTEMS_THREAD_POOLS' is a list
     of optional '<thread-pool-count>[$<priority>]@@<scheduler-name>'
     configurations separated by ':' where:
        * '<thread-pool-count>' is the thread pool count for this
d1591 3
a1593 2
        * '$<priority>' is an optional priority for the worker threads
          of a thread pool according to 'pthread_setschedparam'.  In
d1599 2
a1600 1
        * '@@<scheduler-name>' is the scheduler instance name according
d1603 5
a1607 4
     instance, then each OpenMP master thread of this scheduler instance
     will use its own dynamically allocated thread pool.  To limit the
     worker thread count of the thread pools, each OpenMP master thread
     must call 'omp_set_num_threads'.
d1609 2
a1610 2
     Lets suppose we have three scheduler instances 'IO', 'WRK0', and
     'WRK1' with 'GOMP_RTEMS_THREAD_POOLS' set to '"1@@WRK0:3$4@@WRK1"'.
d1612 1
a1612 1
     'IO'.  In the scheduler instance 'WRK0' there is one thread pool
d1615 3
a1617 3
     master thread that created it.  In the scheduler instance 'WRK1'
     there are three thread pools available and their worker threads run
     at priority four.
d1626 4
a1629 4
compile-time flag '-fopenacc' must be specified.  This enables the
OpenACC directive '#pragma acc' in C/C++ and '!$accp' directives in free
form, 'c$acc', '*$acc' and '!$acc' directives in fixed form, '!$'
conditional compilation sentinels in free form and 'c$', '*$' and '!$'
d1635 1
a1635 1
found in the OpenACC (https://www.openacc.org) Application Programming
d1639 2
a1640 2
future versions of GCC. See <https://gcc.gnu.org/wiki/OpenACC> for more
information.
d1650 3
a1652 3
throw exceptions.  Generally, they are available only for the host, with
the exception of 'acc_on_device', which is available for both the host
and the acceleration device.
d1715 1
a1715 1
5.1 'acc_get_num_devices' - Get number of devices for given device type
d1723 1
a1723 1
     _Prototype_:   'int acc_get_num_devices(acc_device_t devicetype);'
d1726 2
a1727 2
     _Interface_:   'integer function acc_get_num_devices(devicetype)'
                    'integer(kind=acc_device_kind) devicetype'
d1730 1
a1730 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1736 1
a1736 1
5.2 'acc_set_device_type' - Set type of device accelerator to use.
d1745 1
a1745 1
     _Prototype_:   'acc_set_device_type(acc_device_t devicetype);'
d1748 2
a1749 2
     _Interface_:   'subroutine acc_set_device_type(devicetype)'
                    'integer(kind=acc_device_kind) devicetype'
d1752 1
a1752 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1758 1
a1758 1
5.3 'acc_get_device_type' - Get type of device accelerator to be used.
d1766 1
a1766 1
     _Prototype_:   'acc_device_t acc_get_device_type(void);'
d1769 2
a1770 2
     _Interface_:   'function acc_get_device_type(void)'
                    'integer(kind=acc_device_kind) acc_get_device_type'
d1773 1
a1773 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1779 1
a1779 1
5.4 'acc_set_device_num' - Set device number to use.
d1788 2
a1789 1
     _Prototype_:   'acc_set_device_num(int num, acc_device_t devicetype);'
d1792 3
a1794 3
     _Interface_:   'subroutine acc_set_device_num(devicenum, devicetype)'
                    'integer devicenum'
                    'integer(kind=acc_device_kind) devicetype'
d1797 1
a1797 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1803 1
a1803 1
5.5 'acc_get_device_num' - Get device number to be used.
d1812 1
a1812 1
     _Prototype_:   'int acc_get_device_num(acc_device_t devicetype);'
d1815 3
a1817 3
     _Interface_:   'function acc_get_device_num(devicetype)'
                    'integer(kind=acc_device_kind) devicetype'
                    'integer acc_get_device_num'
d1820 1
a1820 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1826 1
a1826 1
5.6 'acc_async_test' - Test for completion of a specific asynchronous operation.
d1831 4
a1834 4
     specified in ARG.  In C/C++, a non-zero value will be returned to
     indicate the specified asynchronous operation has completed.  While
     Fortran will return a 'true'.  If the asynchrounous operation has
     not completed, C/C++ returns a zero and Fortran returns a 'false'.
d1837 1
a1837 1
     _Prototype_:   'int acc_async_test(int arg);'
d1840 3
a1842 3
     _Interface_:   'function acc_async_test(arg)'
                    'integer(kind=acc_handle_kind) arg'
                    'logical acc_async_test'
d1845 1
a1845 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1851 1
a1851 1
5.7 'acc_async_test_all' - Tests for completion of all asynchronous operations.
d1857 3
a1859 3
     asynchronous operations have completed.  While Fortran will return
     a 'true'.  If any asynchronous operation has not completed, C/C++
     returns a zero and Fortran returns a 'false'.
d1862 1
a1862 1
     _Prototype_:   'int acc_async_test_all(void);'
d1865 2
a1866 2
     _Interface_:   'function acc_async_test()'
                    'logical acc_get_device_num'
d1869 1
a1869 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1875 1
a1875 1
5.8 'acc_wait' - Wait for completion of a specific asynchronous operation.
d1883 1
a1883 4
     _Prototype_:   'acc_wait(arg);'
     _Prototype     'acc_async_wait(arg);'
     (OpenACC 1.0
     compatibility)_:
d1886 2
a1887 6
     _Interface_:   'subroutine acc_wait(arg)'
                    'integer(acc_handle_kind) arg'
     _Interface     'subroutine acc_async_wait(arg)'
     (OpenACC 1.0
     compatibility)_:
                    'integer(acc_handle_kind) arg'
d1890 1
a1890 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1896 1
a1896 1
5.9 'acc_wait_all' - Waits for completion of all asynchronous operations.
d1904 1
a1904 4
     _Prototype_:   'acc_wait_all(void);'
     _Prototype     'acc_async_wait_all(void);'
     (OpenACC 1.0
     compatibility)_:
d1907 1
a1907 4
     _Interface_:   'subroutine acc_wait_all()'
     _Interface     'subroutine acc_async_wait_all()'
     (OpenACC 1.0
     compatibility)_:
d1910 1
a1910 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1916 1
a1916 1
5.10 'acc_wait_all_async' - Wait for completion of all asynchronous operations.
d1925 1
a1925 1
     _Prototype_:   'acc_wait_all_async(int async);'
d1928 2
a1929 2
     _Interface_:   'subroutine acc_wait_all_async(async)'
                    'integer(acc_handle_kind) async'
d1932 1
a1932 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1938 1
a1938 1
5.11 'acc_wait_async' - Wait for completion of asynchronous operations.
d1946 1
a1946 1
     _Prototype_:   'acc_wait_async(int arg, int async);'
d1949 2
a1950 2
     _Interface_:   'subroutine acc_wait_async(arg, async)'
                    'integer(acc_handle_kind) arg, async'
d1953 1
a1953 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1959 1
a1959 1
5.12 'acc_init' - Initialize runtime for a specific device type.
d1963 2
a1964 2
     This function initializes the runtime for the device type specified
     in DEVICETYPE.
d1967 1
a1967 1
     _Prototype_:   'acc_init(acc_device_t devicetype);'
d1970 2
a1971 2
     _Interface_:   'subroutine acc_init(devicetype)'
                    'integer(acc_device_kind) devicetype'
d1974 1
a1974 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1980 1
a1980 1
5.13 'acc_shutdown' - Shuts down the runtime for a specific device type.
d1988 1
a1988 1
     _Prototype_:   'acc_shutdown(acc_device_t devicetype);'
d1991 2
a1992 2
     _Interface_:   'subroutine acc_shutdown(devicetype)'
                    'integer(acc_device_kind) devicetype'
d1995 1
a1995 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2001 1
a2001 1
5.14 'acc_on_device' - Whether executing on a particular device
d2006 1
a2006 1
     particular device specified in DEVICETYPE.  In C/C++ a non-zero
d2008 1
a2008 1
     specified device type.  In Fortran, 'true' will be returned.  If
d2010 1
a2010 1
     will return a zero, while Fortran will return 'false'.
d2013 1
a2013 1
     _Prototype_:   'acc_on_device(acc_device_t devicetype);'
d2016 3
a2018 3
     _Interface_:   'function acc_on_device(devicetype)'
                    'integer(acc_device_kind) devicetype'
                    'logical acc_on_device'
d2021 1
a2021 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2027 1
a2027 1
5.15 'acc_malloc' - Allocate device memory.
d2031 1
a2031 1
     This function allocates LEN bytes of device memory.  It returns the
d2035 1
a2035 1
     _Prototype_:   'd_void* acc_malloc(size_t len);'
d2038 1
a2038 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2044 1
a2044 1
5.16 'acc_free' - Free device memory.
d2048 1
a2048 1
     Free previously allocated device memory at the device address 'a'.
d2051 1
a2051 1
     _Prototype_:   'acc_free(d_void *a);'
d2054 1
a2054 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2060 1
a2060 1
5.17 'acc_copyin' - Allocate device memory and copy host memory to it.
d2065 1
a2065 1
     maps it to the specified host address in A.  The device address of
d2068 3
a2070 3
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
     a variable or array element and LEN specifies the length in bytes.
d2073 1
a2073 1
     _Prototype_:   'void *acc_copyin(h_void *a, size_t len);'
d2076 5
a2080 5
     _Interface_:   'subroutine acc_copyin(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_copyin(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2083 1
a2083 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2089 1
a2089 1
5.18 'acc_present_or_copyin' - If the data is not present on the device, allocate device memory and copy from host memory.
d2094 3
a2096 3
     LEN is present or not.  If it is not present, then device memory
     will be allocated and the host memory copied.  The device address
     of the newly allocated device memory is returned.
d2098 2
a2099 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2103 2
a2104 2
     _Prototype_:   'void *acc_present_or_copyin(h_void *a, size_t len);'
     _Prototype_:   'void *acc_pcopyin(h_void *a, size_t len);'
d2107 10
a2116 10
     _Interface_:   'subroutine acc_present_or_copyin(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_present_or_copyin(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_pcopyin(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_pcopyin(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2119 1
a2119 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2125 1
a2125 1
5.19 'acc_create' - Allocate device memory and map it to host memory.
d2130 1
a2130 1
     specified by the host address A with a length of LEN bytes.  In
d2134 2
a2135 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2139 1
a2139 1
     _Prototype_:   'void *acc_create(h_void *a, size_t len);'
d2142 5
a2146 5
     _Interface_:   'subroutine acc_create(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_create(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2149 1
a2149 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2155 1
a2155 1
5.20 'acc_present_or_create' - If the data is not present on the device, allocate device memory and map it to host memory.
d2160 2
a2161 2
     LEN is present or not.  If it is not present, then device memory
     will be allocated and mapped to host memory.  In C/C++, the device
d2164 2
a2165 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2169 2
a2170 2
     _Prototype_:   'void *acc_present_or_create(h_void *a, size_t len)'
     _Prototype_:   'void *acc_pcreate(h_void *a, size_t len)'
d2173 10
a2182 10
     _Interface_:   'subroutine acc_present_or_create(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_present_or_create(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_pcreate(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_pcreate(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2185 1
a2185 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2191 1
a2191 1
5.21 'acc_copyout' - Copy device memory to host memory.
d2198 2
a2199 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2203 1
a2203 1
     _Prototype_:   'acc_copyout(h_void *a, size_t len);'
d2206 5
a2210 5
     _Interface_:   'subroutine acc_copyout(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_copyout(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2213 1
a2213 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2219 1
a2219 1
5.22 'acc_delete' - Free device memory.
d2226 2
a2227 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2231 1
a2231 1
     _Prototype_:   'acc_delete(h_void *a, size_t len);'
d2234 5
a2238 5
     _Interface_:   'subroutine acc_delete(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_delete(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2241 1
a2241 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2247 1
a2247 1
5.23 'acc_update_device' - Update device memory from mapped host memory.
d2255 2
a2256 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2260 1
a2260 1
     _Prototype_:   'acc_update_device(h_void *a, size_t len);'
d2263 5
a2267 5
     _Interface_:   'subroutine acc_update_device(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_update_device(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2270 1
a2270 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2276 1
a2276 1
5.24 'acc_update_self' - Update host memory from mapped device memory.
d2284 2
a2285 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2289 1
a2289 1
     _Prototype_:   'acc_update_self(h_void *a, size_t len);'
d2292 5
a2296 5
     _Interface_:   'subroutine acc_update_self(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_update_self(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2299 1
a2299 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2305 1
a2305 1
5.25 'acc_map_data' - Map previously allocated device memory to host memory.
d2310 1
a2310 1
     The device memory is specified with the device address D.  The host
d2314 1
a2314 1
     _Prototype_:   'acc_map_data(h_void *h, d_void *d, size_t len);'
d2317 1
a2317 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2323 1
a2323 1
5.26 'acc_unmap_data' - Unmap device memory from host memory.
d2327 1
a2327 1
     This function unmaps previously mapped device and host memory.  The
d2331 1
a2331 1
     _Prototype_:   'acc_unmap_data(h_void *h);'
d2334 1
a2334 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2340 1
a2340 1
5.27 'acc_deviceptr' - Get device pointer associated with specific host address.
d2348 1
a2348 1
     _Prototype_:   'void *acc_deviceptr(h_void *h);'
d2351 1
a2351 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2357 1
a2357 1
5.28 'acc_hostptr' - Get host pointer associated with specific device address.
d2365 1
a2365 1
     _Prototype_:   'void *acc_hostptr(d_void *d);'
d2368 1
a2368 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2374 1
a2374 1
5.29 'acc_is_present' - Indicate whether host variable / array is present on device.
d2378 2
a2379 2
     This function indicates whether the specified host address in A and
     a length of LEN bytes is present on the device.  In C/C++, a
d2381 1
a2381 1
     memory on the device.  A zero is returned to indicate the memory is
d2384 2
a2385 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2387 2
a2388 2
     If the host memory is mapped to device memory, then a 'true' is
     returned.  Otherwise, a 'false' is return to indicate the mapped
d2392 1
a2392 1
     _Prototype_:   'int acc_is_present(h_void *a, size_t len);'
d2395 7
a2401 7
     _Interface_:   'function acc_is_present(a)'
                    'type, dimension(:[,:]...) :: a'
                    'logical acc_is_present'
     _Interface_:   'function acc_is_present(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'logical acc_is_present'
d2404 1
a2404 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2410 1
a2410 1
5.30 'acc_memcpy_to_device' - Copy host memory to device memory.
d2419 2
a2420 2
     _Prototype_:   'acc_memcpy_to_device(d_void *dest, h_void *src, size_t
                    bytes);'
d2423 1
a2423 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2429 1
a2429 1
5.31 'acc_memcpy_from_device' - Copy device memory to host memory.
d2438 2
a2439 2
     _Prototype_:   'acc_memcpy_from_device(d_void *dest, h_void *src,
                    size_t bytes);'
d2442 1
a2442 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2448 1
a2448 1
5.32 'acc_get_current_cuda_device' - Get CUDA device handle.
d2452 1
a2452 1
     This function returns the CUDA device handle.  This handle is the
d2456 1
a2456 1
     _Prototype_:   'void *acc_get_current_cuda_device(void);'
d2459 1
a2459 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2465 1
a2465 1
5.33 'acc_get_current_cuda_context' - Get CUDA context handle.
d2469 1
a2469 1
     This function returns the CUDA context handle.  This handle is the
d2473 1
a2473 1
     _Prototype_:   'acc_get_current_cuda_context(void);'
d2476 1
a2476 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2482 1
a2482 1
5.34 'acc_get_cuda_stream' - Get CUDA stream handle.
d2486 1
a2486 1
     This function returns the CUDA stream handle.  This handle is the
d2490 1
a2490 1
     _Prototype_:   'acc_get_cuda_stream(void);'
d2493 1
a2493 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2499 1
a2499 1
5.35 'acc_set_cuda_stream' - Set CUDA stream handle.
d2507 1
a2507 1
     _Prototype_:   'acc_set_cuda_stream(int async void *stream);'
d2510 1
a2510 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2519 1
a2519 1
The variables 'ACC_DEVICE_TYPE' and 'ACC_DEVICE_NUM' are defined by
d2521 1
a2521 1
'GCC_ACC_NOTIFY' is used for diagnostic purposes.
d2532 1
a2532 1
6.1 'ACC_DEVICE_TYPE'
d2536 1
a2536 1
     OpenACC specification v2.0 (https://www.openacc.org), section 4.1.
d2541 1
a2541 1
6.2 'ACC_DEVICE_NUM'
d2545 1
a2545 1
     OpenACC specification v2.0 (https://www.openacc.org), section 4.2.
d2550 1
a2550 1
6.3 'GCC_ACC_NOTIFY'
d2562 1
a2562 1
This applies to the 'nvptx' plugin only.
d2571 4
a2574 4
'async' and 'wait' clauses.  When the 'async' clause is first used with
a directive, it creates a CUDA stream.  If an 'async-argument' is used
with the 'async' clause, then the stream is associated with the
specified 'async-argument'.
d2577 2
a2578 2
the 'async-argument' of an 'async' clause, both the 'wait' clause and
the 'wait' directive can be used.  When either the clause or directive
d2581 1
a2581 1
'async-argument', that is, stream, have completed.
d2584 2
a2585 2
of using the 'async' clause, is done without any intervention by the
caller.  This implies the association between the 'async-argument' and
d2588 5
a2592 5
function 'acc_set_cuda_stream'.  When the function 'acc_set_cuda_stream'
is called, the CUDA stream that was originally associated with the
'async' clause will be destroyed.  Caution should be taken when changing
the association as subsequent references to the 'async-argument' refer
to a different CUDA stream.
d2609 4
a2612 4
programs that use the Runtime library directly, or another library based
on the Runtime library, e.g., CUBLAS(1). This chapter describes the use
cases and what changes are required in order to use both the OpenACC
library and the CUBLAS and Runtime libraries within a program.
d2618 2
a2619 2
called prior to any of the functions in the OpenACC library.  More
specifically, the function 'cublasCreate()'.
d2624 5
a2628 5
returned to the caller.  The OpenACC library also requires
initialization and allocation of hardware resources.  Since the CUBLAS
library has already allocated the hardware resources for the device, all
that is left to do is to initialize the OpenACC library and acquire the
hardware resources on the host.
d2631 10
a2640 10
and allocate the host hardware resources, you need to acquire the device
number that was allocated during the call to 'cublasCreate()'.  The
invoking of the runtime library function 'cudaGetDevice()' accomplishes
this.  Once acquired, the device number is passed along with the device
type as parameters to the OpenACC library function
'acc_set_device_num()'.

   Once the call to 'acc_set_device_num()' has completed, the OpenACC
library uses the context that was created during the call to
'cublasCreate()'.  In other words, both libraries will be sharing the
d2661 1
a2661 2

                              Use Case 1
d2667 2
a2668 2
is called prior to any of the functions in the CUBLAS library.  More
specificially, the function 'acc_set_device_num()'.
d2670 1
a2670 1
   In the use case presented here, the function 'acc_set_device_num()'
d2672 3
a2674 3
resources on the host and the device.  In the call to the function, the
call parameters specify which device to use and what device type to use,
i.e., 'acc_device_nvidia'.  It should be noted that this is but one
d2676 1
a2676 1
hardware resources.  Other methods are available through the use of
d2679 1
a2679 1
   Once the call to 'acc_set_device_num()' has completed, other OpenACC
d2681 4
a2684 4
'acc_copyin()'.  In addition, calls can be made to functions in the
CUBLAS library.  In the use case a call to 'cublasCreate()' is made
subsequent to the calls to 'acc_copyin()'.  As seen in the previous use
case, a call to 'cublasCreate()' initializes the CUBLAS library and
d2686 1
a2686 1
since the device has already been allocated, 'cublasCreate()' will only
d2688 1
a2688 1
resources on the host.  The context that was created as part of the
d2730 1
a2730 2

                              Use Case 2
d2737 1
a2737 1
'ACC_DEVICE_TYPE' and 'ACC_DEVICE_NUM', respecively.  These two
d2739 2
a2740 2
'acc_set_device_num()'.  As seen in the second use case, the device type
and device number were specified using 'acc_set_device_num()'.  If
d2742 1
a2742 1
call to 'acc_set_device_num()' would not be required.
d2744 4
a2747 4
   The use of the environment variables is only relevant when an OpenACC
function is called prior to a call to 'cudaCreate()'.  If 'cudaCreate()'
is called prior to a call to an OpenACC function, then you must call
'acc_set_device_num()'(2)
d2753 2
a2754 2
Interoperability", in "CUDA Driver API", TRM-06703-001, Version 5.5, for
additional information on library interoperability.
d2756 3
a2758 3
   (2) More complete information about 'ACC_DEVICE_TYPE' and
'ACC_DEVICE_NUM' can be found in sections 4.1 and 4.2 of the OpenACC
(https://www.openacc.org) Application Programming Interface”, Version
d2767 2
a2768 2
The following sections present notes on the external ABI as presented by
libgomp.  Only maintainers should need them.
d2829 1
a2829 1
The target should implement the '__sync' builtins.
d2845 1
a2845 1
Expands to the '__sync_synchronize' builtin.
d2861 4
a2864 4
In _most_ cases we can map this directly to '__thread'.  Except that OMP
allows constructors for C++ objects.  We can either refuse to support
this (how often is it used?)  or we can implement something akin to
.ctors.
d2896 2
a2897 2
   It is not clear what to do with bare FOR or SECTION blocks.  The only
thing I can figure is that we do something like:
d2915 2
a2916 2
for the two variables, i.e.  not something you could write directly in
C. Presumably this only makes sense if the "outer" x and y are global
d2929 4
a2932 4
pointer to an array of the type of the variable, indexed by the thread's
TEAM_ID.  The thread stores its final value into the array, and after
the barrier, the master thread iterates over the array to collect the
values.
d2969 3
a2971 3
   The function needs to create the appropriate number of threads and/or
launch them from the dock.  It needs to create the team structure and
assign team ids.
d2976 1
a2976 1
'omp_in_parallel()' state.
d3028 2
a3029 2
also pull it into a local variable if we like, but since its supposed to
remain unchanged, we can also not if we like.
d3031 5
a3035 5
   If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be able
to get away with no work-sharing context at all, since we can simply
perform the arithmetic directly in each thread to divide up the
iterations.  Which would mean that we wouldn't need to call any of these
routines.
d3137 2
a3138 2
"openacc", or "openmp", or both to the keywords field in the bug report,
as appropriate.
d3148 1
a3148 1
     Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
d3176 3
a3178 3
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
d3197 10
a3206 9
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
d3243 2
a3244 2
     infringement under applicable copyright law, except executing it on
     a computer or modifying a private copy.  Propagation includes
d3258 2
a3259 2
     the extent that warranties are provided), that licensees may convey
     the work under this License, and how to view a copy of this
d3267 2
a3268 2
     for making modifications to it.  "Object code" means any non-source
     form of a work.
d3279 4
a3282 4
     Major Component, and (b) serves only to enable use of the work with
     that Major Component, or to implement a Standard Interface for
     which an implementation is available to the public in source code
     form.  A "Major Component", in this context, means a major
d3290 3
a3292 3
     work) run the object code and to modify the work, including scripts
     to control those activities.  However, it does not include the
     work's System Libraries, or general-purpose tools or generally
d3295 4
a3298 4
     Corresponding Source includes interface definition files associated
     with source files for the work, and the source code for shared
     libraries and dynamically linked subprograms that the work is
     specifically designed to require, such as by intimate data
d3315 4
a3318 4
     a covered work is covered by this License only if the output, given
     its content, constitutes a covered work.  This License acknowledges
     your rights of fair use or other equivalent, as provided by
     copyright law.
d3323 8
a3330 8
     sole purpose of having them make modifications exclusively for you,
     or provide you with facilities for running those works, provided
     that you comply with the terms of this License in conveying all
     material for which you do not control copyright.  Those thus making
     or running the covered works for you must do so exclusively on your
     behalf, under your direction and control, on terms that prohibit
     them from making any copies of your copyrighted material outside
     their relationship with you.
d3347 2
a3348 2
     with respect to the covered work, and you disclaim any intention to
     limit operation or modification of the work as a means of
d3418 2
a3419 2
          written offer, valid for at least three years and valid for as
          long as you offer spare parts or customer support for that
d3429 2
a3430 2
       c. Convey individual copies of the object code with a copy of the
          written offer to provide the Corresponding Source.  This
d3436 2
a3437 2
          place (gratis or for a charge), and offer equivalent access to
          the Corresponding Source in the same way through the same
d3441 4
a3444 4
          Corresponding Source may be on a different server (operated by
          you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to the
          object code saying where to find the Corresponding Source.
d3446 2
a3447 2
          remain obligated to ensure that it is available for as long as
          needed to satisfy these requirements.
d3454 1
d3462 2
a3463 2
     incorporation into a dwelling.  In determining whether a product is
     a consumer product, doubtful cases shall be resolved in favor of
d3494 5
a3498 5
     warranty, or updates for a work that has been modified or installed
     by the recipient, or for the User Product in which it has been
     modified or installed.  Access to a network may be denied when the
     modification itself materially and adversely affects the operation
     of the network or violates the rules and protocols for
d3528 2
a3529 2
     holders of that material) supplement the terms of this License with
     terms:
d3539 3
a3541 2
          or requiring that modified versions of such material be marked
          in reasonable ways as different from the original version; or
d3560 5
a3564 4
     contains a further restriction but permits relicensing or conveying
     under this License, you may add to a covered work material governed
     by the terms of that license document, provided that the further
     restriction does not survive such relicensing or conveying.
d3580 2
a3581 2
     under this License (including any patent licenses granted under the
     third paragraph of section 11).
d3585 2
a3586 2
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
d3598 4
a3601 4
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, you do not qualify to receive new licenses
     for the same material under section 10.
d3615 1
a3615 1
  10. Automatic Licensing of Downstream Recipients.
d3629 4
a3632 4
     could give under the previous paragraph, plus a right to possession
     of the Corresponding Source of the work from the predecessor in
     interest, if the predecessor has it or can get it with reasonable
     efforts.
d3636 6
a3641 6
     may not impose a license fee, royalty, or other charge for exercise
     of rights granted under this License, and you may not initiate
     litigation (including a cross-claim or counterclaim in a lawsuit)
     alleging that any patent claim is infringed by making, using,
     selling, offering for sale, or importing the Program or any portion
     of it.
d3643 1
a3643 1
  11. Patents.
d3663 2
a3664 2
     otherwise run, modify and propagate the contents of its contributor
     version.
d3669 3
a3671 3
     patent or covenant not to sue for patent infringement).  To "grant"
     such a patent license to a party means to make such an agreement or
     commitment not to enforce a patent against the party.
d3701 10
a3710 10
     party that is in the business of distributing software, under which
     you make payment to the third party based on the extent of your
     activity of conveying the work, and under which the third party
     grants, to any of the parties who would receive the covered work
     from you, a discriminatory patent license (a) in connection with
     copies of the covered work conveyed by you (or copies made from
     those copies), or (b) primarily for and in connection with specific
     products or compilations that contain the covered work, unless you
     entered into that arrangement, or that patent license was granted,
     prior to 28 March 2007.
d3716 1
a3716 1
  12. No Surrender of Others' Freedom.
d3718 11
a3728 10
     If conditions are imposed on you (whether by court order, agreement
     or otherwise) that contradict the conditions of this License, they
     do not excuse you from the conditions of this License.  If you
     cannot convey a covered work so as to satisfy simultaneously your
     obligations under this License and any other pertinent obligations,
     then as a consequence you may not convey it at all.  For example,
     if you agree to terms that obligate you to collect a royalty for
     further conveying from those to whom you convey the Program, the
     only way you could satisfy both those terms and this License would
     be to refrain entirely from conveying the Program.
d3730 1
a3730 1
  13. Use with the GNU Affero General Public License.
d3741 1
a3741 1
  14. Revised Versions of this License.
d3744 4
a3747 3
     versions of the GNU General Public License from time to time.  Such
     new versions will be similar in spirit to the present version, but
     may differ in detail to address new problems or concerns.
d3753 4
a3756 4
     that numbered version or of any later version published by the Free
     Software Foundation.  If the Program does not specify a version
     number of the GNU General Public License, you may choose any
     version ever published by the Free Software Foundation.
d3768 1
a3768 1
  15. Disclaimer of Warranty.
d3771 1
a3771 1
     APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
d3775 1
a3775 1
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
d3780 1
a3780 1
  16. Limitation of Liability.
d3784 2
a3785 2
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
     DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
d3793 1
a3793 1
  17. Interpretation of Sections 15 and 16.
d3802 1
d3833 1
a3833 1
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
d3842 1
a3842 1
     This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
d3844 1
a3844 1
     under certain conditions; type 'show c' for details.
d3846 1
a3846 1
   The hypothetical commands 'show w' and 'show c' should show the
d3854 1
a3854 1
the GNU GPL, see <http://www.gnu.org/licenses/>.
d3861 1
a3861 1
please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
d3872 1
a3872 1
     <http://fsf.org/>
d3897 2
a3898 2
     of subject matter or whether it is published as a printed book.  We
     recommend this License principally for works whose purpose is
d3904 2
a3905 2
     that contains a notice placed by the copyright holder saying it can
     be distributed under the terms of this License.  Such a notice
d3909 3
a3911 3
     of the public is a licensee, and is addressed as "you".  You accept
     the license if you copy, modify or distribute the work in a way
     requiring permission under copyright law.
d3929 6
a3934 6
     titles are designated, as being those of Invariant Sections, in the
     notice that says that the Document is released under this License.
     If a section does not fit the above definition of Secondary then it
     is not allowed to be designated as Invariant.  The Document may
     contain zero Invariant Sections.  If the Document does not identify
     any Invariant Sections then there are none.
d3945 10
a3954 10
     straightforwardly with generic text editors or (for images composed
     of pixels) generic paint programs or (for drawings) some widely
     available drawing editor, and that is suitable for input to text
     formatters or for automatic translation to a variety of formats
     suitable for input to text formatters.  A copy made in an otherwise
     Transparent file format whose markup, or absence of markup, has
     been arranged to thwart or discourage subsequent modification by
     readers is not Transparent.  An image format is not Transparent if
     used for any substantial amount of text.  A copy that is not
     "Transparent" is called "Opaque".
d3958 8
a3965 8
     SGML or XML using a publicly available DTD, and standard-conforming
     simple HTML, PostScript or PDF designed for human modification.
     Examples of transparent image formats include PNG, XCF and JPG.
     Opaque formats include proprietary formats that can be read and
     edited only by proprietary word processors, SGML or XML for which
     the DTD and/or processing tools are not generally available, and
     the machine-generated HTML, PostScript or PDF produced by some word
     processors for output purposes only.
d4003 2
a4004 2
     distribute a large enough number of copies you must also follow the
     conditions in section 3.
d4018 6
a4023 5
     front cover must present the full title with all words of the title
     equally prominent and visible.  You may add other material on the
     covers in addition.  Copying with changes limited to the covers, as
     long as they preserve the title of the Document and satisfy these
     conditions, can be treated as verbatim copying in other respects.
d4031 12
a4042 11
     numbering more than 100, you must either include a machine-readable
     Transparent copy along with each Opaque copy, or state in or with
     each Opaque copy a computer-network location from which the general
     network-using public has access to download using public-standard
     network protocols a complete Transparent copy of the Document, free
     of added material.  If you use the latter option, you must take
     reasonably prudent steps, when you begin distribution of Opaque
     copies in quantity, to ensure that this Transparent copy will
     remain thus accessible at the stated location until at least one
     year after the last time you distribute an Opaque copy (directly or
     through your agents or retailers) of that edition to the public.
d4045 3
a4047 3
     the Document well before redistributing any large number of copies,
     to give them a chance to provide you with an updated version of the
     Document.
d4053 5
a4057 5
     release the Modified Version under precisely this License, with the
     Modified Version filling the role of the Document, thus licensing
     distribution and modification of the Modified Version to whoever
     possesses a copy of it.  In addition, you must do these things in
     the Modified Version:
d4060 5
a4064 5
          distinct from that of the Document, and from those of previous
          versions (which should, if there were any, be listed in the
          History section of the Document).  You may use the same title
          as a previous version if the original publisher of that
          version gives permission.
d4094 6
a4099 6
          authors, and publisher of the Modified Version as given on the
          Title Page.  If there is no section Entitled "History" in the
          Document, create one stating the title, year, authors, and
          publisher of the Document as given on its Title Page, then add
          an item describing the Modified Version as stated in the
          previous sentence.
d4104 5
a4108 5
          previous versions it was based on.  These may be placed in the
          "History" section.  You may omit a network location for a work
          that was published at least four years before the Document
          itself, or if the original publisher of the version it refers
          to gives permission.
d4111 2
a4112 2
          Preserve the Title of the section, and preserve in the section
          all the substance and tone of each of the contributor
d4115 4
a4118 3
       L. Preserve all the Invariant Sections of the Document, unaltered
          in their text and in their titles.  Section numbers or the
          equivalent are not considered part of the section titles.
d4131 5
a4135 5
     material copied from the Document, you may at your option designate
     some or all of these sections as invariant.  To do this, add their
     titles to the list of Invariant Sections in the Modified Version's
     license notice.  These titles must be distinct from any other
     section titles.
d4144 9
a4152 9
     and a passage of up to 25 words as a Back-Cover Text, to the end of
     the list of Cover Texts in the Modified Version.  Only one passage
     of Front-Cover Text and one of Back-Cover Text may be added by (or
     through arrangements made by) any one entity.  If the Document
     already includes a cover text for the same cover, previously added
     by you or by arrangement made by the same entity you are acting on
     behalf of, you may not add another; but you may replace the old
     one, on explicit permission from the previous publisher that added
     the old one.
d4162 2
a4163 2
     modified versions, provided that you include in the combination all
     of the Invariant Sections of all of the original documents,
d4190 2
a4191 2
     rules of this License for verbatim copying of each of the documents
     in all other respects.
d4195 3
a4197 3
     a copy of this License into the extracted document, and follow this
     License in all other respects regarding verbatim copying of that
     document.
d4202 2
a4203 2
     separate and independent documents or works, in or on a volume of a
     storage or distribution medium, is called an "aggregate" if the
d4248 2
a4249 2
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
d4261 4
a4264 4
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, receipt of a copy of some or all of the
     same material does not give you any rights to use it.
d4266 1
a4266 1
  10. FUTURE REVISIONS OF THIS LICENSE
d4272 1
a4272 1
     <http://www.gnu.org/copyleft/>.
d4279 5
a4283 5
     published (not as a draft) by the Free Software Foundation.  If the
     Document does not specify a version number of this License, you may
     choose any version ever published (not as a draft) by the Free
     Software Foundation.  If the Document specifies that a proxy can
     decide which future versions of this License can be used, that
d4287 1
a4287 1
  11. RELICENSING
d4317 1
d4334 1
a4334 1
Texts, replace the "with...Texts."  line with this:
d4345 3
a4347 3
recommend releasing these examples in parallel under your choice of free
software license, such as the GNU General Public License, to permit
their use in free software.
d4377 2
a4378 2
can greatly alter what fraction of the sales price counts as profit.  If
the price you pay is $50, ten percent of the profit is probably less
d4388 2
a4389 2
ports such as adding a new CPU to the GNU Compiler Collection contribute
more; major new features or packages contribute the most.
d4408 19
d4428 1
a4428 18
* Environment Variable <1>:              OMP_DISPLAY_ENV.       (line 6)
* Environment Variable <2>:              OMP_DEFAULT_DEVICE.    (line 6)
* Environment Variable <3>:              OMP_DYNAMIC.           (line 6)
* Environment Variable <4>:              OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable <5>:              OMP_MAX_TASK_PRIORITY. (line 6)
* Environment Variable <6>:              OMP_NESTED.            (line 6)
* Environment Variable <7>:              OMP_NUM_THREADS.       (line 6)
* Environment Variable <8>:              OMP_PROC_BIND.         (line 6)
* Environment Variable <9>:              OMP_PLACES.            (line 6)
* Environment Variable <10>:             OMP_STACKSIZE.         (line 6)
* Environment Variable <11>:             OMP_SCHEDULE.          (line 6)
* Environment Variable <12>:             OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <13>:             OMP_WAIT_POLICY.       (line 6)
* Environment Variable <14>:             GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <15>:             GOMP_DEBUG.            (line 6)
* Environment Variable <16>:             GOMP_STACKSIZE.        (line 6)
* Environment Variable <17>:             GOMP_SPINCOUNT.        (line 6)
* Environment Variable <18>:             GOMP_RTEMS_THREAD_POOLS.
d4430 1
a4430 1
* FDL, GNU Free Documentation License:   GNU Free Documentation License.
d4432 4
a4436 6
* Implementation specific setting <1>:   OMP_NUM_THREADS.       (line 6)
* Implementation specific setting <2>:   OMP_SCHEDULE.          (line 6)
* Implementation specific setting <3>:   GOMP_STACKSIZE.        (line 6)
* Implementation specific setting <4>:   GOMP_SPINCOUNT.        (line 6)
* Implementation specific setting <5>:   GOMP_RTEMS_THREAD_POOLS.
                                                                (line 6)
d4442 131
a4572 131
Node: Top2083
Node: Enabling OpenMP4489
Node: Runtime Library Routines5276
Node: omp_get_active_level8339
Node: omp_get_ancestor_thread_num9039
Node: omp_get_cancellation9969
Node: omp_get_default_device10783
Node: omp_get_dynamic11459
Node: omp_get_level12334
Node: omp_get_max_active_levels12954
Node: omp_get_max_task_priority13659
Node: omp_get_max_threads14279
Node: omp_get_nested15036
Node: omp_get_num_devices15950
Node: omp_get_num_procs16471
Node: omp_get_num_teams17010
Node: omp_get_num_threads17526
Node: omp_get_proc_bind18615
Node: omp_get_schedule19536
Node: omp_get_team_num20490
Node: omp_get_team_size20989
Node: omp_get_thread_limit21949
Node: omp_get_thread_num22568
Node: omp_in_parallel23439
Node: omp_in_final24088
Node: omp_is_initial_device24762
Node: omp_set_default_device25455
Node: omp_set_dynamic26246
Node: omp_set_max_active_levels27132
Node: omp_set_nested27909
Node: omp_set_num_threads28801
Node: omp_set_schedule29669
Node: omp_init_lock30750
Node: omp_set_lock31403
Node: omp_test_lock32258
Node: omp_unset_lock33234
Node: omp_destroy_lock34165
Node: omp_init_nest_lock34842
Node: omp_set_nest_lock35577
Node: omp_test_nest_lock36492
Node: omp_unset_nest_lock37519
Node: omp_destroy_nest_lock38534
Node: omp_get_wtick39285
Node: omp_get_wtime39877
Node: Environment Variables40653
Node: OMP_CANCELLATION42208
Node: OMP_DISPLAY_ENV42741
Node: OMP_DEFAULT_DEVICE43444
Node: OMP_DYNAMIC44224
Node: OMP_MAX_ACTIVE_LEVELS44820
Node: OMP_MAX_TASK_PRIORITY45470
Node: OMP_NESTED46128
Node: OMP_NUM_THREADS46733
Node: OMP_PROC_BIND47421
Node: OMP_PLACES48613
Node: OMP_STACKSIZE50790
Node: OMP_SCHEDULE51614
Node: OMP_THREAD_LIMIT52312
Node: OMP_WAIT_POLICY52912
Node: GOMP_CPU_AFFINITY53604
Node: GOMP_DEBUG55334
Node: GOMP_STACKSIZE55841
Node: GOMP_SPINCOUNT56670
Node: GOMP_RTEMS_THREAD_POOLS57874
Node: Enabling OpenACC60052
Node: OpenACC Runtime Library Routines61045
Node: acc_get_num_devices64839
Node: acc_set_device_type65565
Node: acc_get_device_type66329
Node: acc_set_device_num67044
Node: acc_get_device_num67828
Node: acc_async_test68625
Node: acc_async_test_all69617
Node: acc_wait70517
Node: acc_wait_all71379
Node: acc_wait_all_async72138
Node: acc_wait_async72890
Node: acc_init73597
Node: acc_shutdown74243
Node: acc_on_device74911
Node: acc_malloc75915
Node: acc_free76414
Node: acc_copyin76841
Node: acc_present_or_copyin77951
Node: acc_create79577
Node: acc_present_or_create80732
Node: acc_copyout82366
Node: acc_delete83389
Node: acc_update_device84364
Node: acc_update_self85476
Node: acc_map_data86580
Node: acc_unmap_data87265
Node: acc_deviceptr87786
Node: acc_hostptr88356
Node: acc_is_present88920
Node: acc_memcpy_to_device90447
Node: acc_memcpy_from_device91110
Node: acc_get_current_cuda_device91794
Node: acc_get_current_cuda_context92391
Node: acc_get_cuda_stream92985
Node: acc_set_cuda_stream93541
Node: OpenACC Environment Variables94073
Node: ACC_DEVICE_TYPE94532
Node: ACC_DEVICE_NUM94768
Node: GCC_ACC_NOTIFY95025
Node: CUDA Streams Usage95248
Ref: CUDA Streams Usage-Footnote-197148
Node: OpenACC Library Interoperability97257
Ref: OpenACC Library Interoperability-Footnote-1103613
Ref: OpenACC Library Interoperability-Footnote-2103865
Node: The libgomp ABI104073
Node: Implementing MASTER construct104929
Node: Implementing CRITICAL construct105343
Node: Implementing ATOMIC construct106082
Node: Implementing FLUSH construct106563
Node: Implementing BARRIER construct106834
Node: Implementing THREADPRIVATE construct107103
Node: Implementing PRIVATE clause107756
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses108337
Node: Implementing REDUCTION clause109661
Node: Implementing PARALLEL construct110218
Node: Implementing FOR construct111475
Node: Implementing ORDERED construct113473
Node: Implementing SECTIONS construct113779
Node: Implementing SINGLE construct114545
Node: Implementing OpenACC's PARALLEL construct115257
Node: Reporting Bugs115515
Node: Copying115877
Node: GNU Free Documentation License153424
Node: Funding178547
Node: Library Index181073
@


1.1.1.13
log
@import GCC 7.5.0.  doing this here so that the vendor branch has
the code we'll merge into gcc.old and the netbsd-9 tree gcc tree.
GCC 8.4.0 will be imported immediately on top of this again,
restoring the current status.

these PRs in the GCC bugzilla are fixed with this update:

89869 80693 89795 84272 85593 86669 87148 87647 87895 88103 88107 88563
88870 88976 89002 89187 89195 89234 89303 89314 89354 89361 89403 89412
89512 89520 89590 89621 89663 89679 89704 89734 89872 89933 90090 90208
87075 85870 89009 89242 88167 80864 81933 85890 86608 87145 88857 89024
89119 89214 89511 89612 89705 89400 81740 82186 84552 86554 87609 88105
88149 88415 88739 88903 89135 89223 89296 89505 89572 89677 89698 89710
90006 90020 90071 90328 90474 91126 91162 91812 91887 90075 88998 89945
87047 87506 88074 88656 88740 91137 89008 84010 89349 91136 91347 91995
89397 87030 60702 78884 85594 87649 87725 88181 88470 88553 88568 88588
88620 88644 88906 88949 89246 89587 89726 89768 89796 89998 90108 90756
90950 91704 88825 88983 86538 51333 89446 90220 91308 92143 89392 90213
90278 91131 91200 91510 89037 91481 87673 88418 88938 88948 90547 27221
58321 61250 67183 67958 77583 83531 86215 88648 88720 88726 89091 89466
89629 90105 90329 90585 90760 90924 91087 89222 81956 71861 35031 69455
81849 82993 85798 88138 88155 88169 88205 88206 88228 88249 88269 88376
77703 80260 82077 86248 88393 90786 57048 66089 66695 67679 68009 71723
72714 84394 85544 87734 88298 90937 91557 63891 64132 65342 68649 68717
71066 71860 71935 77746 78421 78645 78865 78983 79485 79540 85953 88326
89651 90744
@
text
@d1 2
a2 2
This is libgomp.info, produced by makeinfo version 4.13 from
/space/rguenther/gcc-7.5.0/gcc-7.5.0/libgomp/libgomp.texi.
d4 1
a4 1
Copyright (C) 2006-2017 Free Software Foundation, Inc.
d21 2
a22 3
software.  Copies published by the Free Software Foundation raise
funds for GNU development.

d36 1
a36 1
   Copyright (C) 2006-2017 Free Software Foundation, Inc.
d53 2
a54 2
software.  Copies published by the Free Software Foundation raise
funds for GNU development.
d62 6
a67 6
This manual documents the usage of libgomp, the GNU Offloading and
Multi Processing Runtime Library.  This includes the GNU implementation
of the OpenMP (http://www.openmp.org) Application Programming Interface
(API) for multi-platform shared-memory parallel programming in C/C++
and Fortran, and the GNU implementation of the OpenACC
(http://www.openacc.org/) Application Programming Interface (API) for
d110 10
a119 11
compile-time flag `-fopenmp' must be specified.  This enables the
OpenMP directive `#pragma omp' in C/C++ and `!$omp' directives in free
form, `c$omp', `*$omp' and `!$omp' directives in fixed form, `!$'
conditional compilation sentinels in free form and `c$', `*$' and `!$'
sentinels in fixed form, for Fortran.  The flag also arranges for
automatic linking of the OpenMP runtime library (*note Runtime Library
Routines::).

   A complete description of all OpenMP directives accepted may be
found in the OpenMP Application Program Interface
(http://www.openmp.org) manual, version 4.5.
d187 1
a187 1
2.1 `omp_get_active_level' - Number of parallel regions
d195 1
a195 1
     _Prototype_:  `int omp_get_active_level(void);'
d198 1
a198 1
     _Interface_:  `integer function omp_get_active_level()'
d210 1
a210 1
2.2 `omp_get_ancestor_thread_num' - Ancestor thread ID
d216 2
a217 2
     outside zero to `omp_get_level' -1 is returned; if LEVEL is
     `omp_get_level' the result is identical to `omp_get_thread_num'.
d220 1
a220 1
     _Prototype_:  `int omp_get_ancestor_thread_num(int level);'
d223 2
a224 2
     _Interface_:  `integer function omp_get_ancestor_thread_num(level)'
                   `integer level'
d236 1
a236 1
2.3 `omp_get_cancellation' - Whether cancellation support is enabled
d240 3
a242 3
     This function returns `true' if cancellation is activated, `false'
     otherwise.  Here, `true' and `false' represent their
     language-specific counterparts.  Unless `OMP_CANCELLATION' is set
d246 1
a246 1
     _Prototype_:  `int omp_get_cancellation(void);'
d249 1
a249 1
     _Interface_:  `logical function omp_get_cancellation()'
d260 1
a260 1
2.4 `omp_get_default_device' - Get the default device for target regions
d267 1
a267 1
     _Prototype_:  `int omp_get_default_device(void);'
d270 1
a270 1
     _Interface_:  `integer function omp_get_default_device()'
d281 1
a281 1
2.5 `omp_get_dynamic' - Dynamic teams setting
d285 2
a286 2
     This function returns `true' if enabled, `false' otherwise.  Here,
     `true' and `false' represent their language-specific counterparts.
d289 3
a291 3
     `OMP_DYNAMIC' environment variable or at runtime using
     `omp_set_dynamic'.  If undefined, dynamic adjustment is disabled
     by default.
d294 1
a294 1
     _Prototype_:  `int omp_get_dynamic(void);'
d297 1
a297 1
     _Interface_:  `logical function omp_get_dynamic()'
d308 1
a308 1
2.6 `omp_get_level' - Obtain the current nesting level
d316 1
a316 1
     _Prototype_:  `int omp_get_level(void);'
d319 1
a319 1
     _Interface_:  `integer function omp_level()'
d330 1
a330 1
2.7 `omp_get_max_active_levels' - Maximum number of active regions
d338 1
a338 1
     _Prototype_:  `int omp_get_max_active_levels(void);'
d341 1
a341 1
     _Interface_:  `integer function omp_get_max_active_levels()'
d352 1
a352 1
2.8 `omp_get_max_task_priority' - Maximum priority value
d361 1
a361 1
     _Prototype_:  `int omp_get_max_task_priority(void);'
d364 1
a364 1
     _Interface_:  `integer function omp_get_max_task_priority()'
d372 1
a372 1
2.9 `omp_get_max_threads' - Maximum number of threads of parallel region
d377 1
a377 1
     region that does not use the clause `num_threads'.
d380 1
a380 1
     _Prototype_:  `int omp_get_max_threads(void);'
d383 1
a383 1
     _Interface_:  `integer function omp_get_max_threads()'
d395 1
a395 1
2.10 `omp_get_nested' - Nested parallel regions
d399 2
a400 2
     This function returns `true' if nested parallel regions are
     enabled, `false' otherwise.  Here, `true' and `false' represent
d404 2
a405 2
     `OMP_NESTED' environment variable or at runtime using
     `omp_set_nested'.  If undefined, nested parallel regions are
d409 1
a409 1
     _Prototype_:  `int omp_get_nested(void);'
d412 1
a412 1
     _Interface_:  `logical function omp_get_nested()'
d423 1
a423 1
2.11 `omp_get_num_devices' - Number of target devices
d430 1
a430 1
     _Prototype_:  `int omp_get_num_devices(void);'
d433 1
a433 1
     _Interface_:  `integer function omp_get_num_devices()'
d441 1
a441 1
2.12 `omp_get_num_procs' - Number of processors online
d448 1
a448 1
     _Prototype_:  `int omp_get_num_procs(void);'
d451 1
a451 1
     _Interface_:  `integer function omp_get_num_procs()'
d459 1
a459 1
2.13 `omp_get_num_teams' - Number of teams
d466 1
a466 1
     _Prototype_:  `int omp_get_num_teams(void);'
d469 1
a469 1
     _Interface_:  `integer function omp_get_num_teams()'
d477 1
a477 1
2.14 `omp_get_num_threads' - Size of the active team
d481 2
a482 2
     Returns the number of threads in the current team.  In a
     sequential section of the program `omp_get_num_threads' returns 1.
d485 5
a489 5
     `OMP_NUM_THREADS' environment variable.  At runtime, the size of
     the current team may be set either by the `NUM_THREADS' clause or
     by `omp_set_num_threads'.  If none of the above were used to
     define a specific value and `OMP_DYNAMIC' is disabled, one thread
     per CPU online is used.
d492 1
a492 1
     _Prototype_:  `int omp_get_num_threads(void);'
d495 1
a495 1
     _Interface_:  `integer function omp_get_num_threads()'
d507 1
a507 1
2.15 `omp_get_proc_bind' - Whether theads may be moved between CPUs
d511 5
a515 5
     This functions returns the currently active thread affinity
     policy, which is set via `OMP_PROC_BIND'.  Possible values are
     `omp_proc_bind_false', `omp_proc_bind_true',
     `omp_proc_bind_master', `omp_proc_bind_close' and
     `omp_proc_bind_spread'.
d518 1
a518 1
     _Prototype_:  `omp_proc_bind_t omp_get_proc_bind(void);'
d521 2
a522 2
     _Interface_:  `integer(kind=omp_proc_bind_kind) function
                   omp_get_proc_bind()'
d534 1
a534 1
2.16 `omp_get_schedule' - Obtain the runtime scheduling method
d539 2
a540 2
     set to the value `omp_sched_static', `omp_sched_dynamic',
     `omp_sched_guided' or `omp_sched_auto'.  The second argument,
d544 2
a545 2
     _Prototype_:  `void omp_get_schedule(omp_sched_t *kind, int
                   *chunk_size);'
d548 3
a550 3
     _Interface_:  `subroutine omp_get_schedule(kind, chunk_size)'
                   `integer(kind=omp_sched_kind) kind'
                   `integer chunk_size'
d561 1
a561 1
2.17 `omp_get_team_num' - Get team number
d568 1
a568 1
     _Prototype_:  `int omp_get_team_num(void);'
d571 1
a571 1
     _Interface_:  `integer function omp_get_team_num()'
d579 1
a579 1
2.18 `omp_get_team_size' - Number of threads in a team
d585 3
a587 3
     values of LEVEL outside zero to `omp_get_level', -1 is returned;
     if LEVEL is zero, 1 is returned, and for `omp_get_level', the
     result is identical to `omp_get_num_threads'.
d590 1
a590 1
     _Prototype_:  `int omp_get_team_size(int level);'
d593 2
a594 2
     _Interface_:  `integer function omp_get_team_size(level)'
                   `integer level'
d606 1
a606 1
2.19 `omp_get_thread_limit' - Maximum number of threads
d613 1
a613 1
     _Prototype_:  `int omp_get_thread_limit(void);'
d616 1
a616 1
     _Interface_:  `integer function omp_get_thread_limit()'
d627 1
a627 1
2.20 `omp_get_thread_num' - Current thread ID
d632 4
a635 4
     team.  In a sequential parts of the program, `omp_get_thread_num'
     always returns 0.  In parallel regions the return value varies
     from 0 to `omp_get_num_threads'-1 inclusive.  The return value of
     the master thread of a team is always 0.
d638 1
a638 1
     _Prototype_:  `int omp_get_thread_num(void);'
d641 1
a641 1
     _Interface_:  `integer function omp_get_thread_num()'
d652 1
a652 1
2.21 `omp_in_parallel' - Whether a parallel region is active
d656 2
a657 2
     This function returns `true' if currently running in parallel,
     `false' otherwise.  Here, `true' and `false' represent their
d661 1
a661 1
     _Prototype_:  `int omp_in_parallel(void);'
d664 1
a664 1
     _Interface_:  `logical function omp_in_parallel()'
d672 1
a672 1
2.22 `omp_in_final' - Whether in final or included task region
d676 2
a677 2
     This function returns `true' if currently running in a final or
     included task region, `false' otherwise.  Here, `true' and `false'
d681 1
a681 1
     _Prototype_:  `int omp_in_final(void);'
d684 1
a684 1
     _Interface_:  `logical function omp_in_final()'
d692 1
a692 1
2.23 `omp_is_initial_device' - Whether executing on the host device
d696 2
a697 2
     This function returns `true' if currently running on the host
     device, `false' otherwise.  Here, `true' and `false' represent
d701 1
a701 1
     _Prototype_:  `int omp_is_initial_device(void);'
d704 1
a704 1
     _Interface_:  `logical function omp_is_initial_device()'
d712 1
a712 1
2.24 `omp_set_default_device' - Set the default device for target regions
d720 1
a720 1
     _Prototype_:  `void omp_set_default_device(int device_num);'
d723 2
a724 2
     _Interface_:  `subroutine omp_set_default_device(device_num)'
                   `integer device_num'
d735 1
a735 1
2.25 `omp_set_dynamic' - Enable/disable dynamic teams
d741 2
a742 2
     of `true' and `false', where `true' enables dynamic adjustment of
     team sizes and `false' disables it.
d745 1
a745 1
     _Prototype_:  `void omp_set_dynamic(int dynamic_threads);'
d748 2
a749 2
     _Interface_:  `subroutine omp_set_dynamic(dynamic_threads)'
                   `logical, intent(in) :: dynamic_threads'
d760 1
a760 1
2.26 `omp_set_max_active_levels' - Limits the number of active parallel regions
d768 1
a768 1
     _Prototype_:  `void omp_set_max_active_levels(int max_levels);'
d771 2
a772 2
     _Interface_:  `subroutine omp_set_max_active_levels(max_levels)'
                   `integer max_levels'
d783 1
a783 1
2.27 `omp_set_nested' - Enable/disable nested parallel regions
d789 2
a790 2
     language-specific equivalent of `true' and `false', where `true'
     enables dynamic adjustment of team sizes and `false' disables it.
d793 1
a793 1
     _Prototype_:  `void omp_set_nested(int nested);'
d796 2
a797 2
     _Interface_:  `subroutine omp_set_nested(nested)'
                   `logical, intent(in) :: nested'
d808 1
a808 1
2.28 `omp_set_num_threads' - Set upper team size limit
d813 2
a814 2
     parallel sections, if those do not specify a `num_threads' clause.
     The argument of `omp_set_num_threads' shall be a positive integer.
d817 1
a817 1
     _Prototype_:  `void omp_set_num_threads(int num_threads);'
d820 2
a821 2
     _Interface_:  `subroutine omp_set_num_threads(num_threads)'
                   `integer, intent(in) :: num_threads'
d833 1
a833 1
2.29 `omp_set_schedule' - Set the runtime scheduling method
d838 2
a839 2
     value `omp_sched_static', `omp_sched_dynamic', `omp_sched_guided'
     or `omp_sched_auto'.  Except for `omp_sched_auto', the chunk size
d841 1
a841 1
     value if zero or negative.  For `omp_sched_auto' the CHUNK_SIZE
d845 2
a846 2
     _Prototype_:  `void omp_set_schedule(omp_sched_t kind, int
                   chunk_size);'
d849 3
a851 3
     _Interface_:  `subroutine omp_set_schedule(kind, chunk_size)'
                   `integer(kind=omp_sched_kind) kind'
                   `integer chunk_size'
d862 1
a862 1
2.30 `omp_init_lock' - Initialize simple lock
d870 1
a870 1
     _Prototype_:  `void omp_init_lock(omp_lock_t *lock);'
d873 2
a874 2
     _Interface_:  `subroutine omp_init_lock(svar)'
                   `integer(omp_lock_kind), intent(out) :: svar'
d885 1
a885 1
2.31 `omp_set_lock' - Wait for and set simple lock
d889 4
a892 4
     Before setting a simple lock, the lock variable must be
     initialized by `omp_init_lock'.  The calling thread is blocked
     until the lock is available.  If the lock is already held by the
     current thread, a deadlock occurs.
d895 1
a895 1
     _Prototype_:  `void omp_set_lock(omp_lock_t *lock);'
d898 2
a899 2
     _Interface_:  `subroutine omp_set_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d911 1
a911 1
2.32 `omp_test_lock' - Test and set simple lock if available
d915 5
a919 5
     Before setting a simple lock, the lock variable must be
     initialized by `omp_init_lock'.  Contrary to `omp_set_lock',
     `omp_test_lock' does not block if the lock is not available.  This
     function returns `true' upon success, `false' otherwise.  Here,
     `true' and `false' represent their language-specific counterparts.
d922 1
a922 1
     _Prototype_:  `int omp_test_lock(omp_lock_t *lock);'
d925 2
a926 2
     _Interface_:  `logical function omp_test_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d937 1
a937 1
2.33 `omp_unset_lock' - Unset simple lock
d942 4
a945 4
     `omp_set_lock' or `omp_test_lock' before.  In addition, the lock
     must be held by the thread calling `omp_unset_lock'.  Then, the
     lock becomes unlocked.  If one or more threads attempted to set
     the lock before, one of them is chosen to, again, set the lock to
d949 1
a949 1
     _Prototype_:  `void omp_unset_lock(omp_lock_t *lock);'
d952 2
a953 2
     _Interface_:  `subroutine omp_unset_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d964 1
a964 1
2.34 `omp_destroy_lock' - Destroy simple lock
d972 1
a972 1
     _Prototype_:  `void omp_destroy_lock(omp_lock_t *lock);'
d975 2
a976 2
     _Interface_:  `subroutine omp_destroy_lock(svar)'
                   `integer(omp_lock_kind), intent(inout) :: svar'
d987 1
a987 1
2.35 `omp_init_nest_lock' - Initialize nested lock
d995 1
a995 1
     _Prototype_:  `void omp_init_nest_lock(omp_nest_lock_t *lock);'
d998 2
a999 2
     _Interface_:  `subroutine omp_init_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(out) :: nvar'
d1010 1
a1010 1
2.36 `omp_set_nest_lock' - Wait for and set nested lock
d1014 4
a1017 5
     Before setting a nested lock, the lock variable must be
     initialized by `omp_init_nest_lock'.  The calling thread is
     blocked until the lock is available.  If the lock is already held
     by the current thread, the nesting count for the lock is
     incremented.
d1020 1
a1020 1
     _Prototype_:  `void omp_set_nest_lock(omp_nest_lock_t *lock);'
d1023 2
a1024 2
     _Interface_:  `subroutine omp_set_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1035 1
a1035 1
2.37 `omp_test_nest_lock' - Test and set nested lock if available
d1039 5
a1043 6
     Before setting a nested lock, the lock variable must be
     initialized by `omp_init_nest_lock'.  Contrary to
     `omp_set_nest_lock', `omp_test_nest_lock' does not block if the
     lock is not available.  If the lock is already held by the current
     thread, the new nesting count is returned.  Otherwise, the return
     value equals zero.
d1046 1
a1046 1
     _Prototype_:  `int omp_test_nest_lock(omp_nest_lock_t *lock);'
d1049 2
a1050 2
     _Interface_:  `logical function omp_test_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1061 1
a1061 1
2.38 `omp_unset_nest_lock' - Unset nested lock
d1066 1
a1066 1
     `omp_set_nested_lock' or `omp_test_nested_lock' before.  In
d1068 1
a1068 1
     `omp_unset_nested_lock'.  If the nesting count drops to zero, the
d1074 1
a1074 1
     _Prototype_:  `void omp_unset_nest_lock(omp_nest_lock_t *lock);'
d1077 2
a1078 2
     _Interface_:  `subroutine omp_unset_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1089 1
a1089 1
2.39 `omp_destroy_nest_lock' - Destroy nested lock
d1098 1
a1098 1
     _Prototype_:  `void omp_destroy_nest_lock(omp_nest_lock_t *);'
d1101 2
a1102 2
     _Interface_:  `subroutine omp_destroy_nest_lock(nvar)'
                   `integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1113 1
a1113 1
2.40 `omp_get_wtick' - Get timer precision
d1121 1
a1121 1
     _Prototype_:  `double omp_get_wtick(void);'
d1124 1
a1124 1
     _Interface_:  `double precision function omp_get_wtick()'
d1135 1
a1135 1
2.41 `omp_get_wtime' - Elapsed wall clock time
d1146 1
a1146 1
     _Prototype_:  `double omp_get_wtime(void);'
d1149 1
a1149 1
     _Interface_:  `double precision function omp_get_wtime()'
d1163 1
a1163 1
The environment variables which beginning with `OMP_' are defined by
d1165 1
a1165 1
beginning with `GOMP_' are GNU extensions.
d1192 1
a1192 1
3.1 `OMP_CANCELLATION' - Set whether cancellation is activated
d1196 3
a1198 3
     If set to `TRUE', the cancellation is activated.  If set to
     `FALSE' or if unset, cancellation is disabled and the `cancel'
     construct is ignored.
d1209 1
a1209 1
3.2 `OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
d1213 1
a1213 1
     If set to `TRUE', the OpenMP version number and the values
d1215 1
a1215 1
     `stderr'.  If set to `VERBOSE', it additionally shows the value of
d1217 1
a1217 1
     or set to `FALSE', this information will not be shown.
d1225 1
a1225 1
3.3 `OMP_DEFAULT_DEVICE' - Set the device used in target regions
d1229 5
a1233 5
     Set to choose the device which is used in a `target' region,
     unless the value is overridden by `omp_set_default_device' or by a
     `device' clause.  The value shall be the nonnegative device
     number. If no device with the given device number exists, the code
     is executed on the host.  If unset, device number 0 will be used.
d1244 1
a1244 1
3.4 `OMP_DYNAMIC' - Dynamic adjustment of threads
d1250 2
a1251 2
     `TRUE' or `FALSE'.  If undefined, dynamic adjustment is disabled
     by default.
d1262 1
a1262 1
3.5 `OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1279 1
a1279 1
3.6 `OMP_MAX_TASK_PRIORITY' - Set the maximum priority
d1282 1
a1282 1
number that can be set for a task.  
d1284 2
a1285 2
     Specifies the initial value for the maximum priority value that
     can be set for a task.  The value of this variable shall be a
d1298 1
a1298 1
3.7 `OMP_NESTED' - Nested parallel regions
d1304 1
a1304 1
     environment variable shall be `TRUE' or `FALSE'.  If undefined,
d1316 1
a1316 1
3.8 `OMP_NUM_THREADS' - Specifies the number of threads to use
d1320 5
a1324 5
     Specifies the default number of threads to use in parallel
     regions.  The value of this variable shall be a comma-separated
     list of positive integers; the value specified the number of
     threads to use for the corresponding nested level.  If undefined
     one thread per CPU is used.
d1335 1
a1335 1
3.9 `OMP_PROC_BIND' - Whether theads may be moved between CPUs
d1340 1
a1340 1
     to `TRUE', OpenMP theads should not be moved; if set to `FALSE'
d1342 1
a1342 1
     values `MASTER', `CLOSE' and `SPREAD' can be used to specify the
d1344 3
a1346 3
     `MASTER' the worker threads are in the same place partition as the
     master thread.  With `CLOSE' those are kept close to the master
     thread in contiguous place partitions.  And with `SPREAD' a sparse
d1349 2
a1350 2
     When undefined, `OMP_PROC_BIND' defaults to `TRUE' when
     `OMP_PLACES' or `GOMP_CPU_AFFINITY' is set and `FALSE' otherwise.
d1362 1
a1362 1
3.10 `OMP_PLACES' - Specifies on which CPUs the theads should be placed
d1366 3
a1368 3
     The thread placement can be either specified using an abstract
     name or by an explicit list of the places.  The abstract names
     `threads', `cores' and `sockets' can be optionally followed by a
d1370 3
a1372 3
     shall be created.  With `threads' each place corresponds to a
     single hardware thread; `cores' to a single core with the
     corresponding number of hardware threads; and with `sockets' the
d1374 1
a1374 1
     be shown by setting the `OMP_DISPLAY_ENV' environment variable.
d1387 2
a1388 2
     specifies the same places list: `"{0,1,2}, {3,4,6}, {7,8,9},
     {10,11,12}"'; `"{0:3}, {3:3}, {7:3}, {10:3}"'; and `"{0:2}:4:3"'.
d1390 2
a1391 2
     If `OMP_PLACES' and `GOMP_CPU_AFFINITY' are unset and
     `OMP_PROC_BIND' is either unset or `false', threads may be moved
d1404 1
a1404 1
3.11 `OMP_STACKSIZE' - Set default thread stack size
d1409 7
a1415 7
     is suffixed by `B', `K', `M' or `G', in which case the size is,
     respectively, in bytes, kilobytes, megabytes or gigabytes.  This
     is different from `pthread_attr_setstacksize' which gets the
     number of bytes as an argument.  If the stack size cannot be set
     due to system constraints, an error is reported and the initial
     stack size is left unchanged.  If undefined, the stack size is
     system dependent.
d1423 1
a1423 1
3.12 `OMP_SCHEDULE' - How threads are scheduled
d1427 5
a1431 5
     Allows to specify `schedule type' and `chunk size'.  The value of
     the variable shall have the form: `type[,chunk]' where `type' is
     one of `static', `dynamic', `guided' or `auto' The optional
     `chunk' size shall be a positive integer.  If undefined, dynamic
     scheduling and a chunk size of 1 is used.
d1443 1
a1443 1
3.13 `OMP_THREAD_LIMIT' - Set the maximum number of threads
d1460 1
a1460 1
3.14 `OMP_WAIT_POLICY' - How waiting threads are handled
d1465 2
a1466 2
     the value is `PASSIVE', waiting threads should not consume CPU
     power while waiting; while the value is `ACTIVE' specifies that
d1479 1
a1479 1
3.15 `GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d1487 2
a1488 2
     (M-N:S).  CPU numbers are zero based.  For example,
     `GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
d1492 1
a1492 1
     beginning of the list.  `GOMP_CPU_AFFINITY=0' binds all threads to
d1497 10
a1506 10
     language-specific library functions, e.g., `getenv' in C or
     `GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
     setting of the `GOMP_CPU_AFFINITY' environment variable.  A
     defined CPU affinity on startup cannot be changed or disabled
     during the runtime of the application.

     If both `GOMP_CPU_AFFINITY' and `OMP_PROC_BIND' are set,
     `OMP_PROC_BIND' has a higher precedence.  If neither has been set
     and `OMP_PROC_BIND' is unset, or when `OMP_PROC_BIND' is set to
     `FALSE', the host system will handle the assignment of threads to
d1515 1
a1515 1
3.16 `GOMP_DEBUG' - Enable debugging output
d1519 2
a1520 2
     Enable debugging output.  The variable should be set to `0'
     (disabled, also the default if not set), or `1' (enabled).
d1529 1
a1529 1
3.17 `GOMP_STACKSIZE' - Set default thread stack size
d1534 1
a1534 1
     from `pthread_attr_setstacksize' which gets the number of bytes as
d1551 1
a1551 1
3.18 `GOMP_SPINCOUNT' - Set the busy-wait spin count
d1557 1
a1557 1
     value may be either `INFINITE', `INFINITY' to always wait actively
d1560 8
a1567 9
     suffixes acting as multiplication factors: `k' (kilo, thousand),
     `M' (mega, million), `G' (giga, billion), or `T' (tera, trillion).
     If undefined, 0 is used when `OMP_WAIT_POLICY' is `PASSIVE',
     300,000 is used when `OMP_WAIT_POLICY' is undefined and 30 billion
     is used when `OMP_WAIT_POLICY' is `ACTIVE'.  If there are more
     OpenMP threads than available CPUs, 1000 and 100 spins are used
     for `OMP_WAIT_POLICY' being `ACTIVE' or undefined, respectively;
     unless the `GOMP_SPINCOUNT' is lower or `OMP_WAIT_POLICY' is
     `PASSIVE'.
d1575 1
a1575 1
3.19 `GOMP_RTEMS_THREAD_POOLS' - Set the RTEMS specific thread pools
d1581 4
a1584 4
     thread pools.  The format for `GOMP_RTEMS_THREAD_POOLS' is a list
     of optional `<thread-pool-count>[$<priority>]@@<scheduler-name>'
     configurations separated by `:' where:
        * `<thread-pool-count>' is the thread pool count for this
d1586 2
a1587 3

        * `$<priority>' is an optional priority for the worker threads
          of a thread pool according to `pthread_setschedparam'.  In
d1593 1
a1593 2

        * `@@<scheduler-name>' is the scheduler instance name according
d1596 4
a1599 5
     instance, then each OpenMP master thread of this scheduler
     instance will use its own dynamically allocated thread pool.  To
     limit the worker thread count of the thread pools, each OpenMP
     master thread must call `omp_set_num_threads'.

d1601 2
a1602 2
     Lets suppose we have three scheduler instances `IO', `WRK0', and
     `WRK1' with `GOMP_RTEMS_THREAD_POOLS' set to `"1@@WRK0:3$4@@WRK1"'.
d1604 1
a1604 1
     `IO'.  In the scheduler instance `WRK0' there is one thread pool
d1607 3
a1609 3
     master thread that created it.  In the scheduler instance `WRK1'
     there are three thread pools available and their worker threads
     run at priority four.
d1618 4
a1621 4
compile-time flag `-fopenacc' must be specified.  This enables the
OpenACC directive `#pragma acc' in C/C++ and `!$accp' directives in
free form, `c$acc', `*$acc' and `!$acc' directives in fixed form, `!$'
conditional compilation sentinels in free form and `c$', `*$' and `!$'
d1627 1
a1627 1
found in the OpenACC (http://www.openacc.org/) Application Programming
d1631 2
a1632 2
future versions of GCC.  See `https://gcc.gnu.org/wiki/OpenACC' for
more information.
d1642 3
a1644 3
throw exceptions.  Generally, they are available only for the host,
with the exception of `acc_on_device', which is available for both the
host and the acceleration device.
d1707 1
a1707 1
5.1 `acc_get_num_devices' - Get number of devices for given device type
d1715 1
a1715 1
     _Prototype_:  `int acc_get_num_devices(acc_device_t devicetype);'
d1718 2
a1719 2
     _Interface_:  `integer function acc_get_num_devices(devicetype)'
                   `integer(kind=acc_device_kind) devicetype'
d1722 1
a1722 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1728 1
a1728 1
5.2 `acc_set_device_type' - Set type of device accelerator to use.
d1737 1
a1737 1
     _Prototype_:  `acc_set_device_type(acc_device_t devicetype);'
d1740 2
a1741 2
     _Interface_:  `subroutine acc_set_device_type(devicetype)'
                   `integer(kind=acc_device_kind) devicetype'
d1744 1
a1744 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1750 1
a1750 1
5.3 `acc_get_device_type' - Get type of device accelerator to be used.
d1758 1
a1758 1
     _Prototype_:  `acc_device_t acc_get_device_type(void);'
d1761 2
a1762 2
     _Interface_:  `function acc_get_device_type(void)'
                   `integer(kind=acc_device_kind) acc_get_device_type'
d1765 1
a1765 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1771 1
a1771 1
5.4 `acc_set_device_num' - Set device number to use.
d1780 1
a1780 2
     _Prototype_:  `acc_set_device_num(int num, acc_device_t
                   devicetype);'
d1783 3
a1785 3
     _Interface_:  `subroutine acc_set_device_num(devicenum, devicetype)'
                   `integer devicenum'
                   `integer(kind=acc_device_kind) devicetype'
d1788 1
a1788 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1794 1
a1794 1
5.5 `acc_get_device_num' - Get device number to be used.
d1803 1
a1803 1
     _Prototype_:  `int acc_get_device_num(acc_device_t devicetype);'
d1806 3
a1808 3
     _Interface_:  `function acc_get_device_num(devicetype)'
                   `integer(kind=acc_device_kind) devicetype'
                   `integer acc_get_device_num'
d1811 1
a1811 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1817 1
a1817 1
5.6 `acc_async_test' - Test for completion of a specific asynchronous operation.
d1822 4
a1825 4
     specified in ARG. In C/C++, a non-zero value will be returned to
     indicate the specified asynchronous operation has completed. While
     Fortran will return a `true'. If the asynchrounous operation has
     not completed, C/C++ returns a zero and Fortran returns a `false'.
d1828 1
a1828 1
     _Prototype_:  `int acc_async_test(int arg);'
d1831 3
a1833 3
     _Interface_:  `function acc_async_test(arg)'
                   `integer(kind=acc_handle_kind) arg'
                   `logical acc_async_test'
d1836 1
a1836 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1842 1
a1842 1
5.7 `acc_async_test_all' - Tests for completion of all asynchronous operations.
d1848 3
a1850 3
     asynchronous operations have completed. While Fortran will return
     a `true'. If any asynchronous operation has not completed, C/C++
     returns a zero and Fortran returns a `false'.
d1853 1
a1853 1
     _Prototype_:  `int acc_async_test_all(void);'
d1856 2
a1857 2
     _Interface_:  `function acc_async_test()'
                   `logical acc_get_device_num'
d1860 1
a1860 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1866 1
a1866 1
5.8 `acc_wait' - Wait for completion of a specific asynchronous operation.
d1874 4
a1877 1
     _Prototype_:  `acc_wait(arg);'
d1880 6
a1885 2
     _Interface_:  `subroutine acc_wait(arg)'
                   `integer(acc_handle_kind) arg'
d1888 1
a1888 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1894 1
a1894 1
5.9 `acc_wait_all' - Waits for completion of all asynchronous operations.
d1902 4
a1905 1
     _Prototype_:  `acc_wait_all(void);'
d1908 4
a1911 1
     _Interface_:  `subroutine acc_wait_async()'
d1914 1
a1914 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1920 1
a1920 1
5.10 `acc_wait_all_async' - Wait for completion of all asynchronous operations.
d1929 1
a1929 1
     _Prototype_:  `acc_wait_all_async(int async);'
d1932 2
a1933 2
     _Interface_:  `subroutine acc_wait_all_async(async)'
                   `integer(acc_handle_kind) async'
d1936 1
a1936 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1942 1
a1942 1
5.11 `acc_wait_async' - Wait for completion of asynchronous operations.
d1950 1
a1950 1
     _Prototype_:  `acc_wait_async(int arg, int async);'
d1953 2
a1954 2
     _Interface_:  `subroutine acc_wait_async(arg, async)'
                   `integer(acc_handle_kind) arg, async'
d1957 1
a1957 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1963 1
a1963 1
5.12 `acc_init' - Initialize runtime for a specific device type.
d1967 2
a1968 2
     This function initializes the runtime for the device type
     specified in DEVICETYPE.
d1971 1
a1971 1
     _Prototype_:  `acc_init(acc_device_t devicetype);'
d1974 2
a1975 2
     _Interface_:  `subroutine acc_init(devicetype)'
                   `integer(acc_device_kind) devicetype'
d1978 1
a1978 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d1984 1
a1984 1
5.13 `acc_shutdown' - Shuts down the runtime for a specific device type.
d1992 1
a1992 1
     _Prototype_:  `acc_shutdown(acc_device_t devicetype);'
d1995 2
a1996 2
     _Interface_:  `subroutine acc_shutdown(devicetype)'
                   `integer(acc_device_kind) devicetype'
d1999 1
a1999 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2005 1
a2005 1
5.14 `acc_on_device' - Whether executing on a particular device
d2010 1
a2010 1
     particular device specified in DEVICETYPE. In C/C++ a non-zero
d2012 1
a2012 1
     specified device type.  In Fortran, `true' will be returned. If
d2014 1
a2014 1
     will return a zero, while Fortran will return `false'.
d2017 1
a2017 1
     _Prototype_:  `acc_on_device(acc_device_t devicetype);'
d2020 3
a2022 3
     _Interface_:  `function acc_on_device(devicetype)'
                   `integer(acc_device_kind) devicetype'
                   `logical acc_on_device'
d2025 1
a2025 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2031 1
a2031 1
5.15 `acc_malloc' - Allocate device memory.
d2035 1
a2035 1
     This function allocates LEN bytes of device memory. It returns the
d2039 1
a2039 1
     _Prototype_:  `d_void* acc_malloc(size_t len);'
d2042 1
a2042 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2048 1
a2048 1
5.16 `acc_free' - Free device memory.
d2052 1
a2052 1
     Free previously allocated device memory at the device address `a'.
d2055 1
a2055 1
     _Prototype_:  `acc_free(d_void *a);'
d2058 1
a2058 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2064 1
a2064 1
5.17 `acc_copyin' - Allocate device memory and copy host memory to it.
d2069 1
a2069 1
     maps it to the specified host address in A. The device address of
d2072 3
a2074 3
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies a
     variable or array element and LEN specifies the length in bytes.
d2077 1
a2077 1
     _Prototype_:  `void *acc_copyin(h_void *a, size_t len);'
d2080 5
a2084 5
     _Interface_:  `subroutine acc_copyin(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_copyin(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2087 1
a2087 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2093 1
a2093 1
5.18 `acc_present_or_copyin' - If the data is not present on the device, allocate device memory and copy from host memory.
d2098 3
a2100 3
     LEN is present or not. If it is not present, then device memory
     will be allocated and the host memory copied. The device address of
     the newly allocated device memory is returned.
d2102 2
a2103 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2107 2
a2108 2
     _Prototype_:  `void *acc_present_or_copyin(h_void *a, size_t len);'
     _Prototype_:  `void *acc_pcopyin(h_void *a, size_t len);'
d2111 10
a2120 10
     _Interface_:  `subroutine acc_present_or_copyin(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_present_or_copyin(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
     _Interface_:  `subroutine acc_pcopyin(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_pcopyin(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2123 1
a2123 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2129 1
a2129 1
5.19 `acc_create' - Allocate device memory and map it to host memory.
d2134 1
a2134 1
     specified by the host address A with a length of LEN bytes. In
d2138 2
a2139 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2143 1
a2143 1
     _Prototype_:  `void *acc_create(h_void *a, size_t len);'
d2146 5
a2150 5
     _Interface_:  `subroutine acc_create(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_create(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2153 1
a2153 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2159 1
a2159 1
5.20 `acc_present_or_create' - If the data is not present on the device, allocate device memory and map it to host memory.
d2164 2
a2165 2
     LEN is present or not. If it is not present, then device memory
     will be allocated and mapped to host memory. In C/C++, the device
d2168 2
a2169 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2173 2
a2174 2
     _Prototype_:  `void *acc_present_or_create(h_void *a, size_t len)'
     _Prototype_:  `void *acc_pcreate(h_void *a, size_t len)'
d2177 10
a2186 10
     _Interface_:  `subroutine acc_present_or_create(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_present_or_create(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
     _Interface_:  `subroutine acc_pcreate(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_pcreate(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2189 1
a2189 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2195 1
a2195 1
5.21 `acc_copyout' - Copy device memory to host memory.
d2202 2
a2203 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2207 1
a2207 1
     _Prototype_:  `acc_copyout(h_void *a, size_t len);'
d2210 5
a2214 5
     _Interface_:  `subroutine acc_copyout(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_copyout(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2217 1
a2217 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2223 1
a2223 1
5.22 `acc_delete' - Free device memory.
d2230 2
a2231 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2235 1
a2235 1
     _Prototype_:  `acc_delete(h_void *a, size_t len);'
d2238 5
a2242 5
     _Interface_:  `subroutine acc_delete(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_delete(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2245 1
a2245 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2251 1
a2251 1
5.23 `acc_update_device' - Update device memory from mapped host memory.
d2259 2
a2260 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2264 1
a2264 1
     _Prototype_:  `acc_update_device(h_void *a, size_t len);'
d2267 5
a2271 5
     _Interface_:  `subroutine acc_update_device(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_update_device(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2274 1
a2274 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2280 1
a2280 1
5.24 `acc_update_self' - Update host memory from mapped device memory.
d2288 2
a2289 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2293 1
a2293 1
     _Prototype_:  `acc_update_self(h_void *a, size_t len);'
d2296 5
a2300 5
     _Interface_:  `subroutine acc_update_self(a)'
                   `type, dimension(:[,:]...) :: a'
     _Interface_:  `subroutine acc_update_self(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
d2303 1
a2303 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2309 1
a2309 1
5.25 `acc_map_data' - Map previously allocated device memory to host memory.
d2314 1
a2314 1
     The device memory is specified with the device address D. The host
d2318 1
a2318 1
     _Prototype_:  `acc_map_data(h_void *h, d_void *d, size_t len);'
d2321 1
a2321 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2327 1
a2327 1
5.26 `acc_unmap_data' - Unmap device memory from host memory.
d2331 1
a2331 1
     This function unmaps previously mapped device and host memory. The
d2335 1
a2335 1
     _Prototype_:  `acc_unmap_data(h_void *h);'
d2338 1
a2338 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2344 1
a2344 1
5.27 `acc_deviceptr' - Get device pointer associated with specific host address.
d2352 1
a2352 1
     _Prototype_:  `void *acc_deviceptr(h_void *h);'
d2355 1
a2355 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2361 1
a2361 1
5.28 `acc_hostptr' - Get host pointer associated with specific device address.
d2369 1
a2369 1
     _Prototype_:  `void *acc_hostptr(d_void *d);'
d2372 1
a2372 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2378 1
a2378 1
5.29 `acc_is_present' - Indicate whether host variable / array is present on device.
d2382 2
a2383 2
     This function indicates whether the specified host address in A
     and a length of LEN bytes is present on the device. In C/C++, a
d2385 1
a2385 1
     memory on the device. A zero is returned to indicate the memory is
d2388 2
a2389 2
     In Fortran, two (2) forms are supported. In the first form, A
     specifies a contiguous array section. The second form A specifies
d2391 2
a2392 2
     If the host memory is mapped to device memory, then a `true' is
     returned. Otherwise, a `false' is return to indicate the mapped
d2396 1
a2396 1
     _Prototype_:  `int acc_is_present(h_void *a, size_t len);'
d2399 7
a2405 7
     _Interface_:  `function acc_is_present(a)'
                   `type, dimension(:[,:]...) :: a'
                   `logical acc_is_present'
     _Interface_:  `function acc_is_present(a, len)'
                   `type, dimension(:[,:]...) :: a'
                   `integer len'
                   `logical acc_is_present'
d2408 1
a2408 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2414 1
a2414 1
5.30 `acc_memcpy_to_device' - Copy host memory to device memory.
d2423 2
a2424 2
     _Prototype_:  `acc_memcpy_to_device(d_void *dest, h_void *src,
                   size_t bytes);'
d2427 1
a2427 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2433 1
a2433 1
5.31 `acc_memcpy_from_device' - Copy device memory to host memory.
d2442 2
a2443 2
     _Prototype_:  `acc_memcpy_from_device(d_void *dest, h_void *src,
                   size_t bytes);'
d2446 1
a2446 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2452 1
a2452 1
5.32 `acc_get_current_cuda_device' - Get CUDA device handle.
d2456 1
a2456 1
     This function returns the CUDA device handle. This handle is the
d2460 1
a2460 1
     _Prototype_:  `void *acc_get_current_cuda_device(void);'
d2463 1
a2463 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2469 1
a2469 1
5.33 `acc_get_current_cuda_context' - Get CUDA context handle.
d2473 1
a2473 1
     This function returns the CUDA context handle. This handle is the
d2477 1
a2477 1
     _Prototype_:  `acc_get_current_cuda_context(void);'
d2480 1
a2480 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2486 1
a2486 1
5.34 `acc_get_cuda_stream' - Get CUDA stream handle.
d2490 1
a2490 1
     This function returns the CUDA stream handle. This handle is the
d2494 1
a2494 1
     _Prototype_:  `acc_get_cuda_stream(void);'
d2497 1
a2497 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2503 1
a2503 1
5.35 `acc_set_cuda_stream' - Set CUDA stream handle.
d2511 1
a2511 1
     _Prototype_:  `acc_set_cuda_stream(int async void *stream);'
d2514 1
a2514 1
     OpenACC specification v2.0 (http://www.openacc.org/), section
d2523 1
a2523 1
The variables `ACC_DEVICE_TYPE' and `ACC_DEVICE_NUM' are defined by
d2525 1
a2525 1
`GCC_ACC_NOTIFY' is used for diagnostic purposes.
d2536 1
a2536 1
6.1 `ACC_DEVICE_TYPE'
d2540 1
a2540 1
     OpenACC specification v2.0 (http://www.openacc.org/), section 4.1.
d2545 1
a2545 1
6.2 `ACC_DEVICE_NUM'
d2549 1
a2549 1
     OpenACC specification v2.0 (http://www.openacc.org/), section 4.2.
d2554 1
a2554 1
6.3 `GCC_ACC_NOTIFY'
d2566 1
a2566 1
This applies to the `nvptx' plugin only.
d2575 4
a2578 4
`async' and `wait' clauses.  When the `async' clause is first used with
a directive, it creates a CUDA stream.  If an `async-argument' is used
with the `async' clause, then the stream is associated with the
specified `async-argument'.
d2581 2
a2582 2
the `async-argument' of an `async' clause, both the `wait' clause and
the `wait' directive can be used.  When either the clause or directive
d2585 1
a2585 1
`async-argument', that is, stream, have completed.
d2588 2
a2589 2
of using the `async' clause, is done without any intervention by the
caller.  This implies the association between the `async-argument' and
d2592 5
a2596 5
function `acc_set_cuda_stream'.  When the function
`acc_set_cuda_stream' is called, the CUDA stream that was originally
associated with the `async' clause will be destroyed.  Caution should
be taken when changing the association as subsequent references to the
`async-argument' refer to a different CUDA stream.
d2613 4
a2616 4
programs that use the Runtime library directly, or another library
based on the Runtime library, e.g., CUBLAS(1).  This chapter describes
the use cases and what changes are required in order to use both the
OpenACC library and the CUBLAS and Runtime libraries within a program.
d2622 2
a2623 2
called prior to any of the functions in the OpenACC library. More
specifically, the function `cublasCreate()'.
d2628 5
a2632 5
returned to the caller. The OpenACC library also requires
initialization and allocation of hardware resources. Since the CUBLAS
library has already allocated the hardware resources for the device,
all that is left to do is to initialize the OpenACC library and acquire
the hardware resources on the host.
d2635 10
a2644 10
and allocate the host hardware resources, you need to acquire the
device number that was allocated during the call to `cublasCreate()'.
The invoking of the runtime library function `cudaGetDevice()'
accomplishes this. Once acquired, the device number is passed along
with the device type as parameters to the OpenACC library function
`acc_set_device_num()'.

   Once the call to `acc_set_device_num()' has completed, the OpenACC
library uses the  context that was created during the call to
`cublasCreate()'. In other words, both libraries will be sharing the
d2665 2
a2666 1
                                 Use Case 1
d2672 2
a2673 2
is called prior to any of the functions in the CUBLAS library. More
specificially, the function `acc_set_device_num()'.
d2675 1
a2675 1
   In the use case presented here, the function `acc_set_device_num()'
d2677 3
a2679 3
resources on the host and the device. In the call to the function, the
call parameters specify which device to use and what device type to
use, i.e., `acc_device_nvidia'. It should be noted that this is but one
d2681 1
a2681 1
hardware resources. Other methods are available through the use of
d2684 1
a2684 1
   Once the call to `acc_set_device_num()' has completed, other OpenACC
d2686 4
a2689 4
`acc_copyin()'. In addition, calls can be made to functions in the
CUBLAS library. In the use case a call to `cublasCreate()' is made
subsequent to the calls to `acc_copyin()'.  As seen in the previous use
case, a call to `cublasCreate()' initializes the CUBLAS library and
d2691 1
a2691 1
since the device has already been allocated, `cublasCreate()' will only
d2693 1
a2693 1
resources on the host. The context that was created as part of the
d2735 2
a2736 1
                                 Use Case 2
d2743 1
a2743 1
`ACC_DEVICE_TYPE' and `ACC_DEVICE_NUM', respecively. These two
d2745 2
a2746 2
`acc_set_device_num()'. As seen in the second use case, the device type
and device number were specified using `acc_set_device_num()'.  If
d2748 1
a2748 1
call to `acc_set_device_num()' would not be required.
d2750 4
a2753 4
   The use of the environment variables is only relevant when an
OpenACC function is called prior to a call to `cudaCreate()'. If
`cudaCreate()' is called prior to a call to an OpenACC function, then
you must call `acc_set_device_num()'(2)
d2759 2
a2760 2
Interoperability", in "CUDA Driver API", TRM-06703-001, Version 5.5,
for additional information on library interoperability.
d2762 3
a2764 3
   (2) More complete information about `ACC_DEVICE_TYPE' and
`ACC_DEVICE_NUM' can be found in sections 4.1 and 4.2 of the OpenACC
(http://www.openacc.org/) Application Programming Interface”, Version
d2773 2
a2774 2
The following sections present notes on the external ABI as presented
by libgomp.  Only maintainers should need them.
d2835 1
a2835 1
The target should implement the `__sync' builtins.
d2851 1
a2851 1
Expands to the `__sync_synchronize' builtin.
d2867 4
a2870 4
In _most_ cases we can map this directly to `__thread'.  Except that
OMP allows constructors for C++ objects.  We can either refuse to
support this (how often is it used?) or we can implement something akin
to .ctors.
d2902 2
a2903 2
   It is not clear what to do with bare FOR or SECTION blocks.  The
only thing I can figure is that we do something like:
d2921 2
a2922 2
for the two variables, i.e. not something you could write directly in
C.  Presumably this only makes sense if the "outer" x and y are global
d2935 4
a2938 4
pointer to an array of the type of the variable, indexed by the
thread's TEAM_ID.  The thread stores its final value into the array,
and after the barrier, the master thread iterates over the array to
collect the values.
d2975 3
a2977 3
   The function needs to create the appropriate number of threads
and/or launch them from the dock.  It needs to create the team
structure and assign team ids.
d2982 1
a2982 1
`omp_in_parallel()' state.
d3034 2
a3035 2
also pull it into a local variable if we like, but since its supposed
to remain unchanged, we can also not if we like.
d3037 5
a3041 5
   If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be
able to get away with no work-sharing context at all, since we can
simply perform the arithmetic directly in each thread to divide up the
iterations.  Which would mean that we wouldn't need to call any of
these routines.
d3143 2
a3144 2
"openacc", or "openmp", or both to the keywords field in the bug
report, as appropriate.
d3154 1
a3154 1
     Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/'
d3182 3
a3184 3
these rights or asking you to surrender the rights.  Therefore, you
have certain responsibilities if you distribute copies of the software,
or if you modify it: responsibilities to respect the freedom of others.
d3203 9
a3211 10
modified versions of the software inside them, although the
manufacturer can do so.  This is fundamentally incompatible with the
aim of protecting users' freedom to change the software.  The
systematic pattern of such abuse occurs in the area of products for
individuals to use, which is precisely where it is most unacceptable.
Therefore, we have designed this version of the GPL to prohibit the
practice for those products.  If such problems arise substantially in
other domains, we stand ready to extend this provision to those domains
in future versions of the GPL, as needed to protect the freedom of
users.
d3248 2
a3249 2
     infringement under applicable copyright law, except executing it
     on a computer or modifying a private copy.  Propagation includes
d3263 2
a3264 2
     the extent that warranties are provided), that licensees may
     convey the work under this License, and how to view a copy of this
d3272 2
a3273 2
     for making modifications to it.  "Object code" means any
     non-source form of a work.
d3284 4
a3287 4
     Major Component, and (b) serves only to enable use of the work
     with that Major Component, or to implement a Standard Interface
     for which an implementation is available to the public in source
     code form.  A "Major Component", in this context, means a major
d3295 3
a3297 3
     work) run the object code and to modify the work, including
     scripts to control those activities.  However, it does not include
     the work's System Libraries, or general-purpose tools or generally
d3300 4
a3303 4
     Corresponding Source includes interface definition files
     associated with source files for the work, and the source code for
     shared libraries and dynamically linked subprograms that the work
     is specifically designed to require, such as by intimate data
d3320 4
a3323 4
     a covered work is covered by this License only if the output,
     given its content, constitutes a covered work.  This License
     acknowledges your rights of fair use or other equivalent, as
     provided by copyright law.
d3328 8
a3335 8
     sole purpose of having them make modifications exclusively for
     you, or provide you with facilities for running those works,
     provided that you comply with the terms of this License in
     conveying all material for which you do not control copyright.
     Those thus making or running the covered works for you must do so
     exclusively on your behalf, under your direction and control, on
     terms that prohibit them from making any copies of your
     copyrighted material outside their relationship with you.
d3352 2
a3353 2
     with respect to the covered work, and you disclaim any intention
     to limit operation or modification of the work as a means of
d3423 2
a3424 2
          written offer, valid for at least three years and valid for
          as long as you offer spare parts or customer support for that
d3434 2
a3435 2
       c. Convey individual copies of the object code with a copy of
          the written offer to provide the Corresponding Source.  This
d3441 2
a3442 2
          place (gratis or for a charge), and offer equivalent access
          to the Corresponding Source in the same way through the same
d3446 4
a3449 4
          Corresponding Source may be on a different server (operated
          by you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to
          the object code saying where to find the Corresponding Source.
d3451 2
a3452 2
          remain obligated to ensure that it is available for as long
          as needed to satisfy these requirements.
a3458 1

d3466 2
a3467 2
     incorporation into a dwelling.  In determining whether a product
     is a consumer product, doubtful cases shall be resolved in favor of
d3498 5
a3502 5
     warranty, or updates for a work that has been modified or
     installed by the recipient, or for the User Product in which it
     has been modified or installed.  Access to a network may be denied
     when the modification itself materially and adversely affects the
     operation of the network or violates the rules and protocols for
d3532 2
a3533 2
     holders of that material) supplement the terms of this License
     with terms:
d3543 2
a3544 3
          or requiring that modified versions of such material be
          marked in reasonable ways as different from the original
          version; or
d3563 4
a3566 5
     contains a further restriction but permits relicensing or
     conveying under this License, you may add to a covered work
     material governed by the terms of that license document, provided
     that the further restriction does not survive such relicensing or
     conveying.
d3582 2
a3583 2
     under this License (including any patent licenses granted under
     the third paragraph of section 11).
d3587 2
a3588 2
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
d3600 4
a3603 4
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, you do not qualify to receive new
     licenses for the same material under section 10.
d3617 1
a3617 1
 10. Automatic Licensing of Downstream Recipients.
d3631 4
a3634 4
     could give under the previous paragraph, plus a right to
     possession of the Corresponding Source of the work from the
     predecessor in interest, if the predecessor has it or can get it
     with reasonable efforts.
d3638 6
a3643 6
     may not impose a license fee, royalty, or other charge for
     exercise of rights granted under this License, and you may not
     initiate litigation (including a cross-claim or counterclaim in a
     lawsuit) alleging that any patent claim is infringed by making,
     using, selling, offering for sale, or importing the Program or any
     portion of it.
d3645 1
a3645 1
 11. Patents.
d3665 2
a3666 2
     otherwise run, modify and propagate the contents of its
     contributor version.
d3671 3
a3673 3
     patent or covenant not to sue for patent infringement).  To
     "grant" such a patent license to a party means to make such an
     agreement or commitment not to enforce a patent against the party.
d3703 10
a3712 10
     party that is in the business of distributing software, under
     which you make payment to the third party based on the extent of
     your activity of conveying the work, and under which the third
     party grants, to any of the parties who would receive the covered
     work from you, a discriminatory patent license (a) in connection
     with copies of the covered work conveyed by you (or copies made
     from those copies), or (b) primarily for and in connection with
     specific products or compilations that contain the covered work,
     unless you entered into that arrangement, or that patent license
     was granted, prior to 28 March 2007.
d3718 1
a3718 1
 12. No Surrender of Others' Freedom.
d3720 10
a3729 11
     If conditions are imposed on you (whether by court order,
     agreement or otherwise) that contradict the conditions of this
     License, they do not excuse you from the conditions of this
     License.  If you cannot convey a covered work so as to satisfy
     simultaneously your obligations under this License and any other
     pertinent obligations, then as a consequence you may not convey it
     at all.  For example, if you agree to terms that obligate you to
     collect a royalty for further conveying from those to whom you
     convey the Program, the only way you could satisfy both those
     terms and this License would be to refrain entirely from conveying
     the Program.
d3731 1
a3731 1
 13. Use with the GNU Affero General Public License.
d3742 1
a3742 1
 14. Revised Versions of this License.
d3745 3
a3747 4
     versions of the GNU General Public License from time to time.
     Such new versions will be similar in spirit to the present
     version, but may differ in detail to address new problems or
     concerns.
d3753 4
a3756 4
     that numbered version or of any later version published by the
     Free Software Foundation.  If the Program does not specify a
     version number of the GNU General Public License, you may choose
     any version ever published by the Free Software Foundation.
d3768 1
a3768 1
 15. Disclaimer of Warranty.
d3771 1
a3771 1
     APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE
d3775 1
a3775 1
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE
d3780 1
a3780 1
 16. Limitation of Liability.
d3784 2
a3785 2
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
     FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
d3793 1
a3793 1
 17. Interpretation of Sections 15 and 16.
a3801 1

d3832 1
a3832 1
     along with this program.  If not, see `http://www.gnu.org/licenses/'.
d3841 1
a3841 1
     This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
d3843 1
a3843 1
     under certain conditions; type `show c' for details.
d3845 1
a3845 1
   The hypothetical commands `show w' and `show c' should show the
d3853 1
a3853 1
the GNU GPL, see `http://www.gnu.org/licenses/'.
d3860 1
a3860 1
please read `http://www.gnu.org/philosophy/why-not-lgpl.html'.
d3871 1
a3871 1
     `http://fsf.org/'
d3896 2
a3897 2
     of subject matter or whether it is published as a printed book.
     We recommend this License principally for works whose purpose is
d3903 2
a3904 2
     that contains a notice placed by the copyright holder saying it
     can be distributed under the terms of this License.  Such a notice
d3908 3
a3910 3
     of the public is a licensee, and is addressed as "you".  You
     accept the license if you copy, modify or distribute the work in a
     way requiring permission under copyright law.
d3928 6
a3933 6
     titles are designated, as being those of Invariant Sections, in
     the notice that says that the Document is released under this
     License.  If a section does not fit the above definition of
     Secondary then it is not allowed to be designated as Invariant.
     The Document may contain zero Invariant Sections.  If the Document
     does not identify any Invariant Sections then there are none.
d3944 10
a3953 10
     straightforwardly with generic text editors or (for images
     composed of pixels) generic paint programs or (for drawings) some
     widely available drawing editor, and that is suitable for input to
     text formatters or for automatic translation to a variety of
     formats suitable for input to text formatters.  A copy made in an
     otherwise Transparent file format whose markup, or absence of
     markup, has been arranged to thwart or discourage subsequent
     modification by readers is not Transparent.  An image format is
     not Transparent if used for any substantial amount of text.  A
     copy that is not "Transparent" is called "Opaque".
d3957 8
a3964 8
     SGML or XML using a publicly available DTD, and
     standard-conforming simple HTML, PostScript or PDF designed for
     human modification.  Examples of transparent image formats include
     PNG, XCF and JPG.  Opaque formats include proprietary formats that
     can be read and edited only by proprietary word processors, SGML or
     XML for which the DTD and/or processing tools are not generally
     available, and the machine-generated HTML, PostScript or PDF
     produced by some word processors for output purposes only.
d4002 2
a4003 2
     distribute a large enough number of copies you must also follow
     the conditions in section 3.
d4017 5
a4021 6
     front cover must present the full title with all words of the
     title equally prominent and visible.  You may add other material
     on the covers in addition.  Copying with changes limited to the
     covers, as long as they preserve the title of the Document and
     satisfy these conditions, can be treated as verbatim copying in
     other respects.
d4029 11
a4039 12
     numbering more than 100, you must either include a
     machine-readable Transparent copy along with each Opaque copy, or
     state in or with each Opaque copy a computer-network location from
     which the general network-using public has access to download
     using public-standard network protocols a complete Transparent
     copy of the Document, free of added material.  If you use the
     latter option, you must take reasonably prudent steps, when you
     begin distribution of Opaque copies in quantity, to ensure that
     this Transparent copy will remain thus accessible at the stated
     location until at least one year after the last time you
     distribute an Opaque copy (directly or through your agents or
     retailers) of that edition to the public.
d4042 3
a4044 3
     the Document well before redistributing any large number of
     copies, to give them a chance to provide you with an updated
     version of the Document.
d4050 5
a4054 5
     release the Modified Version under precisely this License, with
     the Modified Version filling the role of the Document, thus
     licensing distribution and modification of the Modified Version to
     whoever possesses a copy of it.  In addition, you must do these
     things in the Modified Version:
d4057 5
a4061 5
          distinct from that of the Document, and from those of
          previous versions (which should, if there were any, be listed
          in the History section of the Document).  You may use the
          same title as a previous version if the original publisher of
          that version gives permission.
d4091 6
a4096 6
          authors, and publisher of the Modified Version as given on
          the Title Page.  If there is no section Entitled "History" in
          the Document, create one stating the title, year, authors,
          and publisher of the Document as given on its Title Page,
          then add an item describing the Modified Version as stated in
          the previous sentence.
d4101 5
a4105 5
          previous versions it was based on.  These may be placed in
          the "History" section.  You may omit a network location for a
          work that was published at least four years before the
          Document itself, or if the original publisher of the version
          it refers to gives permission.
d4108 2
a4109 2
          Preserve the Title of the section, and preserve in the
          section all the substance and tone of each of the contributor
d4112 3
a4114 4
       L. Preserve all the Invariant Sections of the Document,
          unaltered in their text and in their titles.  Section numbers
          or the equivalent are not considered part of the section
          titles.
d4127 5
a4131 5
     material copied from the Document, you may at your option
     designate some or all of these sections as invariant.  To do this,
     add their titles to the list of Invariant Sections in the Modified
     Version's license notice.  These titles must be distinct from any
     other section titles.
d4140 9
a4148 9
     and a passage of up to 25 words as a Back-Cover Text, to the end
     of the list of Cover Texts in the Modified Version.  Only one
     passage of Front-Cover Text and one of Back-Cover Text may be
     added by (or through arrangements made by) any one entity.  If the
     Document already includes a cover text for the same cover,
     previously added by you or by arrangement made by the same entity
     you are acting on behalf of, you may not add another; but you may
     replace the old one, on explicit permission from the previous
     publisher that added the old one.
d4158 2
a4159 2
     modified versions, provided that you include in the combination
     all of the Invariant Sections of all of the original documents,
d4186 2
a4187 2
     rules of this License for verbatim copying of each of the
     documents in all other respects.
d4191 3
a4193 3
     a copy of this License into the extracted document, and follow
     this License in all other respects regarding verbatim copying of
     that document.
d4198 2
a4199 2
     separate and independent documents or works, in or on a volume of
     a storage or distribution medium, is called an "aggregate" if the
d4244 2
a4245 2
     provisionally, unless and until the copyright holder explicitly
     and finally terminates your license, and (b) permanently, if the
d4257 4
a4260 4
     the licenses of parties who have received copies or rights from
     you under this License.  If your rights have been terminated and
     not permanently reinstated, receipt of a copy of some or all of
     the same material does not give you any rights to use it.
d4262 1
a4262 1
 10. FUTURE REVISIONS OF THIS LICENSE
d4268 1
a4268 1
     `http://www.gnu.org/copyleft/'.
d4275 5
a4279 5
     published (not as a draft) by the Free Software Foundation.  If
     the Document does not specify a version number of this License,
     you may choose any version ever published (not as a draft) by the
     Free Software Foundation.  If the Document specifies that a proxy
     can decide which future versions of this License can be used, that
d4283 1
a4283 1
 11. RELICENSING
a4312 1

d4329 1
a4329 1
Texts, replace the "with...Texts." line with this:
d4340 3
a4342 3
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License, to
permit their use in free software.
d4372 2
a4373 2
can greatly alter what fraction of the sales price counts as profit.
If the price you pay is $50, ten percent of the profit is probably less
d4383 2
a4384 2
ports such as adding a new CPU to the GNU Compiler Collection
contribute more; major new features or packages contribute the most.
d4403 19
a4421 1
* Environment Variable <1>:              GOMP_RTEMS_THREAD_POOLS.
a4422 18
* Environment Variable <2>:              GOMP_SPINCOUNT.        (line 6)
* Environment Variable <3>:              GOMP_STACKSIZE.        (line 6)
* Environment Variable <4>:              GOMP_DEBUG.            (line 6)
* Environment Variable <5>:              GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <6>:              OMP_WAIT_POLICY.       (line 6)
* Environment Variable <7>:              OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <8>:              OMP_SCHEDULE.          (line 6)
* Environment Variable <9>:              OMP_STACKSIZE.         (line 6)
* Environment Variable <10>:             OMP_PLACES.            (line 6)
* Environment Variable <11>:             OMP_PROC_BIND.         (line 6)
* Environment Variable <12>:             OMP_NUM_THREADS.       (line 6)
* Environment Variable <13>:             OMP_NESTED.            (line 6)
* Environment Variable <14>:             OMP_MAX_TASK_PRIORITY. (line 6)
* Environment Variable <15>:             OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable <16>:             OMP_DYNAMIC.           (line 6)
* Environment Variable <17>:             OMP_DEFAULT_DEVICE.    (line 6)
* Environment Variable <18>:             OMP_DISPLAY_ENV.       (line 6)
* Environment Variable:                  OMP_CANCELLATION.      (line 6)
d4425 6
a4430 1
* Implementation specific setting <1>:   GOMP_RTEMS_THREAD_POOLS.
a4431 5
* Implementation specific setting <2>:   GOMP_SPINCOUNT.        (line 6)
* Implementation specific setting <3>:   GOMP_STACKSIZE.        (line 6)
* Implementation specific setting <4>:   OMP_SCHEDULE.          (line 6)
* Implementation specific setting <5>:   OMP_NUM_THREADS.       (line 6)
* Implementation specific setting:       OMP_NESTED.            (line 6)
d4437 131
a4567 131
Node: Top2130
Node: Enabling OpenMP4536
Node: Runtime Library Routines5323
Node: omp_get_active_level8386
Node: omp_get_ancestor_thread_num9084
Node: omp_get_cancellation10011
Node: omp_get_default_device10823
Node: omp_get_dynamic11497
Node: omp_get_level12370
Node: omp_get_max_active_levels12988
Node: omp_get_max_task_priority13691
Node: omp_get_max_threads14309
Node: omp_get_nested15064
Node: omp_get_num_devices15976
Node: omp_get_num_procs16495
Node: omp_get_num_teams17032
Node: omp_get_num_threads17546
Node: omp_get_proc_bind18633
Node: omp_get_schedule19551
Node: omp_get_team_num20500
Node: omp_get_team_size20997
Node: omp_get_thread_limit21954
Node: omp_get_thread_num22571
Node: omp_in_parallel23440
Node: omp_in_final24087
Node: omp_is_initial_device24759
Node: omp_set_default_device25450
Node: omp_set_dynamic26238
Node: omp_set_max_active_levels27121
Node: omp_set_nested27895
Node: omp_set_num_threads28784
Node: omp_set_schedule29649
Node: omp_init_lock30725
Node: omp_set_lock31375
Node: omp_test_lock32227
Node: omp_unset_lock33200
Node: omp_destroy_lock34128
Node: omp_init_nest_lock34802
Node: omp_set_nest_lock35534
Node: omp_test_nest_lock36451
Node: omp_unset_nest_lock37481
Node: omp_destroy_nest_lock38493
Node: omp_get_wtick39241
Node: omp_get_wtime39831
Node: Environment Variables40605
Node: OMP_CANCELLATION42160
Node: OMP_DISPLAY_ENV42693
Node: OMP_DEFAULT_DEVICE43396
Node: OMP_DYNAMIC44176
Node: OMP_MAX_ACTIVE_LEVELS44772
Node: OMP_MAX_TASK_PRIORITY45422
Node: OMP_NESTED46082
Node: OMP_NUM_THREADS46687
Node: OMP_PROC_BIND47376
Node: OMP_PLACES48568
Node: OMP_STACKSIZE50745
Node: OMP_SCHEDULE51569
Node: OMP_THREAD_LIMIT52267
Node: OMP_WAIT_POLICY52867
Node: GOMP_CPU_AFFINITY53559
Node: GOMP_DEBUG55290
Node: GOMP_STACKSIZE55797
Node: GOMP_SPINCOUNT56626
Node: GOMP_RTEMS_THREAD_POOLS57835
Node: Enabling OpenACC60016
Node: OpenACC Runtime Library Routines61010
Node: acc_get_num_devices64804
Node: acc_set_device_type65527
Node: acc_get_device_type66288
Node: acc_set_device_num67000
Node: acc_get_device_num67799
Node: acc_async_test68592
Node: acc_async_test_all69577
Node: acc_wait70472
Node: acc_wait_all71104
Node: acc_wait_all_async71681
Node: acc_wait_async72430
Node: acc_init73134
Node: acc_shutdown73777
Node: acc_on_device74442
Node: acc_malloc75440
Node: acc_free75937
Node: acc_copyin76363
Node: acc_present_or_copyin77464
Node: acc_create79074
Node: acc_present_or_create80220
Node: acc_copyout81838
Node: acc_delete82853
Node: acc_update_device83820
Node: acc_update_self84924
Node: acc_map_data86020
Node: acc_unmap_data86703
Node: acc_deviceptr87222
Node: acc_hostptr87791
Node: acc_is_present88354
Node: acc_memcpy_to_device89868
Node: acc_memcpy_from_device90529
Node: acc_get_current_cuda_device91211
Node: acc_get_current_cuda_context91806
Node: acc_get_cuda_stream92398
Node: acc_set_cuda_stream92952
Node: OpenACC Environment Variables93483
Node: ACC_DEVICE_TYPE93942
Node: ACC_DEVICE_NUM94178
Node: GCC_ACC_NOTIFY94435
Node: CUDA Streams Usage94658
Ref: CUDA Streams Usage-Footnote-196558
Node: OpenACC Library Interoperability96667
Ref: OpenACC Library Interoperability-Footnote-1103013
Ref: OpenACC Library Interoperability-Footnote-2103265
Node: The libgomp ABI103473
Node: Implementing MASTER construct104329
Node: Implementing CRITICAL construct104743
Node: Implementing ATOMIC construct105482
Node: Implementing FLUSH construct105963
Node: Implementing BARRIER construct106234
Node: Implementing THREADPRIVATE construct106503
Node: Implementing PRIVATE clause107155
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses107736
Node: Implementing REDUCTION clause109060
Node: Implementing PARALLEL construct109617
Node: Implementing FOR construct110874
Node: Implementing ORDERED construct112872
Node: Implementing SECTIONS construct113178
Node: Implementing SINGLE construct113944
Node: Implementing OpenACC's PARALLEL construct114656
Node: Reporting Bugs114914
Node: Copying115276
Node: GNU Free Documentation License152841
Node: Funding177983
Node: Library Index180508
@


1.1.1.14
log
@re-import GCC 8.4.0.
@
text
@d1 2
a2 2
This is libgomp.info, produced by makeinfo version 6.5 from
libgomp.texi.
d4 1
a4 1
Copyright (C) 2006-2018 Free Software Foundation, Inc.
d21 3
a23 2
software.  Copies published by the Free Software Foundation raise funds
for GNU development.
d37 1
a37 1
   Copyright (C) 2006-2018 Free Software Foundation, Inc.
d54 2
a55 2
software.  Copies published by the Free Software Foundation raise funds
for GNU development.
d63 6
a68 6
This manual documents the usage of libgomp, the GNU Offloading and Multi
Processing Runtime Library.  This includes the GNU implementation of the
OpenMP (http://www.openmp.org) Application Programming Interface (API)
for multi-platform shared-memory parallel programming in C/C++ and
Fortran, and the GNU implementation of the OpenACC
(https://www.openacc.org) Application Programming Interface (API) for
d111 11
a121 10
compile-time flag '-fopenmp' must be specified.  This enables the OpenMP
directive '#pragma omp' in C/C++ and '!$omp' directives in free form,
'c$omp', '*$omp' and '!$omp' directives in fixed form, '!$' conditional
compilation sentinels in free form and 'c$', '*$' and '!$' sentinels in
fixed form, for Fortran.  The flag also arranges for automatic linking
of the OpenMP runtime library (*note Runtime Library Routines::).

   A complete description of all OpenMP directives accepted may be found
in the OpenMP Application Program Interface (http://www.openmp.org)
manual, version 4.5.
d189 1
a189 1
2.1 'omp_get_active_level' - Number of parallel regions
d197 1
a197 1
     _Prototype_:   'int omp_get_active_level(void);'
d200 1
a200 1
     _Interface_:   'integer function omp_get_active_level()'
d212 1
a212 1
2.2 'omp_get_ancestor_thread_num' - Ancestor thread ID
d218 2
a219 2
     outside zero to 'omp_get_level' -1 is returned; if LEVEL is
     'omp_get_level' the result is identical to 'omp_get_thread_num'.
d222 1
a222 1
     _Prototype_:   'int omp_get_ancestor_thread_num(int level);'
d225 2
a226 2
     _Interface_:   'integer function omp_get_ancestor_thread_num(level)'
                    'integer level'
d238 1
a238 1
2.3 'omp_get_cancellation' - Whether cancellation support is enabled
d242 3
a244 3
     This function returns 'true' if cancellation is activated, 'false'
     otherwise.  Here, 'true' and 'false' represent their
     language-specific counterparts.  Unless 'OMP_CANCELLATION' is set
d248 1
a248 1
     _Prototype_:   'int omp_get_cancellation(void);'
d251 1
a251 1
     _Interface_:   'logical function omp_get_cancellation()'
d262 1
a262 1
2.4 'omp_get_default_device' - Get the default device for target regions
d269 1
a269 1
     _Prototype_:   'int omp_get_default_device(void);'
d272 1
a272 1
     _Interface_:   'integer function omp_get_default_device()'
d283 1
a283 1
2.5 'omp_get_dynamic' - Dynamic teams setting
d287 2
a288 2
     This function returns 'true' if enabled, 'false' otherwise.  Here,
     'true' and 'false' represent their language-specific counterparts.
d291 3
a293 3
     'OMP_DYNAMIC' environment variable or at runtime using
     'omp_set_dynamic'.  If undefined, dynamic adjustment is disabled by
     default.
d296 1
a296 1
     _Prototype_:   'int omp_get_dynamic(void);'
d299 1
a299 1
     _Interface_:   'logical function omp_get_dynamic()'
d310 1
a310 1
2.6 'omp_get_level' - Obtain the current nesting level
d318 1
a318 1
     _Prototype_:   'int omp_get_level(void);'
d321 1
a321 1
     _Interface_:   'integer function omp_level()'
d332 1
a332 1
2.7 'omp_get_max_active_levels' - Maximum number of active regions
d340 1
a340 1
     _Prototype_:   'int omp_get_max_active_levels(void);'
d343 1
a343 1
     _Interface_:   'integer function omp_get_max_active_levels()'
d354 1
a354 1
2.8 'omp_get_max_task_priority' - Maximum priority value
d363 1
a363 1
     _Prototype_:   'int omp_get_max_task_priority(void);'
d366 1
a366 1
     _Interface_:   'integer function omp_get_max_task_priority()'
d374 1
a374 1
2.9 'omp_get_max_threads' - Maximum number of threads of parallel region
d379 1
a379 1
     region that does not use the clause 'num_threads'.
d382 1
a382 1
     _Prototype_:   'int omp_get_max_threads(void);'
d385 1
a385 1
     _Interface_:   'integer function omp_get_max_threads()'
d397 1
a397 1
2.10 'omp_get_nested' - Nested parallel regions
d401 2
a402 2
     This function returns 'true' if nested parallel regions are
     enabled, 'false' otherwise.  Here, 'true' and 'false' represent
d406 2
a407 2
     'OMP_NESTED' environment variable or at runtime using
     'omp_set_nested'.  If undefined, nested parallel regions are
d411 1
a411 1
     _Prototype_:   'int omp_get_nested(void);'
d414 1
a414 1
     _Interface_:   'logical function omp_get_nested()'
d425 1
a425 1
2.11 'omp_get_num_devices' - Number of target devices
d432 1
a432 1
     _Prototype_:   'int omp_get_num_devices(void);'
d435 1
a435 1
     _Interface_:   'integer function omp_get_num_devices()'
d443 1
a443 1
2.12 'omp_get_num_procs' - Number of processors online
d450 1
a450 1
     _Prototype_:   'int omp_get_num_procs(void);'
d453 1
a453 1
     _Interface_:   'integer function omp_get_num_procs()'
d461 1
a461 1
2.13 'omp_get_num_teams' - Number of teams
d468 1
a468 1
     _Prototype_:   'int omp_get_num_teams(void);'
d471 1
a471 1
     _Interface_:   'integer function omp_get_num_teams()'
d479 1
a479 1
2.14 'omp_get_num_threads' - Size of the active team
d483 2
a484 2
     Returns the number of threads in the current team.  In a sequential
     section of the program 'omp_get_num_threads' returns 1.
d487 5
a491 5
     'OMP_NUM_THREADS' environment variable.  At runtime, the size of
     the current team may be set either by the 'NUM_THREADS' clause or
     by 'omp_set_num_threads'.  If none of the above were used to define
     a specific value and 'OMP_DYNAMIC' is disabled, one thread per CPU
     online is used.
d494 1
a494 1
     _Prototype_:   'int omp_get_num_threads(void);'
d497 1
a497 1
     _Interface_:   'integer function omp_get_num_threads()'
d509 1
a509 1
2.15 'omp_get_proc_bind' - Whether theads may be moved between CPUs
d513 5
a517 5
     This functions returns the currently active thread affinity policy,
     which is set via 'OMP_PROC_BIND'.  Possible values are
     'omp_proc_bind_false', 'omp_proc_bind_true',
     'omp_proc_bind_master', 'omp_proc_bind_close' and
     'omp_proc_bind_spread'.
d520 1
a520 1
     _Prototype_:   'omp_proc_bind_t omp_get_proc_bind(void);'
d523 2
a524 2
     _Interface_:   'integer(kind=omp_proc_bind_kind) function
                    omp_get_proc_bind()'
d536 1
a536 1
2.16 'omp_get_schedule' - Obtain the runtime scheduling method
d541 2
a542 2
     set to the value 'omp_sched_static', 'omp_sched_dynamic',
     'omp_sched_guided' or 'omp_sched_auto'.  The second argument,
d546 2
a547 2
     _Prototype_:   'void omp_get_schedule(omp_sched_t *kind, int
                    *chunk_size);'
d550 3
a552 3
     _Interface_:   'subroutine omp_get_schedule(kind, chunk_size)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer chunk_size'
d563 1
a563 1
2.17 'omp_get_team_num' - Get team number
d570 1
a570 1
     _Prototype_:   'int omp_get_team_num(void);'
d573 1
a573 1
     _Interface_:   'integer function omp_get_team_num()'
d581 1
a581 1
2.18 'omp_get_team_size' - Number of threads in a team
d587 3
a589 3
     values of LEVEL outside zero to 'omp_get_level', -1 is returned; if
     LEVEL is zero, 1 is returned, and for 'omp_get_level', the result
     is identical to 'omp_get_num_threads'.
d592 1
a592 1
     _Prototype_:   'int omp_get_team_size(int level);'
d595 2
a596 2
     _Interface_:   'integer function omp_get_team_size(level)'
                    'integer level'
d608 1
a608 1
2.19 'omp_get_thread_limit' - Maximum number of threads
d615 1
a615 1
     _Prototype_:   'int omp_get_thread_limit(void);'
d618 1
a618 1
     _Interface_:   'integer function omp_get_thread_limit()'
d629 1
a629 1
2.20 'omp_get_thread_num' - Current thread ID
d634 4
a637 4
     team.  In a sequential parts of the program, 'omp_get_thread_num'
     always returns 0.  In parallel regions the return value varies from
     0 to 'omp_get_num_threads'-1 inclusive.  The return value of the
     master thread of a team is always 0.
d640 1
a640 1
     _Prototype_:   'int omp_get_thread_num(void);'
d643 1
a643 1
     _Interface_:   'integer function omp_get_thread_num()'
d654 1
a654 1
2.21 'omp_in_parallel' - Whether a parallel region is active
d658 2
a659 2
     This function returns 'true' if currently running in parallel,
     'false' otherwise.  Here, 'true' and 'false' represent their
d663 1
a663 1
     _Prototype_:   'int omp_in_parallel(void);'
d666 1
a666 1
     _Interface_:   'logical function omp_in_parallel()'
d674 1
a674 1
2.22 'omp_in_final' - Whether in final or included task region
d678 2
a679 2
     This function returns 'true' if currently running in a final or
     included task region, 'false' otherwise.  Here, 'true' and 'false'
d683 1
a683 1
     _Prototype_:   'int omp_in_final(void);'
d686 1
a686 1
     _Interface_:   'logical function omp_in_final()'
d694 1
a694 1
2.23 'omp_is_initial_device' - Whether executing on the host device
d698 2
a699 2
     This function returns 'true' if currently running on the host
     device, 'false' otherwise.  Here, 'true' and 'false' represent
d703 1
a703 1
     _Prototype_:   'int omp_is_initial_device(void);'
d706 1
a706 1
     _Interface_:   'logical function omp_is_initial_device()'
d714 1
a714 1
2.24 'omp_set_default_device' - Set the default device for target regions
d722 1
a722 1
     _Prototype_:   'void omp_set_default_device(int device_num);'
d725 2
a726 2
     _Interface_:   'subroutine omp_set_default_device(device_num)'
                    'integer device_num'
d737 1
a737 1
2.25 'omp_set_dynamic' - Enable/disable dynamic teams
d743 2
a744 2
     of 'true' and 'false', where 'true' enables dynamic adjustment of
     team sizes and 'false' disables it.
d747 1
a747 1
     _Prototype_:   'void omp_set_dynamic(int dynamic_threads);'
d750 2
a751 2
     _Interface_:   'subroutine omp_set_dynamic(dynamic_threads)'
                    'logical, intent(in) :: dynamic_threads'
d762 1
a762 1
2.26 'omp_set_max_active_levels' - Limits the number of active parallel regions
d770 1
a770 1
     _Prototype_:   'void omp_set_max_active_levels(int max_levels);'
d773 2
a774 2
     _Interface_:   'subroutine omp_set_max_active_levels(max_levels)'
                    'integer max_levels'
d785 1
a785 1
2.27 'omp_set_nested' - Enable/disable nested parallel regions
d791 2
a792 2
     language-specific equivalent of 'true' and 'false', where 'true'
     enables dynamic adjustment of team sizes and 'false' disables it.
d795 1
a795 1
     _Prototype_:   'void omp_set_nested(int nested);'
d798 2
a799 2
     _Interface_:   'subroutine omp_set_nested(nested)'
                    'logical, intent(in) :: nested'
d810 1
a810 1
2.28 'omp_set_num_threads' - Set upper team size limit
d815 2
a816 2
     parallel sections, if those do not specify a 'num_threads' clause.
     The argument of 'omp_set_num_threads' shall be a positive integer.
d819 1
a819 1
     _Prototype_:   'void omp_set_num_threads(int num_threads);'
d822 2
a823 2
     _Interface_:   'subroutine omp_set_num_threads(num_threads)'
                    'integer, intent(in) :: num_threads'
d835 1
a835 1
2.29 'omp_set_schedule' - Set the runtime scheduling method
d840 2
a841 2
     value 'omp_sched_static', 'omp_sched_dynamic', 'omp_sched_guided'
     or 'omp_sched_auto'.  Except for 'omp_sched_auto', the chunk size
d843 1
a843 1
     value if zero or negative.  For 'omp_sched_auto' the CHUNK_SIZE
d847 2
a848 2
     _Prototype_:   'void omp_set_schedule(omp_sched_t kind, int
                    chunk_size);'
d851 3
a853 3
     _Interface_:   'subroutine omp_set_schedule(kind, chunk_size)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer chunk_size'
d864 1
a864 1
2.30 'omp_init_lock' - Initialize simple lock
d872 1
a872 1
     _Prototype_:   'void omp_init_lock(omp_lock_t *lock);'
d875 2
a876 2
     _Interface_:   'subroutine omp_init_lock(svar)'
                    'integer(omp_lock_kind), intent(out) :: svar'
d887 1
a887 1
2.31 'omp_set_lock' - Wait for and set simple lock
d891 4
a894 4
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  The calling thread is blocked until the lock
     is available.  If the lock is already held by the current thread, a
     deadlock occurs.
d897 1
a897 1
     _Prototype_:   'void omp_set_lock(omp_lock_t *lock);'
d900 2
a901 2
     _Interface_:   'subroutine omp_set_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d913 1
a913 1
2.32 'omp_test_lock' - Test and set simple lock if available
d917 5
a921 5
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  Contrary to 'omp_set_lock', 'omp_test_lock'
     does not block if the lock is not available.  This function returns
     'true' upon success, 'false' otherwise.  Here, 'true' and 'false'
     represent their language-specific counterparts.
d924 1
a924 1
     _Prototype_:   'int omp_test_lock(omp_lock_t *lock);'
d927 2
a928 2
     _Interface_:   'logical function omp_test_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d939 1
a939 1
2.33 'omp_unset_lock' - Unset simple lock
d944 4
a947 4
     'omp_set_lock' or 'omp_test_lock' before.  In addition, the lock
     must be held by the thread calling 'omp_unset_lock'.  Then, the
     lock becomes unlocked.  If one or more threads attempted to set the
     lock before, one of them is chosen to, again, set the lock to
d951 1
a951 1
     _Prototype_:   'void omp_unset_lock(omp_lock_t *lock);'
d954 2
a955 2
     _Interface_:   'subroutine omp_unset_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d966 1
a966 1
2.34 'omp_destroy_lock' - Destroy simple lock
d974 1
a974 1
     _Prototype_:   'void omp_destroy_lock(omp_lock_t *lock);'
d977 2
a978 2
     _Interface_:   'subroutine omp_destroy_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'
d989 1
a989 1
2.35 'omp_init_nest_lock' - Initialize nested lock
d997 1
a997 1
     _Prototype_:   'void omp_init_nest_lock(omp_nest_lock_t *lock);'
d1000 2
a1001 2
     _Interface_:   'subroutine omp_init_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(out) :: nvar'
d1012 1
a1012 1
2.36 'omp_set_nest_lock' - Wait for and set nested lock
d1016 5
a1020 4
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  The calling thread is blocked until the
     lock is available.  If the lock is already held by the current
     thread, the nesting count for the lock is incremented.
d1023 1
a1023 1
     _Prototype_:   'void omp_set_nest_lock(omp_nest_lock_t *lock);'
d1026 2
a1027 2
     _Interface_:   'subroutine omp_set_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1038 1
a1038 1
2.37 'omp_test_nest_lock' - Test and set nested lock if available
d1042 6
a1047 5
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  Contrary to 'omp_set_nest_lock',
     'omp_test_nest_lock' does not block if the lock is not available.
     If the lock is already held by the current thread, the new nesting
     count is returned.  Otherwise, the return value equals zero.
d1050 1
a1050 1
     _Prototype_:   'int omp_test_nest_lock(omp_nest_lock_t *lock);'
d1053 2
a1054 2
     _Interface_:   'logical function omp_test_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1065 1
a1065 1
2.38 'omp_unset_nest_lock' - Unset nested lock
d1070 1
a1070 1
     'omp_set_nested_lock' or 'omp_test_nested_lock' before.  In
d1072 1
a1072 1
     'omp_unset_nested_lock'.  If the nesting count drops to zero, the
d1078 1
a1078 1
     _Prototype_:   'void omp_unset_nest_lock(omp_nest_lock_t *lock);'
d1081 2
a1082 2
     _Interface_:   'subroutine omp_unset_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1093 1
a1093 1
2.39 'omp_destroy_nest_lock' - Destroy nested lock
d1102 1
a1102 1
     _Prototype_:   'void omp_destroy_nest_lock(omp_nest_lock_t *);'
d1105 2
a1106 2
     _Interface_:   'subroutine omp_destroy_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'
d1117 1
a1117 1
2.40 'omp_get_wtick' - Get timer precision
d1125 1
a1125 1
     _Prototype_:   'double omp_get_wtick(void);'
d1128 1
a1128 1
     _Interface_:   'double precision function omp_get_wtick()'
d1139 1
a1139 1
2.41 'omp_get_wtime' - Elapsed wall clock time
d1150 1
a1150 1
     _Prototype_:   'double omp_get_wtime(void);'
d1153 1
a1153 1
     _Interface_:   'double precision function omp_get_wtime()'
d1167 1
a1167 1
The environment variables which beginning with 'OMP_' are defined by
d1169 1
a1169 1
beginning with 'GOMP_' are GNU extensions.
d1196 1
a1196 1
3.1 'OMP_CANCELLATION' - Set whether cancellation is activated
d1200 3
a1202 3
     If set to 'TRUE', the cancellation is activated.  If set to 'FALSE'
     or if unset, cancellation is disabled and the 'cancel' construct is
     ignored.
d1213 1
a1213 1
3.2 'OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
d1217 1
a1217 1
     If set to 'TRUE', the OpenMP version number and the values
d1219 1
a1219 1
     'stderr'.  If set to 'VERBOSE', it additionally shows the value of
d1221 1
a1221 1
     or set to 'FALSE', this information will not be shown.
d1229 1
a1229 1
3.3 'OMP_DEFAULT_DEVICE' - Set the device used in target regions
d1233 5
a1237 5
     Set to choose the device which is used in a 'target' region, unless
     the value is overridden by 'omp_set_default_device' or by a
     'device' clause.  The value shall be the nonnegative device number.
     If no device with the given device number exists, the code is
     executed on the host.  If unset, device number 0 will be used.
d1248 1
a1248 1
3.4 'OMP_DYNAMIC' - Dynamic adjustment of threads
d1254 2
a1255 2
     'TRUE' or 'FALSE'.  If undefined, dynamic adjustment is disabled by
     default.
d1266 1
a1266 1
3.5 'OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1283 1
a1283 1
3.6 'OMP_MAX_TASK_PRIORITY' - Set the maximum priority
d1286 1
a1286 1
number that can be set for a task.
d1288 2
a1289 2
     Specifies the initial value for the maximum priority value that can
     be set for a task.  The value of this variable shall be a
d1302 1
a1302 1
3.7 'OMP_NESTED' - Nested parallel regions
d1308 1
a1308 1
     environment variable shall be 'TRUE' or 'FALSE'.  If undefined,
d1320 1
a1320 1
3.8 'OMP_NUM_THREADS' - Specifies the number of threads to use
d1324 5
a1328 5
     Specifies the default number of threads to use in parallel regions.
     The value of this variable shall be a comma-separated list of
     positive integers; the value specified the number of threads to use
     for the corresponding nested level.  If undefined one thread per
     CPU is used.
d1339 1
a1339 1
3.9 'OMP_PROC_BIND' - Whether theads may be moved between CPUs
d1344 1
a1344 1
     to 'TRUE', OpenMP theads should not be moved; if set to 'FALSE'
d1346 1
a1346 1
     values 'MASTER', 'CLOSE' and 'SPREAD' can be used to specify the
d1348 3
a1350 3
     'MASTER' the worker threads are in the same place partition as the
     master thread.  With 'CLOSE' those are kept close to the master
     thread in contiguous place partitions.  And with 'SPREAD' a sparse
d1353 2
a1354 2
     When undefined, 'OMP_PROC_BIND' defaults to 'TRUE' when
     'OMP_PLACES' or 'GOMP_CPU_AFFINITY' is set and 'FALSE' otherwise.
d1366 1
a1366 1
3.10 'OMP_PLACES' - Specifies on which CPUs the theads should be placed
d1370 3
a1372 3
     The thread placement can be either specified using an abstract name
     or by an explicit list of the places.  The abstract names
     'threads', 'cores' and 'sockets' can be optionally followed by a
d1374 3
a1376 3
     shall be created.  With 'threads' each place corresponds to a
     single hardware thread; 'cores' to a single core with the
     corresponding number of hardware threads; and with 'sockets' the
d1378 1
a1378 1
     be shown by setting the 'OMP_DISPLAY_ENV' environment variable.
d1391 2
a1392 2
     specifies the same places list: '"{0,1,2}, {3,4,6}, {7,8,9},
     {10,11,12}"'; '"{0:3}, {3:3}, {7:3}, {10:3}"'; and '"{0:2}:4:3"'.
d1394 2
a1395 2
     If 'OMP_PLACES' and 'GOMP_CPU_AFFINITY' are unset and
     'OMP_PROC_BIND' is either unset or 'false', threads may be moved
d1408 1
a1408 1
3.11 'OMP_STACKSIZE' - Set default thread stack size
d1413 7
a1419 7
     is suffixed by 'B', 'K', 'M' or 'G', in which case the size is,
     respectively, in bytes, kilobytes, megabytes or gigabytes.  This is
     different from 'pthread_attr_setstacksize' which gets the number of
     bytes as an argument.  If the stack size cannot be set due to
     system constraints, an error is reported and the initial stack size
     is left unchanged.  If undefined, the stack size is system
     dependent.
d1427 1
a1427 1
3.12 'OMP_SCHEDULE' - How threads are scheduled
d1431 5
a1435 5
     Allows to specify 'schedule type' and 'chunk size'.  The value of
     the variable shall have the form: 'type[,chunk]' where 'type' is
     one of 'static', 'dynamic', 'guided' or 'auto' The optional 'chunk'
     size shall be a positive integer.  If undefined, dynamic scheduling
     and a chunk size of 1 is used.
d1447 1
a1447 1
3.13 'OMP_THREAD_LIMIT' - Set the maximum number of threads
d1464 1
a1464 1
3.14 'OMP_WAIT_POLICY' - How waiting threads are handled
d1469 2
a1470 2
     the value is 'PASSIVE', waiting threads should not consume CPU
     power while waiting; while the value is 'ACTIVE' specifies that
d1483 1
a1483 1
3.15 'GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d1491 2
a1492 2
     (M-N:S). CPU numbers are zero based.  For example,
     'GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
d1496 1
a1496 1
     beginning of the list.  'GOMP_CPU_AFFINITY=0' binds all threads to
d1501 10
a1510 10
     language-specific library functions, e.g., 'getenv' in C or
     'GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
     setting of the 'GOMP_CPU_AFFINITY' environment variable.  A defined
     CPU affinity on startup cannot be changed or disabled during the
     runtime of the application.

     If both 'GOMP_CPU_AFFINITY' and 'OMP_PROC_BIND' are set,
     'OMP_PROC_BIND' has a higher precedence.  If neither has been set
     and 'OMP_PROC_BIND' is unset, or when 'OMP_PROC_BIND' is set to
     'FALSE', the host system will handle the assignment of threads to
d1519 1
a1519 1
3.16 'GOMP_DEBUG' - Enable debugging output
d1523 2
a1524 2
     Enable debugging output.  The variable should be set to '0'
     (disabled, also the default if not set), or '1' (enabled).
d1533 1
a1533 1
3.17 'GOMP_STACKSIZE' - Set default thread stack size
d1538 1
a1538 1
     from 'pthread_attr_setstacksize' which gets the number of bytes as
d1555 1
a1555 1
3.18 'GOMP_SPINCOUNT' - Set the busy-wait spin count
d1561 1
a1561 1
     value may be either 'INFINITE', 'INFINITY' to always wait actively
d1564 9
a1572 8
     suffixes acting as multiplication factors: 'k' (kilo, thousand),
     'M' (mega, million), 'G' (giga, billion), or 'T' (tera, trillion).
     If undefined, 0 is used when 'OMP_WAIT_POLICY' is 'PASSIVE',
     300,000 is used when 'OMP_WAIT_POLICY' is undefined and 30 billion
     is used when 'OMP_WAIT_POLICY' is 'ACTIVE'.  If there are more
     OpenMP threads than available CPUs, 1000 and 100 spins are used for
     'OMP_WAIT_POLICY' being 'ACTIVE' or undefined, respectively; unless
     the 'GOMP_SPINCOUNT' is lower or 'OMP_WAIT_POLICY' is 'PASSIVE'.
d1580 1
a1580 1
3.19 'GOMP_RTEMS_THREAD_POOLS' - Set the RTEMS specific thread pools
d1586 4
a1589 4
     thread pools.  The format for 'GOMP_RTEMS_THREAD_POOLS' is a list
     of optional '<thread-pool-count>[$<priority>]@@<scheduler-name>'
     configurations separated by ':' where:
        * '<thread-pool-count>' is the thread pool count for this
d1591 3
a1593 2
        * '$<priority>' is an optional priority for the worker threads
          of a thread pool according to 'pthread_setschedparam'.  In
d1599 2
a1600 1
        * '@@<scheduler-name>' is the scheduler instance name according
d1603 5
a1607 4
     instance, then each OpenMP master thread of this scheduler instance
     will use its own dynamically allocated thread pool.  To limit the
     worker thread count of the thread pools, each OpenMP master thread
     must call 'omp_set_num_threads'.
d1609 2
a1610 2
     Lets suppose we have three scheduler instances 'IO', 'WRK0', and
     'WRK1' with 'GOMP_RTEMS_THREAD_POOLS' set to '"1@@WRK0:3$4@@WRK1"'.
d1612 1
a1612 1
     'IO'.  In the scheduler instance 'WRK0' there is one thread pool
d1615 3
a1617 3
     master thread that created it.  In the scheduler instance 'WRK1'
     there are three thread pools available and their worker threads run
     at priority four.
d1626 4
a1629 4
compile-time flag '-fopenacc' must be specified.  This enables the
OpenACC directive '#pragma acc' in C/C++ and '!$accp' directives in free
form, 'c$acc', '*$acc' and '!$acc' directives in fixed form, '!$'
conditional compilation sentinels in free form and 'c$', '*$' and '!$'
d1635 1
a1635 1
found in the OpenACC (https://www.openacc.org) Application Programming
d1639 2
a1640 2
future versions of GCC. See <https://gcc.gnu.org/wiki/OpenACC> for more
information.
d1650 3
a1652 3
throw exceptions.  Generally, they are available only for the host, with
the exception of 'acc_on_device', which is available for both the host
and the acceleration device.
d1715 1
a1715 1
5.1 'acc_get_num_devices' - Get number of devices for given device type
d1723 1
a1723 1
     _Prototype_:   'int acc_get_num_devices(acc_device_t devicetype);'
d1726 2
a1727 2
     _Interface_:   'integer function acc_get_num_devices(devicetype)'
                    'integer(kind=acc_device_kind) devicetype'
d1730 1
a1730 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1736 1
a1736 1
5.2 'acc_set_device_type' - Set type of device accelerator to use.
d1745 1
a1745 1
     _Prototype_:   'acc_set_device_type(acc_device_t devicetype);'
d1748 2
a1749 2
     _Interface_:   'subroutine acc_set_device_type(devicetype)'
                    'integer(kind=acc_device_kind) devicetype'
d1752 1
a1752 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1758 1
a1758 1
5.3 'acc_get_device_type' - Get type of device accelerator to be used.
d1766 1
a1766 1
     _Prototype_:   'acc_device_t acc_get_device_type(void);'
d1769 2
a1770 2
     _Interface_:   'function acc_get_device_type(void)'
                    'integer(kind=acc_device_kind) acc_get_device_type'
d1773 1
a1773 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1779 1
a1779 1
5.4 'acc_set_device_num' - Set device number to use.
d1788 2
a1789 1
     _Prototype_:   'acc_set_device_num(int num, acc_device_t devicetype);'
d1792 3
a1794 3
     _Interface_:   'subroutine acc_set_device_num(devicenum, devicetype)'
                    'integer devicenum'
                    'integer(kind=acc_device_kind) devicetype'
d1797 1
a1797 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1803 1
a1803 1
5.5 'acc_get_device_num' - Get device number to be used.
d1812 1
a1812 1
     _Prototype_:   'int acc_get_device_num(acc_device_t devicetype);'
d1815 3
a1817 3
     _Interface_:   'function acc_get_device_num(devicetype)'
                    'integer(kind=acc_device_kind) devicetype'
                    'integer acc_get_device_num'
d1820 1
a1820 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1826 1
a1826 1
5.6 'acc_async_test' - Test for completion of a specific asynchronous operation.
d1831 4
a1834 4
     specified in ARG.  In C/C++, a non-zero value will be returned to
     indicate the specified asynchronous operation has completed.  While
     Fortran will return a 'true'.  If the asynchrounous operation has
     not completed, C/C++ returns a zero and Fortran returns a 'false'.
d1837 1
a1837 1
     _Prototype_:   'int acc_async_test(int arg);'
d1840 3
a1842 3
     _Interface_:   'function acc_async_test(arg)'
                    'integer(kind=acc_handle_kind) arg'
                    'logical acc_async_test'
d1845 1
a1845 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1851 1
a1851 1
5.7 'acc_async_test_all' - Tests for completion of all asynchronous operations.
d1857 3
a1859 3
     asynchronous operations have completed.  While Fortran will return
     a 'true'.  If any asynchronous operation has not completed, C/C++
     returns a zero and Fortran returns a 'false'.
d1862 1
a1862 1
     _Prototype_:   'int acc_async_test_all(void);'
d1865 2
a1866 2
     _Interface_:   'function acc_async_test()'
                    'logical acc_get_device_num'
d1869 1
a1869 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1875 1
a1875 1
5.8 'acc_wait' - Wait for completion of a specific asynchronous operation.
d1883 1
a1883 4
     _Prototype_:   'acc_wait(arg);'
     _Prototype     'acc_async_wait(arg);'
     (OpenACC 1.0
     compatibility)_:
d1886 2
a1887 6
     _Interface_:   'subroutine acc_wait(arg)'
                    'integer(acc_handle_kind) arg'
     _Interface     'subroutine acc_async_wait(arg)'
     (OpenACC 1.0
     compatibility)_:
                    'integer(acc_handle_kind) arg'
d1890 1
a1890 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1896 1
a1896 1
5.9 'acc_wait_all' - Waits for completion of all asynchronous operations.
d1904 1
a1904 4
     _Prototype_:   'acc_wait_all(void);'
     _Prototype     'acc_async_wait_all(void);'
     (OpenACC 1.0
     compatibility)_:
d1907 1
a1907 4
     _Interface_:   'subroutine acc_wait_all()'
     _Interface     'subroutine acc_async_wait_all()'
     (OpenACC 1.0
     compatibility)_:
d1910 1
a1910 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1916 1
a1916 1
5.10 'acc_wait_all_async' - Wait for completion of all asynchronous operations.
d1925 1
a1925 1
     _Prototype_:   'acc_wait_all_async(int async);'
d1928 2
a1929 2
     _Interface_:   'subroutine acc_wait_all_async(async)'
                    'integer(acc_handle_kind) async'
d1932 1
a1932 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1938 1
a1938 1
5.11 'acc_wait_async' - Wait for completion of asynchronous operations.
d1946 1
a1946 1
     _Prototype_:   'acc_wait_async(int arg, int async);'
d1949 2
a1950 2
     _Interface_:   'subroutine acc_wait_async(arg, async)'
                    'integer(acc_handle_kind) arg, async'
d1953 1
a1953 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1959 1
a1959 1
5.12 'acc_init' - Initialize runtime for a specific device type.
d1963 2
a1964 2
     This function initializes the runtime for the device type specified
     in DEVICETYPE.
d1967 1
a1967 1
     _Prototype_:   'acc_init(acc_device_t devicetype);'
d1970 2
a1971 2
     _Interface_:   'subroutine acc_init(devicetype)'
                    'integer(acc_device_kind) devicetype'
d1974 1
a1974 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d1980 1
a1980 1
5.13 'acc_shutdown' - Shuts down the runtime for a specific device type.
d1988 1
a1988 1
     _Prototype_:   'acc_shutdown(acc_device_t devicetype);'
d1991 2
a1992 2
     _Interface_:   'subroutine acc_shutdown(devicetype)'
                    'integer(acc_device_kind) devicetype'
d1995 1
a1995 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2001 1
a2001 1
5.14 'acc_on_device' - Whether executing on a particular device
d2006 1
a2006 1
     particular device specified in DEVICETYPE.  In C/C++ a non-zero
d2008 1
a2008 1
     specified device type.  In Fortran, 'true' will be returned.  If
d2010 1
a2010 1
     will return a zero, while Fortran will return 'false'.
d2013 1
a2013 1
     _Prototype_:   'acc_on_device(acc_device_t devicetype);'
d2016 3
a2018 3
     _Interface_:   'function acc_on_device(devicetype)'
                    'integer(acc_device_kind) devicetype'
                    'logical acc_on_device'
d2021 1
a2021 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2027 1
a2027 1
5.15 'acc_malloc' - Allocate device memory.
d2031 1
a2031 1
     This function allocates LEN bytes of device memory.  It returns the
d2035 1
a2035 1
     _Prototype_:   'd_void* acc_malloc(size_t len);'
d2038 1
a2038 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2044 1
a2044 1
5.16 'acc_free' - Free device memory.
d2048 1
a2048 1
     Free previously allocated device memory at the device address 'a'.
d2051 1
a2051 1
     _Prototype_:   'acc_free(d_void *a);'
d2054 1
a2054 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2060 1
a2060 1
5.17 'acc_copyin' - Allocate device memory and copy host memory to it.
d2065 1
a2065 1
     maps it to the specified host address in A.  The device address of
d2068 3
a2070 3
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
     a variable or array element and LEN specifies the length in bytes.
d2073 1
a2073 1
     _Prototype_:   'void *acc_copyin(h_void *a, size_t len);'
d2076 5
a2080 5
     _Interface_:   'subroutine acc_copyin(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_copyin(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2083 1
a2083 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2089 1
a2089 1
5.18 'acc_present_or_copyin' - If the data is not present on the device, allocate device memory and copy from host memory.
d2094 3
a2096 3
     LEN is present or not.  If it is not present, then device memory
     will be allocated and the host memory copied.  The device address
     of the newly allocated device memory is returned.
d2098 2
a2099 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2103 2
a2104 2
     _Prototype_:   'void *acc_present_or_copyin(h_void *a, size_t len);'
     _Prototype_:   'void *acc_pcopyin(h_void *a, size_t len);'
d2107 10
a2116 10
     _Interface_:   'subroutine acc_present_or_copyin(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_present_or_copyin(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_pcopyin(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_pcopyin(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2119 1
a2119 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2125 1
a2125 1
5.19 'acc_create' - Allocate device memory and map it to host memory.
d2130 1
a2130 1
     specified by the host address A with a length of LEN bytes.  In
d2134 2
a2135 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2139 1
a2139 1
     _Prototype_:   'void *acc_create(h_void *a, size_t len);'
d2142 5
a2146 5
     _Interface_:   'subroutine acc_create(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_create(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2149 1
a2149 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2155 1
a2155 1
5.20 'acc_present_or_create' - If the data is not present on the device, allocate device memory and map it to host memory.
d2160 2
a2161 2
     LEN is present or not.  If it is not present, then device memory
     will be allocated and mapped to host memory.  In C/C++, the device
d2164 2
a2165 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2169 2
a2170 2
     _Prototype_:   'void *acc_present_or_create(h_void *a, size_t len)'
     _Prototype_:   'void *acc_pcreate(h_void *a, size_t len)'
d2173 10
a2182 10
     _Interface_:   'subroutine acc_present_or_create(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_present_or_create(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_pcreate(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_pcreate(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2185 1
a2185 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2191 1
a2191 1
5.21 'acc_copyout' - Copy device memory to host memory.
d2198 2
a2199 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2203 1
a2203 1
     _Prototype_:   'acc_copyout(h_void *a, size_t len);'
d2206 5
a2210 5
     _Interface_:   'subroutine acc_copyout(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_copyout(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2213 1
a2213 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2219 1
a2219 1
5.22 'acc_delete' - Free device memory.
d2226 2
a2227 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2231 1
a2231 1
     _Prototype_:   'acc_delete(h_void *a, size_t len);'
d2234 5
a2238 5
     _Interface_:   'subroutine acc_delete(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_delete(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2241 1
a2241 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2247 1
a2247 1
5.23 'acc_update_device' - Update device memory from mapped host memory.
d2255 2
a2256 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2260 1
a2260 1
     _Prototype_:   'acc_update_device(h_void *a, size_t len);'
d2263 5
a2267 5
     _Interface_:   'subroutine acc_update_device(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_update_device(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2270 1
a2270 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2276 1
a2276 1
5.24 'acc_update_self' - Update host memory from mapped device memory.
d2284 2
a2285 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2289 1
a2289 1
     _Prototype_:   'acc_update_self(h_void *a, size_t len);'
d2292 5
a2296 5
     _Interface_:   'subroutine acc_update_self(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_update_self(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
d2299 1
a2299 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2305 1
a2305 1
5.25 'acc_map_data' - Map previously allocated device memory to host memory.
d2310 1
a2310 1
     The device memory is specified with the device address D.  The host
d2314 1
a2314 1
     _Prototype_:   'acc_map_data(h_void *h, d_void *d, size_t len);'
d2317 1
a2317 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2323 1
a2323 1
5.26 'acc_unmap_data' - Unmap device memory from host memory.
d2327 1
a2327 1
     This function unmaps previously mapped device and host memory.  The
d2331 1
a2331 1
     _Prototype_:   'acc_unmap_data(h_void *h);'
d2334 1
a2334 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2340 1
a2340 1
5.27 'acc_deviceptr' - Get device pointer associated with specific host address.
d2348 1
a2348 1
     _Prototype_:   'void *acc_deviceptr(h_void *h);'
d2351 1
a2351 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2357 1
a2357 1
5.28 'acc_hostptr' - Get host pointer associated with specific device address.
d2365 1
a2365 1
     _Prototype_:   'void *acc_hostptr(d_void *d);'
d2368 1
a2368 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2374 1
a2374 1
5.29 'acc_is_present' - Indicate whether host variable / array is present on device.
d2378 2
a2379 2
     This function indicates whether the specified host address in A and
     a length of LEN bytes is present on the device.  In C/C++, a
d2381 1
a2381 1
     memory on the device.  A zero is returned to indicate the memory is
d2384 2
a2385 2
     In Fortran, two (2) forms are supported.  In the first form, A
     specifies a contiguous array section.  The second form A specifies
d2387 2
a2388 2
     If the host memory is mapped to device memory, then a 'true' is
     returned.  Otherwise, a 'false' is return to indicate the mapped
d2392 1
a2392 1
     _Prototype_:   'int acc_is_present(h_void *a, size_t len);'
d2395 7
a2401 7
     _Interface_:   'function acc_is_present(a)'
                    'type, dimension(:[,:]...) :: a'
                    'logical acc_is_present'
     _Interface_:   'function acc_is_present(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'logical acc_is_present'
d2404 1
a2404 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2410 1
a2410 1
5.30 'acc_memcpy_to_device' - Copy host memory to device memory.
d2419 2
a2420 2
     _Prototype_:   'acc_memcpy_to_device(d_void *dest, h_void *src, size_t
                    bytes);'
d2423 1
a2423 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2429 1
a2429 1
5.31 'acc_memcpy_from_device' - Copy device memory to host memory.
d2438 2
a2439 2
     _Prototype_:   'acc_memcpy_from_device(d_void *dest, h_void *src,
                    size_t bytes);'
d2442 1
a2442 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2448 1
a2448 1
5.32 'acc_get_current_cuda_device' - Get CUDA device handle.
d2452 1
a2452 1
     This function returns the CUDA device handle.  This handle is the
d2456 1
a2456 1
     _Prototype_:   'void *acc_get_current_cuda_device(void);'
d2459 1
a2459 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2465 1
a2465 1
5.33 'acc_get_current_cuda_context' - Get CUDA context handle.
d2469 1
a2469 1
     This function returns the CUDA context handle.  This handle is the
d2473 1
a2473 1
     _Prototype_:   'acc_get_current_cuda_context(void);'
d2476 1
a2476 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2482 1
a2482 1
5.34 'acc_get_cuda_stream' - Get CUDA stream handle.
d2486 1
a2486 1
     This function returns the CUDA stream handle.  This handle is the
d2490 1
a2490 1
     _Prototype_:   'acc_get_cuda_stream(void);'
d2493 1
a2493 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2499 1
a2499 1
5.35 'acc_set_cuda_stream' - Set CUDA stream handle.
d2507 1
a2507 1
     _Prototype_:   'acc_set_cuda_stream(int async void *stream);'
d2510 1
a2510 1
     OpenACC specification v2.0 (https://www.openacc.org), section
d2519 1
a2519 1
The variables 'ACC_DEVICE_TYPE' and 'ACC_DEVICE_NUM' are defined by
d2521 1
a2521 1
'GCC_ACC_NOTIFY' is used for diagnostic purposes.
d2532 1
a2532 1
6.1 'ACC_DEVICE_TYPE'
d2536 1
a2536 1
     OpenACC specification v2.0 (https://www.openacc.org), section 4.1.
d2541 1
a2541 1
6.2 'ACC_DEVICE_NUM'
d2545 1
a2545 1
     OpenACC specification v2.0 (https://www.openacc.org), section 4.2.
d2550 1
a2550 1
6.3 'GCC_ACC_NOTIFY'
d2562 1
a2562 1
This applies to the 'nvptx' plugin only.
d2571 4
a2574 4
'async' and 'wait' clauses.  When the 'async' clause is first used with
a directive, it creates a CUDA stream.  If an 'async-argument' is used
with the 'async' clause, then the stream is associated with the
specified 'async-argument'.
d2577 2
a2578 2
the 'async-argument' of an 'async' clause, both the 'wait' clause and
the 'wait' directive can be used.  When either the clause or directive
d2581 1
a2581 1
'async-argument', that is, stream, have completed.
d2584 2
a2585 2
of using the 'async' clause, is done without any intervention by the
caller.  This implies the association between the 'async-argument' and
d2588 5
a2592 5
function 'acc_set_cuda_stream'.  When the function 'acc_set_cuda_stream'
is called, the CUDA stream that was originally associated with the
'async' clause will be destroyed.  Caution should be taken when changing
the association as subsequent references to the 'async-argument' refer
to a different CUDA stream.
d2609 4
a2612 4
programs that use the Runtime library directly, or another library based
on the Runtime library, e.g., CUBLAS(1). This chapter describes the use
cases and what changes are required in order to use both the OpenACC
library and the CUBLAS and Runtime libraries within a program.
d2618 2
a2619 2
called prior to any of the functions in the OpenACC library.  More
specifically, the function 'cublasCreate()'.
d2624 5
a2628 5
returned to the caller.  The OpenACC library also requires
initialization and allocation of hardware resources.  Since the CUBLAS
library has already allocated the hardware resources for the device, all
that is left to do is to initialize the OpenACC library and acquire the
hardware resources on the host.
d2631 10
a2640 10
and allocate the host hardware resources, you need to acquire the device
number that was allocated during the call to 'cublasCreate()'.  The
invoking of the runtime library function 'cudaGetDevice()' accomplishes
this.  Once acquired, the device number is passed along with the device
type as parameters to the OpenACC library function
'acc_set_device_num()'.

   Once the call to 'acc_set_device_num()' has completed, the OpenACC
library uses the context that was created during the call to
'cublasCreate()'.  In other words, both libraries will be sharing the
d2661 1
a2661 2

                              Use Case 1
d2667 2
a2668 2
is called prior to any of the functions in the CUBLAS library.  More
specificially, the function 'acc_set_device_num()'.
d2670 1
a2670 1
   In the use case presented here, the function 'acc_set_device_num()'
d2672 3
a2674 3
resources on the host and the device.  In the call to the function, the
call parameters specify which device to use and what device type to use,
i.e., 'acc_device_nvidia'.  It should be noted that this is but one
d2676 1
a2676 1
hardware resources.  Other methods are available through the use of
d2679 1
a2679 1
   Once the call to 'acc_set_device_num()' has completed, other OpenACC
d2681 4
a2684 4
'acc_copyin()'.  In addition, calls can be made to functions in the
CUBLAS library.  In the use case a call to 'cublasCreate()' is made
subsequent to the calls to 'acc_copyin()'.  As seen in the previous use
case, a call to 'cublasCreate()' initializes the CUBLAS library and
d2686 1
a2686 1
since the device has already been allocated, 'cublasCreate()' will only
d2688 1
a2688 1
resources on the host.  The context that was created as part of the
d2730 1
a2730 2

                              Use Case 2
d2737 1
a2737 1
'ACC_DEVICE_TYPE' and 'ACC_DEVICE_NUM', respecively.  These two
d2739 2
a2740 2
'acc_set_device_num()'.  As seen in the second use case, the device type
and device number were specified using 'acc_set_device_num()'.  If
d2742 1
a2742 1
call to 'acc_set_device_num()' would not be required.
d2744 4
a2747 4
   The use of the environment variables is only relevant when an OpenACC
function is called prior to a call to 'cudaCreate()'.  If 'cudaCreate()'
is called prior to a call to an OpenACC function, then you must call
'acc_set_device_num()'(2)
d2753 2
a2754 2
Interoperability", in "CUDA Driver API", TRM-06703-001, Version 5.5, for
additional information on library interoperability.
d2756 3
a2758 3
   (2) More complete information about 'ACC_DEVICE_TYPE' and
'ACC_DEVICE_NUM' can be found in sections 4.1 and 4.2 of the OpenACC
(https://www.openacc.org) Application Programming Interface”, Version
d2767 2
a2768 2
The following sections present notes on the external ABI as presented by
libgomp.  Only maintainers should need them.
d2829 1
a2829 1
The target should implement the '__sync' builtins.
d2845 1
a2845 1
Expands to the '__sync_synchronize' builtin.
d2861 4
a2864 4
In _most_ cases we can map this directly to '__thread'.  Except that OMP
allows constructors for C++ objects.  We can either refuse to support
this (how often is it used?)  or we can implement something akin to
.ctors.
d2896 2
a2897 2
   It is not clear what to do with bare FOR or SECTION blocks.  The only
thing I can figure is that we do something like:
d2915 2
a2916 2
for the two variables, i.e.  not something you could write directly in
C. Presumably this only makes sense if the "outer" x and y are global
d2929 4
a2932 4
pointer to an array of the type of the variable, indexed by the thread's
TEAM_ID.  The thread stores its final value into the array, and after
the barrier, the master thread iterates over the array to collect the
values.
d2969 3
a2971 3
   The function needs to create the appropriate number of threads and/or
launch them from the dock.  It needs to create the team structure and
assign team ids.
d2976 1
a2976 1
'omp_in_parallel()' state.
d3028 2
a3029 2
also pull it into a local variable if we like, but since its supposed to
remain unchanged, we can also not if we like.
d3031 5
a3035 5
   If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be able
to get away with no work-sharing context at all, since we can simply
perform the arithmetic directly in each thread to divide up the
iterations.  Which would mean that we wouldn't need to call any of these
routines.
d3137 2
a3138 2
"openacc", or "openmp", or both to the keywords field in the bug report,
as appropriate.
d3148 1
a3148 1
     Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
d3176 3
a3178 3
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
d3197 10
a3206 9
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
d3243 2
a3244 2
     infringement under applicable copyright law, except executing it on
     a computer or modifying a private copy.  Propagation includes
d3258 2
a3259 2
     the extent that warranties are provided), that licensees may convey
     the work under this License, and how to view a copy of this
d3267 2
a3268 2
     for making modifications to it.  "Object code" means any non-source
     form of a work.
d3279 4
a3282 4
     Major Component, and (b) serves only to enable use of the work with
     that Major Component, or to implement a Standard Interface for
     which an implementation is available to the public in source code
     form.  A "Major Component", in this context, means a major
d3290 3
a3292 3
     work) run the object code and to modify the work, including scripts
     to control those activities.  However, it does not include the
     work's System Libraries, or general-purpose tools or generally
d3295 4
a3298 4
     Corresponding Source includes interface definition files associated
     with source files for the work, and the source code for shared
     libraries and dynamically linked subprograms that the work is
     specifically designed to require, such as by intimate data
d3315 4
a3318 4
     a covered work is covered by this License only if the output, given
     its content, constitutes a covered work.  This License acknowledges
     your rights of fair use or other equivalent, as provided by
     copyright law.
d3323 8
a3330 8
     sole purpose of having them make modifications exclusively for you,
     or provide you with facilities for running those works, provided
     that you comply with the terms of this License in conveying all
     material for which you do not control copyright.  Those thus making
     or running the covered works for you must do so exclusively on your
     behalf, under your direction and control, on terms that prohibit
     them from making any copies of your copyrighted material outside
     their relationship with you.
d3347 2
a3348 2
     with respect to the covered work, and you disclaim any intention to
     limit operation or modification of the work as a means of
d3418 2
a3419 2
          written offer, valid for at least three years and valid for as
          long as you offer spare parts or customer support for that
d3429 2
a3430 2
       c. Convey individual copies of the object code with a copy of the
          written offer to provide the Corresponding Source.  This
d3436 2
a3437 2
          place (gratis or for a charge), and offer equivalent access to
          the Corresponding Source in the same way through the same
d3441 4
a3444 4
          Corresponding Source may be on a different server (operated by
          you or a third party) that supports equivalent copying
          facilities, provided you maintain clear directions next to the
          object code saying where to find the Corresponding Source.
d3446 2
a3447 2
          remain obligated to ensure that it is available for as long as
          needed to satisfy these requirements.
d3454 1
d3462 2
a3463 2
     incorporation into a dwelling.  In determining whether a product is
     a consumer product, doubtful cases shall be resolved in favor of
d3494 5
a3498 5
     warranty, or updates for a work that has been modified or installed
     by the recipient, or for the User Product in which it has been
     modified or installed.  Access to a network may be denied when the
     modification itself materially and adversely affects the operation
     of the network or violates the rules and protocols for
d3528 2
a3529 2
     holders of that material) supplement the terms of this License with
     terms:
d3539 3
a3541 2
          or requiring that modified versions of such material be marked
          in reasonable ways as different from the original version; or
d3560 5
a3564 4
     contains a further restriction but permits relicensing or conveying
     under this License, you may add to a covered work material governed
     by the terms of that license document, provided that the further
     restriction does not survive such relicensing or conveying.
d3580 2
a3581 2
     under this License (including any patent licenses granted under the
     third paragraph of section 11).
d3585 2
a3586 2
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
d3598 4
a3601 4
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, you do not qualify to receive new licenses
     for the same material under section 10.
d3615 1
a3615 1
  10. Automatic Licensing of Downstream Recipients.
d3629 4
a3632 4
     could give under the previous paragraph, plus a right to possession
     of the Corresponding Source of the work from the predecessor in
     interest, if the predecessor has it or can get it with reasonable
     efforts.
d3636 6
a3641 6
     may not impose a license fee, royalty, or other charge for exercise
     of rights granted under this License, and you may not initiate
     litigation (including a cross-claim or counterclaim in a lawsuit)
     alleging that any patent claim is infringed by making, using,
     selling, offering for sale, or importing the Program or any portion
     of it.
d3643 1
a3643 1
  11. Patents.
d3663 2
a3664 2
     otherwise run, modify and propagate the contents of its contributor
     version.
d3669 3
a3671 3
     patent or covenant not to sue for patent infringement).  To "grant"
     such a patent license to a party means to make such an agreement or
     commitment not to enforce a patent against the party.
d3701 10
a3710 10
     party that is in the business of distributing software, under which
     you make payment to the third party based on the extent of your
     activity of conveying the work, and under which the third party
     grants, to any of the parties who would receive the covered work
     from you, a discriminatory patent license (a) in connection with
     copies of the covered work conveyed by you (or copies made from
     those copies), or (b) primarily for and in connection with specific
     products or compilations that contain the covered work, unless you
     entered into that arrangement, or that patent license was granted,
     prior to 28 March 2007.
d3716 1
a3716 1
  12. No Surrender of Others' Freedom.
d3718 11
a3728 10
     If conditions are imposed on you (whether by court order, agreement
     or otherwise) that contradict the conditions of this License, they
     do not excuse you from the conditions of this License.  If you
     cannot convey a covered work so as to satisfy simultaneously your
     obligations under this License and any other pertinent obligations,
     then as a consequence you may not convey it at all.  For example,
     if you agree to terms that obligate you to collect a royalty for
     further conveying from those to whom you convey the Program, the
     only way you could satisfy both those terms and this License would
     be to refrain entirely from conveying the Program.
d3730 1
a3730 1
  13. Use with the GNU Affero General Public License.
d3741 1
a3741 1
  14. Revised Versions of this License.
d3744 4
a3747 3
     versions of the GNU General Public License from time to time.  Such
     new versions will be similar in spirit to the present version, but
     may differ in detail to address new problems or concerns.
d3753 4
a3756 4
     that numbered version or of any later version published by the Free
     Software Foundation.  If the Program does not specify a version
     number of the GNU General Public License, you may choose any
     version ever published by the Free Software Foundation.
d3768 1
a3768 1
  15. Disclaimer of Warranty.
d3771 1
a3771 1
     APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
d3775 1
a3775 1
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
d3780 1
a3780 1
  16. Limitation of Liability.
d3784 2
a3785 2
     AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
     DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
d3793 1
a3793 1
  17. Interpretation of Sections 15 and 16.
d3802 1
d3833 1
a3833 1
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
d3842 1
a3842 1
     This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
d3844 1
a3844 1
     under certain conditions; type 'show c' for details.
d3846 1
a3846 1
   The hypothetical commands 'show w' and 'show c' should show the
d3854 1
a3854 1
the GNU GPL, see <http://www.gnu.org/licenses/>.
d3861 1
a3861 1
please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
d3872 1
a3872 1
     <http://fsf.org/>
d3897 2
a3898 2
     of subject matter or whether it is published as a printed book.  We
     recommend this License principally for works whose purpose is
d3904 2
a3905 2
     that contains a notice placed by the copyright holder saying it can
     be distributed under the terms of this License.  Such a notice
d3909 3
a3911 3
     of the public is a licensee, and is addressed as "you".  You accept
     the license if you copy, modify or distribute the work in a way
     requiring permission under copyright law.
d3929 6
a3934 6
     titles are designated, as being those of Invariant Sections, in the
     notice that says that the Document is released under this License.
     If a section does not fit the above definition of Secondary then it
     is not allowed to be designated as Invariant.  The Document may
     contain zero Invariant Sections.  If the Document does not identify
     any Invariant Sections then there are none.
d3945 10
a3954 10
     straightforwardly with generic text editors or (for images composed
     of pixels) generic paint programs or (for drawings) some widely
     available drawing editor, and that is suitable for input to text
     formatters or for automatic translation to a variety of formats
     suitable for input to text formatters.  A copy made in an otherwise
     Transparent file format whose markup, or absence of markup, has
     been arranged to thwart or discourage subsequent modification by
     readers is not Transparent.  An image format is not Transparent if
     used for any substantial amount of text.  A copy that is not
     "Transparent" is called "Opaque".
d3958 8
a3965 8
     SGML or XML using a publicly available DTD, and standard-conforming
     simple HTML, PostScript or PDF designed for human modification.
     Examples of transparent image formats include PNG, XCF and JPG.
     Opaque formats include proprietary formats that can be read and
     edited only by proprietary word processors, SGML or XML for which
     the DTD and/or processing tools are not generally available, and
     the machine-generated HTML, PostScript or PDF produced by some word
     processors for output purposes only.
d4003 2
a4004 2
     distribute a large enough number of copies you must also follow the
     conditions in section 3.
d4018 6
a4023 5
     front cover must present the full title with all words of the title
     equally prominent and visible.  You may add other material on the
     covers in addition.  Copying with changes limited to the covers, as
     long as they preserve the title of the Document and satisfy these
     conditions, can be treated as verbatim copying in other respects.
d4031 12
a4042 11
     numbering more than 100, you must either include a machine-readable
     Transparent copy along with each Opaque copy, or state in or with
     each Opaque copy a computer-network location from which the general
     network-using public has access to download using public-standard
     network protocols a complete Transparent copy of the Document, free
     of added material.  If you use the latter option, you must take
     reasonably prudent steps, when you begin distribution of Opaque
     copies in quantity, to ensure that this Transparent copy will
     remain thus accessible at the stated location until at least one
     year after the last time you distribute an Opaque copy (directly or
     through your agents or retailers) of that edition to the public.
d4045 3
a4047 3
     the Document well before redistributing any large number of copies,
     to give them a chance to provide you with an updated version of the
     Document.
d4053 5
a4057 5
     release the Modified Version under precisely this License, with the
     Modified Version filling the role of the Document, thus licensing
     distribution and modification of the Modified Version to whoever
     possesses a copy of it.  In addition, you must do these things in
     the Modified Version:
d4060 5
a4064 5
          distinct from that of the Document, and from those of previous
          versions (which should, if there were any, be listed in the
          History section of the Document).  You may use the same title
          as a previous version if the original publisher of that
          version gives permission.
d4094 6
a4099 6
          authors, and publisher of the Modified Version as given on the
          Title Page.  If there is no section Entitled "History" in the
          Document, create one stating the title, year, authors, and
          publisher of the Document as given on its Title Page, then add
          an item describing the Modified Version as stated in the
          previous sentence.
d4104 5
a4108 5
          previous versions it was based on.  These may be placed in the
          "History" section.  You may omit a network location for a work
          that was published at least four years before the Document
          itself, or if the original publisher of the version it refers
          to gives permission.
d4111 2
a4112 2
          Preserve the Title of the section, and preserve in the section
          all the substance and tone of each of the contributor
d4115 4
a4118 3
       L. Preserve all the Invariant Sections of the Document, unaltered
          in their text and in their titles.  Section numbers or the
          equivalent are not considered part of the section titles.
d4131 5
a4135 5
     material copied from the Document, you may at your option designate
     some or all of these sections as invariant.  To do this, add their
     titles to the list of Invariant Sections in the Modified Version's
     license notice.  These titles must be distinct from any other
     section titles.
d4144 9
a4152 9
     and a passage of up to 25 words as a Back-Cover Text, to the end of
     the list of Cover Texts in the Modified Version.  Only one passage
     of Front-Cover Text and one of Back-Cover Text may be added by (or
     through arrangements made by) any one entity.  If the Document
     already includes a cover text for the same cover, previously added
     by you or by arrangement made by the same entity you are acting on
     behalf of, you may not add another; but you may replace the old
     one, on explicit permission from the previous publisher that added
     the old one.
d4162 2
a4163 2
     modified versions, provided that you include in the combination all
     of the Invariant Sections of all of the original documents,
d4190 2
a4191 2
     rules of this License for verbatim copying of each of the documents
     in all other respects.
d4195 3
a4197 3
     a copy of this License into the extracted document, and follow this
     License in all other respects regarding verbatim copying of that
     document.
d4202 2
a4203 2
     separate and independent documents or works, in or on a volume of a
     storage or distribution medium, is called an "aggregate" if the
d4248 2
a4249 2
     provisionally, unless and until the copyright holder explicitly and
     finally terminates your license, and (b) permanently, if the
d4261 4
a4264 4
     the licenses of parties who have received copies or rights from you
     under this License.  If your rights have been terminated and not
     permanently reinstated, receipt of a copy of some or all of the
     same material does not give you any rights to use it.
d4266 1
a4266 1
  10. FUTURE REVISIONS OF THIS LICENSE
d4272 1
a4272 1
     <http://www.gnu.org/copyleft/>.
d4279 5
a4283 5
     published (not as a draft) by the Free Software Foundation.  If the
     Document does not specify a version number of this License, you may
     choose any version ever published (not as a draft) by the Free
     Software Foundation.  If the Document specifies that a proxy can
     decide which future versions of this License can be used, that
d4287 1
a4287 1
  11. RELICENSING
d4317 1
d4334 1
a4334 1
Texts, replace the "with...Texts."  line with this:
d4345 3
a4347 3
recommend releasing these examples in parallel under your choice of free
software license, such as the GNU General Public License, to permit
their use in free software.
d4377 2
a4378 2
can greatly alter what fraction of the sales price counts as profit.  If
the price you pay is $50, ten percent of the profit is probably less
d4388 2
a4389 2
ports such as adding a new CPU to the GNU Compiler Collection contribute
more; major new features or packages contribute the most.
d4408 19
d4428 1
a4428 18
* Environment Variable <1>:              OMP_DISPLAY_ENV.       (line 6)
* Environment Variable <2>:              OMP_DEFAULT_DEVICE.    (line 6)
* Environment Variable <3>:              OMP_DYNAMIC.           (line 6)
* Environment Variable <4>:              OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable <5>:              OMP_MAX_TASK_PRIORITY. (line 6)
* Environment Variable <6>:              OMP_NESTED.            (line 6)
* Environment Variable <7>:              OMP_NUM_THREADS.       (line 6)
* Environment Variable <8>:              OMP_PROC_BIND.         (line 6)
* Environment Variable <9>:              OMP_PLACES.            (line 6)
* Environment Variable <10>:             OMP_STACKSIZE.         (line 6)
* Environment Variable <11>:             OMP_SCHEDULE.          (line 6)
* Environment Variable <12>:             OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <13>:             OMP_WAIT_POLICY.       (line 6)
* Environment Variable <14>:             GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <15>:             GOMP_DEBUG.            (line 6)
* Environment Variable <16>:             GOMP_STACKSIZE.        (line 6)
* Environment Variable <17>:             GOMP_SPINCOUNT.        (line 6)
* Environment Variable <18>:             GOMP_RTEMS_THREAD_POOLS.
d4430 1
a4430 1
* FDL, GNU Free Documentation License:   GNU Free Documentation License.
d4432 4
a4436 6
* Implementation specific setting <1>:   OMP_NUM_THREADS.       (line 6)
* Implementation specific setting <2>:   OMP_SCHEDULE.          (line 6)
* Implementation specific setting <3>:   GOMP_STACKSIZE.        (line 6)
* Implementation specific setting <4>:   GOMP_SPINCOUNT.        (line 6)
* Implementation specific setting <5>:   GOMP_RTEMS_THREAD_POOLS.
                                                                (line 6)
d4442 131
a4572 131
Node: Top2083
Node: Enabling OpenMP4489
Node: Runtime Library Routines5276
Node: omp_get_active_level8339
Node: omp_get_ancestor_thread_num9039
Node: omp_get_cancellation9969
Node: omp_get_default_device10783
Node: omp_get_dynamic11459
Node: omp_get_level12334
Node: omp_get_max_active_levels12954
Node: omp_get_max_task_priority13659
Node: omp_get_max_threads14279
Node: omp_get_nested15036
Node: omp_get_num_devices15950
Node: omp_get_num_procs16471
Node: omp_get_num_teams17010
Node: omp_get_num_threads17526
Node: omp_get_proc_bind18615
Node: omp_get_schedule19536
Node: omp_get_team_num20490
Node: omp_get_team_size20989
Node: omp_get_thread_limit21949
Node: omp_get_thread_num22568
Node: omp_in_parallel23439
Node: omp_in_final24088
Node: omp_is_initial_device24762
Node: omp_set_default_device25455
Node: omp_set_dynamic26246
Node: omp_set_max_active_levels27132
Node: omp_set_nested27909
Node: omp_set_num_threads28801
Node: omp_set_schedule29669
Node: omp_init_lock30750
Node: omp_set_lock31403
Node: omp_test_lock32258
Node: omp_unset_lock33234
Node: omp_destroy_lock34165
Node: omp_init_nest_lock34842
Node: omp_set_nest_lock35577
Node: omp_test_nest_lock36492
Node: omp_unset_nest_lock37519
Node: omp_destroy_nest_lock38534
Node: omp_get_wtick39285
Node: omp_get_wtime39877
Node: Environment Variables40653
Node: OMP_CANCELLATION42208
Node: OMP_DISPLAY_ENV42741
Node: OMP_DEFAULT_DEVICE43444
Node: OMP_DYNAMIC44224
Node: OMP_MAX_ACTIVE_LEVELS44820
Node: OMP_MAX_TASK_PRIORITY45470
Node: OMP_NESTED46128
Node: OMP_NUM_THREADS46733
Node: OMP_PROC_BIND47421
Node: OMP_PLACES48613
Node: OMP_STACKSIZE50790
Node: OMP_SCHEDULE51614
Node: OMP_THREAD_LIMIT52312
Node: OMP_WAIT_POLICY52912
Node: GOMP_CPU_AFFINITY53604
Node: GOMP_DEBUG55334
Node: GOMP_STACKSIZE55841
Node: GOMP_SPINCOUNT56670
Node: GOMP_RTEMS_THREAD_POOLS57874
Node: Enabling OpenACC60052
Node: OpenACC Runtime Library Routines61045
Node: acc_get_num_devices64839
Node: acc_set_device_type65565
Node: acc_get_device_type66329
Node: acc_set_device_num67044
Node: acc_get_device_num67828
Node: acc_async_test68625
Node: acc_async_test_all69617
Node: acc_wait70517
Node: acc_wait_all71379
Node: acc_wait_all_async72138
Node: acc_wait_async72890
Node: acc_init73597
Node: acc_shutdown74243
Node: acc_on_device74911
Node: acc_malloc75915
Node: acc_free76414
Node: acc_copyin76841
Node: acc_present_or_copyin77951
Node: acc_create79577
Node: acc_present_or_create80732
Node: acc_copyout82366
Node: acc_delete83389
Node: acc_update_device84364
Node: acc_update_self85476
Node: acc_map_data86580
Node: acc_unmap_data87265
Node: acc_deviceptr87786
Node: acc_hostptr88356
Node: acc_is_present88920
Node: acc_memcpy_to_device90447
Node: acc_memcpy_from_device91110
Node: acc_get_current_cuda_device91794
Node: acc_get_current_cuda_context92391
Node: acc_get_cuda_stream92985
Node: acc_set_cuda_stream93541
Node: OpenACC Environment Variables94073
Node: ACC_DEVICE_TYPE94532
Node: ACC_DEVICE_NUM94768
Node: GCC_ACC_NOTIFY95025
Node: CUDA Streams Usage95248
Ref: CUDA Streams Usage-Footnote-197148
Node: OpenACC Library Interoperability97257
Ref: OpenACC Library Interoperability-Footnote-1103613
Ref: OpenACC Library Interoperability-Footnote-2103865
Node: The libgomp ABI104073
Node: Implementing MASTER construct104929
Node: Implementing CRITICAL construct105343
Node: Implementing ATOMIC construct106082
Node: Implementing FLUSH construct106563
Node: Implementing BARRIER construct106834
Node: Implementing THREADPRIVATE construct107103
Node: Implementing PRIVATE clause107756
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses108337
Node: Implementing REDUCTION clause109661
Node: Implementing PARALLEL construct110218
Node: Implementing FOR construct111475
Node: Implementing ORDERED construct113473
Node: Implementing SECTIONS construct113779
Node: Implementing SINGLE construct114545
Node: Implementing OpenACC's PARALLEL construct115257
Node: Reporting Bugs115515
Node: Copying115877
Node: GNU Free Documentation License153424
Node: Funding178547
Node: Library Index181073
@


1.1.1.15
log
@initial import of GCC 9.3.0.  changes include:

- live patching support
- shell completion help
- generally better diagnostic output (less verbose/more useful)
- diagnostics and optimisation choices can be emitted in json
- asan memory usage reduction
- many general, and specific to switch, inter-procedure,
  profile and link-time optimisations.  from the release notes:
  "Overall compile time of Firefox 66 and LibreOffice 6.2.3 on
  an 8-core machine was reduced by about 5% compared to GCC 8.3"
- OpenMP 5.0 support
- better spell-guesser
- partial experimental support for c2x and c++2a
- c++17 is no longer experimental
- arm AAPCS GCC 6-8 structure passing bug fixed, may cause
  incompatibility (restored compat with GCC 5 and earlier.)
- openrisc support
@
text
@d4 1
a4 1
Copyright (C) 2006-2019 Free Software Foundation, Inc.
d36 1
a36 1
   Copyright (C) 2006-2019 Free Software Foundation, Inc.
d64 1
a64 1
OpenMP (https://www.openmp.org) Application Programming Interface (API)
d78 1
a78 2
* OpenMP Runtime Library Routines: Runtime Library Routines.
                               The OpenMP runtime application programming
d80 2
a81 3
* OpenMP Environment Variables: Environment Variables.
                               Influencing OpenMP runtime behavior with
                               environment variables.
d118 1
a118 1
in the OpenMP Application Program Interface (https://www.openmp.org)
d124 2
a125 2
2 OpenMP Runtime Library Routines
*********************************
d205 1
a205 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.20.
d231 1
a231 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.18.
d255 1
a255 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.9.
d276 1
a276 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.30.
d303 1
a303 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.8.
d325 1
a325 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.17.
d347 1
a347 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.16.
d367 1
a367 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.29.
d390 1
a390 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.3.
d418 1
a418 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.11.
d436 1
a436 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.31.
d454 1
a454 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.5.
d472 1
a472 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.32.
d502 1
a502 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.2.
d529 1
a529 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.22.
d556 1
a556 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.13.
d574 1
a574 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.33.
d601 1
a601 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.19.
d622 1
a622 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.14.
d647 1
a647 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.4.
d667 1
a667 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.6.
d687 1
a687 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.21.
d707 1
a707 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.34.
d730 1
a730 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.29.
d755 1
a755 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.7.
d778 1
a778 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.15.
d803 1
a803 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.10.
d828 1
a828 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.1.
d857 1
a857 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.12.
d880 1
a880 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.1.
d906 1
a906 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.4.
d932 1
a932 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.6.
d959 1
a959 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.5.
d982 1
a982 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.3.
d1005 1
a1005 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.1.
d1030 1
a1030 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.4.
d1056 1
a1056 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.6.
d1084 1
a1084 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.5.
d1108 1
a1108 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.3.
d1130 1
a1130 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.4.2.
d1155 1
a1155 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.4.1.
d1160 2
a1161 2
3 OpenMP Environment Variables
******************************
d1204 1
a1204 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.11
d1220 1
a1220 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.12
d1239 1
a1239 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.13
d1257 1
a1257 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.3
d1274 1
a1274 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.9
d1293 1
a1293 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.14
d1311 1
a1311 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.6
d1330 1
a1330 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.2
d1357 1
a1357 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.4
d1399 1
a1399 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.5
d1418 1
a1418 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.7
d1437 1
a1437 1
     OpenMP specification v4.5 (https://www.openmp.org), Sections
d1455 1
a1455 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.10
d1474 1
a1474 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 4.8
d2477 1
a2477 1
     _Prototype_:   'void *acc_get_current_cuda_context(void);'
d2490 2
a2491 3
     This function returns the CUDA stream handle for the queue ASYNC.
     This handle is the same as used by the CUDA Runtime or Driver
     API's.
d2494 1
a2494 1
     _Prototype_:   'void *acc_get_cuda_stream(int async);'
d2508 1
a2508 6
     the queue ASYNC.

     This cannot be used to change the stream handle associated with
     'acc_async_sync'.

     The return value is not specified.
d2511 1
a2511 1
     _Prototype_:   'int acc_set_cuda_stream(int async, void *stream);'
d4438 130
a4567 130
Node: Enabling OpenMP4613
Node: Runtime Library Routines5401
Node: omp_get_active_level8478
Node: omp_get_ancestor_thread_num9178
Node: omp_get_cancellation10108
Node: omp_get_default_device10922
Node: omp_get_dynamic11598
Node: omp_get_level12473
Node: omp_get_max_active_levels13093
Node: omp_get_max_task_priority13798
Node: omp_get_max_threads14418
Node: omp_get_nested15175
Node: omp_get_num_devices16089
Node: omp_get_num_procs16610
Node: omp_get_num_teams17149
Node: omp_get_num_threads17665
Node: omp_get_proc_bind18754
Node: omp_get_schedule19675
Node: omp_get_team_num20629
Node: omp_get_team_size21128
Node: omp_get_thread_limit22088
Node: omp_get_thread_num22707
Node: omp_in_parallel23578
Node: omp_in_final24227
Node: omp_is_initial_device24901
Node: omp_set_default_device25594
Node: omp_set_dynamic26385
Node: omp_set_max_active_levels27271
Node: omp_set_nested28048
Node: omp_set_num_threads28940
Node: omp_set_schedule29808
Node: omp_init_lock30889
Node: omp_set_lock31542
Node: omp_test_lock32397
Node: omp_unset_lock33373
Node: omp_destroy_lock34304
Node: omp_init_nest_lock34981
Node: omp_set_nest_lock35716
Node: omp_test_nest_lock36631
Node: omp_unset_nest_lock37658
Node: omp_destroy_nest_lock38673
Node: omp_get_wtick39424
Node: omp_get_wtime40016
Node: Environment Variables40792
Node: OMP_CANCELLATION42361
Node: OMP_DISPLAY_ENV42894
Node: OMP_DEFAULT_DEVICE43597
Node: OMP_DYNAMIC44377
Node: OMP_MAX_ACTIVE_LEVELS44973
Node: OMP_MAX_TASK_PRIORITY45623
Node: OMP_NESTED46281
Node: OMP_NUM_THREADS46886
Node: OMP_PROC_BIND47574
Node: OMP_PLACES48766
Node: OMP_STACKSIZE50943
Node: OMP_SCHEDULE51767
Node: OMP_THREAD_LIMIT52465
Node: OMP_WAIT_POLICY53065
Node: GOMP_CPU_AFFINITY53757
Node: GOMP_DEBUG55487
Node: GOMP_STACKSIZE55994
Node: GOMP_SPINCOUNT56823
Node: GOMP_RTEMS_THREAD_POOLS58027
Node: Enabling OpenACC60205
Node: OpenACC Runtime Library Routines61198
Node: acc_get_num_devices64992
Node: acc_set_device_type65718
Node: acc_get_device_type66482
Node: acc_set_device_num67197
Node: acc_get_device_num67981
Node: acc_async_test68778
Node: acc_async_test_all69770
Node: acc_wait70670
Node: acc_wait_all71532
Node: acc_wait_all_async72291
Node: acc_wait_async73043
Node: acc_init73750
Node: acc_shutdown74396
Node: acc_on_device75064
Node: acc_malloc76068
Node: acc_free76567
Node: acc_copyin76994
Node: acc_present_or_copyin78104
Node: acc_create79730
Node: acc_present_or_create80885
Node: acc_copyout82519
Node: acc_delete83542
Node: acc_update_device84517
Node: acc_update_self85629
Node: acc_map_data86733
Node: acc_unmap_data87418
Node: acc_deviceptr87939
Node: acc_hostptr88509
Node: acc_is_present89073
Node: acc_memcpy_to_device90600
Node: acc_memcpy_from_device91263
Node: acc_get_current_cuda_device91947
Node: acc_get_current_cuda_context92544
Node: acc_get_cuda_stream93144
Node: acc_set_cuda_stream93735
Node: OpenACC Environment Variables94380
Node: ACC_DEVICE_TYPE94839
Node: ACC_DEVICE_NUM95075
Node: GCC_ACC_NOTIFY95332
Node: CUDA Streams Usage95555
Ref: CUDA Streams Usage-Footnote-197455
Node: OpenACC Library Interoperability97564
Ref: OpenACC Library Interoperability-Footnote-1103920
Ref: OpenACC Library Interoperability-Footnote-2104172
Node: The libgomp ABI104380
Node: Implementing MASTER construct105236
Node: Implementing CRITICAL construct105650
Node: Implementing ATOMIC construct106389
Node: Implementing FLUSH construct106870
Node: Implementing BARRIER construct107141
Node: Implementing THREADPRIVATE construct107410
Node: Implementing PRIVATE clause108063
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses108644
Node: Implementing REDUCTION clause109968
Node: Implementing PARALLEL construct110525
Node: Implementing FOR construct111782
Node: Implementing ORDERED construct113780
Node: Implementing SECTIONS construct114086
Node: Implementing SINGLE construct114852
Node: Implementing OpenACC's PARALLEL construct115564
Node: Reporting Bugs115822
Node: Copying116184
Node: GNU Free Documentation License153731
Node: Funding178854
Node: Library Index181380
@


1.1.1.16
log
@initial import of GCC 10.3.0.  main changes include:

caveats:
- ABI issue between c++14 and c++17 fixed
- profile mode is removed from libstdc++
- -fno-common is now the default

new features:
- new flags -fallocation-dce, -fprofile-partial-training,
  -fprofile-reproducible, -fprofile-prefix-path, and -fanalyzer
- many new compile and link time optimisations
- enhanced drive optimisations
- openacc 2.6 support
- openmp 5.0 features
- new warnings: -Wstring-compare and -Wzero-length-bounds
- extended warnings: -Warray-bounds, -Wformat-overflow,
  -Wrestrict, -Wreturn-local-addr, -Wstringop-overflow,
  -Warith-conversion, -Wmismatched-tags, and -Wredundant-tags
- some likely C2X features implemented
- more C++20 implemented
- many new arm & intel CPUs known

hundreds of reported bugs are fixed.  full list of changes
can be found at:

   https://gcc.gnu.org/gcc-10/changes.html
@
text
@d4 1
a4 1
Copyright (C) 2006-2020 Free Software Foundation, Inc.
d36 1
a36 1
   Copyright (C) 2006-2020 Free Software Foundation, Inc.
a93 1
* OpenACC Profiling Interface::
d1546 1
a1546 1
     (https://gcc.gnu.org/ml/gcc-patches/2006-06/msg00493.html), GCC
d1548 1
a1548 1
     (https://gcc.gnu.org/ml/gcc-patches/2006-06/msg00496.html)
d1621 1
a1621 1
OpenACC directive '#pragma acc' in C/C++ and '!$acc' directives in free
a1627 2
   See <https://gcc.gnu.org/wiki/OpenACC> for more information.

d1630 5
a1634 1
Interface manual, version 2.6.
d1643 1
a1643 1
OpenACC specifications in version 2.6.  They have C linkage, and do not
a1655 1
* acc_get_property::            Get device property.
d1658 1
a1658 1
* acc_async_test_all::          Tests for completion of all asynchronous
d1662 1
a1662 1
* acc_wait_all::                Waits for completion of all asynchronous
d1694 1
a1694 1
* acc_is_present::              Indicate whether host variable / array is
a1697 2
* acc_attach::                  Let device pointer point to device-pointer target.
* acc_detach::                  Let device pointer point to host-pointer target.
a1705 7
API routines for the OpenACC Profiling Interface.

* acc_prof_register::           Register callbacks.
* acc_prof_unregister::         Unregister callbacks.
* acc_prof_lookup::             Obtain inquiry functions.
* acc_register_library::        Library registration.

d1724 1
a1724 1
     OpenACC specification v2.6 (https://www.openacc.org), section
d1734 1
a1734 1
     This function indicates to the runtime library which device type,
d1746 1
a1746 1
     OpenACC specification v2.6 (https://www.openacc.org), section
a1758 6
     This function returns 'acc_device_none' if 'acc_get_device_type' is
     called from 'acc_ev_device_init_start', 'acc_ev_device_init_end'
     callbacks of the OpenACC Profiling Interface (*note OpenACC
     Profiling Interface::), that is, if the device is currently being
     initialized.

d1767 1
a1767 1
     OpenACC specification v2.6 (https://www.openacc.org), section
d1778 1
a1778 1
     specified by DEVICENUM, associated with the specified device type
d1782 1
a1782 2
     _Prototype_:   'acc_set_device_num(int devicenum, acc_device_t
                    devicetype);'
d1790 1
a1790 1
     OpenACC specification v2.6 (https://www.openacc.org), section
d1794 1
a1794 1
File: libgomp.info,  Node: acc_get_device_num,  Next: acc_get_property,  Prev: acc_set_device_num,  Up: OpenACC Runtime Library Routines
d1813 1
a1813 1
     OpenACC specification v2.6 (https://www.openacc.org), section
d1817 1
a1817 48
File: libgomp.info,  Node: acc_get_property,  Next: acc_async_test,  Prev: acc_get_device_num,  Up: OpenACC Runtime Library Routines

5.6 'acc_get_property' - Get device property.
=============================================

_Description_
     These routines return the value of the specified PROPERTY for the
     device being queried according to DEVICENUM and DEVICETYPE.
     Integer-valued and string-valued properties are returned by
     'acc_get_property' and 'acc_get_property_string' respectively.  The
     Fortran 'acc_get_property_string' subroutine returns the string
     retrieved in its fourth argument while the remaining entry points
     are functions, which pass the return value as their result.

     Note for Fortran, only: the OpenACC technical committee corrected
     and, hence, modified the interface introduced in OpenACC 2.6.  The
     kind-value parameter 'acc_device_property' has been renamed to
     'acc_device_property_kind' for consistency and the return type of
     the 'acc_get_property' function is now a 'c_size_t' integer instead
     of a 'acc_device_property' integer.  The parameter
     'acc_device_property' will continue to be provided, but might be
     removed in a future version of GCC.

_C/C++_:
     _Prototype_:   'size_t acc_get_property(int devicenum, acc_device_t
                    devicetype, acc_device_property_t property);'
     _Prototype_:   'const char *acc_get_property_string(int devicenum,
                    acc_device_t devicetype, acc_device_property_t
                    property);'

_Fortran_:
     _Interface_:   'function acc_get_property(devicenum, devicetype,
                    property)'
     _Interface_:   'subroutine acc_get_property_string(devicenum,
                    devicetype, property, string)'
                    'use ISO_C_Binding, only: c_size_t'
                    'integer devicenum'
                    'integer(kind=acc_device_kind) devicetype'
                    'integer(kind=acc_device_property_kind) property'
                    'integer(kind=c_size_t) acc_get_property'
                    'character(*) string'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.6.


File: libgomp.info,  Node: acc_async_test,  Next: acc_async_test_all,  Prev: acc_get_property,  Up: OpenACC Runtime Library Routines
d1819 1
a1819 1
5.7 'acc_async_test' - Test for completion of a specific asynchronous operation.
d1823 1
a1823 1
     This function tests for completion of the asynchronous operation
d1826 1
a1826 1
     Fortran will return a 'true'.  If the asynchronous operation has
d1838 2
a1839 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.9.
d1844 1
a1844 1
5.8 'acc_async_test_all' - Tests for completion of all asynchronous operations.
d1848 1
a1848 1
     This function tests for completion of all asynchronous operations.
d1862 2
a1863 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.10.
d1868 1
a1868 1
5.9 'acc_wait' - Wait for completion of a specific asynchronous operation.
d1890 2
a1891 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.11.
d1896 2
a1897 2
5.10 'acc_wait_all' - Waits for completion of all asynchronous operations.
==========================================================================
d1916 2
a1917 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.13.
d1922 1
a1922 1
5.11 'acc_wait_all_async' - Wait for completion of all asynchronous operations.
d1938 2
a1939 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.14.
d1944 1
a1944 1
5.12 'acc_wait_async' - Wait for completion of asynchronous operations.
d1959 2
a1960 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.12.
d1965 1
a1965 1
5.13 'acc_init' - Initialize runtime for a specific device type.
d1980 2
a1981 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.7.
d1986 1
a1986 1
5.14 'acc_shutdown' - Shuts down the runtime for a specific device type.
d2001 2
a2002 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.8.
d2007 1
a2007 1
5.15 'acc_on_device' - Whether executing on a particular device
d2013 1
a2013 1
     value is returned to indicate the device is executing on the
d2027 2
a2028 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.17.
d2033 1
a2033 1
5.16 'acc_malloc' - Allocate device memory.
d2044 2
a2045 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.18.
d2050 1
a2050 1
5.17 'acc_free' - Free device memory.
d2060 2
a2061 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.19.
d2066 1
a2066 1
5.18 'acc_copyin' - Allocate device memory and copy host memory to it.
a2079 2
     _Prototype_:   'void *acc_copyin_async(h_void *a, size_t len, int
                    async);'
a2086 7
     _Interface_:   'subroutine acc_copyin_async(a, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer(acc_handle_kind) :: async'
     _Interface_:   'subroutine acc_copyin_async(a, len, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'integer(acc_handle_kind) :: async'
d2089 2
a2090 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.20.
d2095 1
a2095 1
5.19 'acc_present_or_copyin' - If the data is not present on the device, allocate device memory and copy from host memory.
d2099 1
a2099 1
     This function tests if the host data specified by A and of length
a2107 4
     Note that 'acc_present_or_copyin' and 'acc_pcopyin' exist for
     backward compatibility with OpenACC 2.0; use *note acc_copyin::
     instead.

d2125 2
a2126 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.20.
d2131 1
a2131 1
5.20 'acc_create' - Allocate device memory and map it to host memory.
a2145 2
     _Prototype_:   'void *acc_create_async(h_void *a, size_t len, int
                    async);'
a2152 7
     _Interface_:   'subroutine acc_create_async(a, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer(acc_handle_kind) :: async'
     _Interface_:   'subroutine acc_create_async(a, len, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'integer(acc_handle_kind) :: async'
d2155 2
a2156 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.21.
d2161 1
a2161 1
5.21 'acc_present_or_create' - If the data is not present on the device, allocate device memory and map it to host memory.
d2165 1
a2165 1
     This function tests if the host data specified by A and of length
a2173 4
     Note that 'acc_present_or_create' and 'acc_pcreate' exist for
     backward compatibility with OpenACC 2.0; use *note acc_create::
     instead.

d2191 2
a2192 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.21.
d2197 1
a2197 1
5.22 'acc_copyout' - Copy device memory to host memory.
a2209 4
     _Prototype_:   'acc_copyout_async(h_void *a, size_t len, int async);'
     _Prototype_:   'acc_copyout_finalize(h_void *a, size_t len);'
     _Prototype_:   'acc_copyout_finalize_async(h_void *a, size_t len, int
                    async);'
a2216 19
     _Interface_:   'subroutine acc_copyout_async(a, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer(acc_handle_kind) :: async'
     _Interface_:   'subroutine acc_copyout_async(a, len, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'integer(acc_handle_kind) :: async'
     _Interface_:   'subroutine acc_copyout_finalize(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_copyout_finalize(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_copyout_finalize_async(a, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer(acc_handle_kind) :: async'
     _Interface_:   'subroutine acc_copyout_finalize_async(a, len, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'integer(acc_handle_kind) :: async'
d2219 2
a2220 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.22.
d2225 1
a2225 1
5.23 'acc_delete' - Free device memory.
a2237 4
     _Prototype_:   'acc_delete_async(h_void *a, size_t len, int async);'
     _Prototype_:   'acc_delete_finalize(h_void *a, size_t len);'
     _Prototype_:   'acc_delete_finalize_async(h_void *a, size_t len, int
                    async);'
a2244 19
     _Interface_:   'subroutine acc_delete_async(a, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer(acc_handle_kind) :: async'
     _Interface_:   'subroutine acc_delete_async(a, len, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'integer(acc_handle_kind) :: async'
     _Interface_:   'subroutine acc_delete_finalize(a)'
                    'type, dimension(:[,:]...) :: a'
     _Interface_:   'subroutine acc_delete_finalize(a, len)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
     _Interface_:   'subroutine acc_delete_async_finalize(a, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer(acc_handle_kind) :: async'
     _Interface_:   'subroutine acc_delete_async_finalize(a, len, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'integer(acc_handle_kind) :: async'
d2247 2
a2248 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.23.
d2253 1
a2253 1
5.24 'acc_update_device' - Update device memory from mapped host memory.
a2266 1
     _Prototype_:   'acc_update_device(h_void *a, size_t len, async);'
a2273 7
     _Interface_:   'subroutine acc_update_device_async(a, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer(acc_handle_kind) :: async'
     _Interface_:   'subroutine acc_update_device_async(a, len, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'integer(acc_handle_kind) :: async'
d2276 2
a2277 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.24.
d2282 1
a2282 1
5.25 'acc_update_self' - Update host memory from mapped device memory.
a2295 2
     _Prototype_:   'acc_update_self_async(h_void *a, size_t len, int
                    async);'
a2302 7
     _Interface_:   'subroutine acc_update_self_async(a, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer(acc_handle_kind) :: async'
     _Interface_:   'subroutine acc_update_self_async(a, len, async)'
                    'type, dimension(:[,:]...) :: a'
                    'integer len'
                    'integer(acc_handle_kind) :: async'
d2305 2
a2306 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.25.
d2311 1
a2311 1
5.26 'acc_map_data' - Map previously allocated device memory to host memory.
d2323 2
a2324 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.26.
d2329 1
a2329 1
5.27 'acc_unmap_data' - Unmap device memory from host memory.
d2340 2
a2341 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.27.
d2346 1
a2346 1
5.28 'acc_deviceptr' - Get device pointer associated with specific host address.
d2357 2
a2358 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.28.
d2363 1
a2363 1
5.29 'acc_hostptr' - Get host pointer associated with specific device address.
d2374 2
a2375 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.29.
d2380 1
a2380 1
5.30 'acc_is_present' - Indicate whether host variable / array is present on device.
d2410 2
a2411 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.30.
d2416 1
a2416 1
5.31 'acc_memcpy_to_device' - Copy host memory to device memory.
d2429 2
a2430 2
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.31.
d2433 1
a2433 1
File: libgomp.info,  Node: acc_memcpy_from_device,  Next: acc_attach,  Prev: acc_memcpy_to_device,  Up: OpenACC Runtime Library Routines
d2435 1
a2435 1
5.32 'acc_memcpy_from_device' - Copy device memory to host memory.
d2448 2
a2449 40
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.32.


File: libgomp.info,  Node: acc_attach,  Next: acc_detach,  Prev: acc_memcpy_from_device,  Up: OpenACC Runtime Library Routines

5.33 'acc_attach' - Let device pointer point to device-pointer target.
======================================================================

_Description_
     This function updates a pointer on the device from pointing to a
     host-pointer address to pointing to the corresponding device data.

_C/C++_:
     _Prototype_:   'acc_attach(h_void **ptr);'
     _Prototype_:   'acc_attach_async(h_void **ptr, int async);'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.34.


File: libgomp.info,  Node: acc_detach,  Next: acc_get_current_cuda_device,  Prev: acc_attach,  Up: OpenACC Runtime Library Routines

5.34 'acc_detach' - Let device pointer point to host-pointer target.
====================================================================

_Description_
     This function updates a pointer on the device from pointing to a
     device-pointer address to pointing to the corresponding host data.

_C/C++_:
     _Prototype_:   'acc_detach(h_void **ptr);'
     _Prototype_:   'acc_detach_async(h_void **ptr, int async);'
     _Prototype_:   'acc_detach_finalize(h_void **ptr);'
     _Prototype_:   'acc_detach_finalize_async(h_void **ptr, int async);'

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section
     3.2.35.
d2452 1
a2452 1
File: libgomp.info,  Node: acc_get_current_cuda_device,  Next: acc_get_current_cuda_context,  Prev: acc_detach,  Up: OpenACC Runtime Library Routines
d2454 1
a2454 1
5.35 'acc_get_current_cuda_device' - Get CUDA device handle.
d2465 1
a2465 1
     OpenACC specification v2.6 (https://www.openacc.org), section
d2471 1
a2471 1
5.36 'acc_get_current_cuda_context' - Get CUDA context handle.
d2482 1
a2482 1
     OpenACC specification v2.6 (https://www.openacc.org), section
d2488 1
a2488 1
5.37 'acc_get_cuda_stream' - Get CUDA stream handle.
d2500 1
a2500 1
     OpenACC specification v2.6 (https://www.openacc.org), section
d2504 1
a2504 1
File: libgomp.info,  Node: acc_set_cuda_stream,  Next: acc_prof_register,  Prev: acc_get_cuda_stream,  Up: OpenACC Runtime Library Routines
d2506 1
a2506 1
5.38 'acc_set_cuda_stream' - Set CUDA stream handle.
d2522 1
a2522 1
     OpenACC specification v2.6 (https://www.openacc.org), section
a2525 75
File: libgomp.info,  Node: acc_prof_register,  Next: acc_prof_unregister,  Prev: acc_set_cuda_stream,  Up: OpenACC Runtime Library Routines

5.39 'acc_prof_register' - Register callbacks.
==============================================

_Description_:
     This function registers callbacks.

_C/C++_:
     _Prototype_:   'void acc_prof_register (acc_event_t, acc_prof_callback,
                    acc_register_t);'

_See also_:
     *note OpenACC Profiling Interface::

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section 5.3.


File: libgomp.info,  Node: acc_prof_unregister,  Next: acc_prof_lookup,  Prev: acc_prof_register,  Up: OpenACC Runtime Library Routines

5.40 'acc_prof_unregister' - Unregister callbacks.
==================================================

_Description_:
     This function unregisters callbacks.

_C/C++_:
     _Prototype_:   'void acc_prof_unregister (acc_event_t,
                    acc_prof_callback, acc_register_t);'

_See also_:
     *note OpenACC Profiling Interface::

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section 5.3.


File: libgomp.info,  Node: acc_prof_lookup,  Next: acc_register_library,  Prev: acc_prof_unregister,  Up: OpenACC Runtime Library Routines

5.41 'acc_prof_lookup' - Obtain inquiry functions.
==================================================

_Description_:
     Function to obtain inquiry functions.

_C/C++_:
     _Prototype_:   'acc_query_fn acc_prof_lookup (const char *);'

_See also_:
     *note OpenACC Profiling Interface::

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section 5.3.


File: libgomp.info,  Node: acc_register_library,  Prev: acc_prof_lookup,  Up: OpenACC Runtime Library Routines

5.42 'acc_register_library' - Library registration.
===================================================

_Description_:
     Function for library registration.

_C/C++_:
     _Prototype_:   'void acc_register_library (acc_prof_reg, acc_prof_reg,
                    acc_prof_lookup_func);'

_See also_:
     *note OpenACC Profiling Interface::, *note ACC_PROFLIB::

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section 5.3.


d2533 1
a2533 3
'ACC_PROFLIB' is defined by section 4 of the OpenACC specification in
version 2.6.  The variable 'GCC_ACC_NOTIFY' is used for diagnostic
purposes.
a2538 1
* ACC_PROFLIB::
d2548 1
a2548 1
     OpenACC specification v2.6 (https://www.openacc.org), section 4.1.
d2551 1
a2551 1
File: libgomp.info,  Node: ACC_DEVICE_NUM,  Next: ACC_PROFLIB,  Prev: ACC_DEVICE_TYPE,  Up: OpenACC Environment Variables
d2557 1
a2557 13
     OpenACC specification v2.6 (https://www.openacc.org), section 4.2.


File: libgomp.info,  Node: ACC_PROFLIB,  Next: GCC_ACC_NOTIFY,  Prev: ACC_DEVICE_NUM,  Up: OpenACC Environment Variables

6.3 'ACC_PROFLIB'
=================

_See also_:
     *note acc_register_library::, *note OpenACC Profiling Interface::

_Reference_:
     OpenACC specification v2.6 (https://www.openacc.org), section 4.3.
d2560 1
a2560 1
File: libgomp.info,  Node: GCC_ACC_NOTIFY,  Prev: ACC_PROFLIB,  Up: OpenACC Environment Variables
d2562 1
a2562 1
6.4 'GCC_ACC_NOTIFY'
d2581 1
a2581 1
   The primary means by that the asynchronous functionality is accessed
d2612 1
a2612 1
File: libgomp.info,  Node: OpenACC Library Interoperability,  Next: OpenACC Profiling Interface,  Prev: CUDA Streams Usage,  Up: Top
d2751 2
a2752 2
'ACC_DEVICE_TYPE' and 'ACC_DEVICE_NUM', respectively.  These two
environment variables can be used as an alternative to calling
d2773 1
a2773 1
2.6.
d2776 1
a2776 1
File: libgomp.info,  Node: OpenACC Profiling Interface,  Next: The libgomp ABI,  Prev: OpenACC Library Interoperability,  Up: Top
d2778 2
a2779 254
9 OpenACC Profiling Interface
*****************************

9.1 Implementation Status and Implementation-Defined Behavior
=============================================================

We're implementing the OpenACC Profiling Interface as defined by the
OpenACC 2.6 specification.  We're clarifying some aspects here as
_implementation-defined behavior_, while they're still under discussion
within the OpenACC Technical Committee.

   This implementation is tuned to keep the performance impact as low as
possible for the (very common) case that the Profiling Interface is not
enabled.  This is relevant, as the Profiling Interface affects all the
_hot_ code paths (in the target code, not in the offloaded code).  Users
of the OpenACC Profiling Interface can be expected to understand that
performance will be impacted to some degree once the Profiling Interface
has gotten enabled: for example, because of the _runtime_ (libgomp)
calling into a third-party _library_ for every event that has been
registered.

   We're not yet accounting for the fact that 'OpenACC events may occur
during event processing'.  We just handle one case specially, as
required by CUDA 9.0 'nvprof', that 'acc_get_device_type' (*note
acc_get_device_type::)) may be called from 'acc_ev_device_init_start',
'acc_ev_device_init_end' callbacks.

   We're not yet implementing initialization via a
'acc_register_library' function that is either statically linked in, or
dynamically via 'LD_PRELOAD'.  Initialization via 'acc_register_library'
functions dynamically loaded via the 'ACC_PROFLIB' environment variable
does work, as does directly calling 'acc_prof_register',
'acc_prof_unregister', 'acc_prof_lookup'.

   As currently there are no inquiry functions defined, calls to
'acc_prof_lookup' will always return 'NULL'.

   There aren't separate _start_, _stop_ events defined for the event
types 'acc_ev_create', 'acc_ev_delete', 'acc_ev_alloc', 'acc_ev_free'.
It's not clear if these should be triggered before or after the actual
device-specific call is made.  We trigger them after.

   Remarks about data provided to callbacks:

'acc_prof_info.event_type'
     It's not clear if for _nested_ event callbacks (for example,
     'acc_ev_enqueue_launch_start' as part of a parent compute
     construct), this should be set for the nested event
     ('acc_ev_enqueue_launch_start'), or if the value of the parent
     construct should remain ('acc_ev_compute_construct_start').  In
     this implementation, the value will generally correspond to the
     innermost nested event type.

'acc_prof_info.device_type'

        * For 'acc_ev_compute_construct_start', and in presence of an
          'if' clause with _false_ argument, this will still refer to
          the offloading device type.  It's not clear if that's the
          expected behavior.

        * Complementary to the item before, for
          'acc_ev_compute_construct_end', this is set to
          'acc_device_host' in presence of an 'if' clause with _false_
          argument.  It's not clear if that's the expected behavior.

'acc_prof_info.thread_id'
     Always '-1'; not yet implemented.

'acc_prof_info.async'

        * Not yet implemented correctly for
          'acc_ev_compute_construct_start'.

        * In a compute construct, for host-fallback
          execution/'acc_device_host' it will always be
          'acc_async_sync'.  It's not clear if that's the expected
          behavior.

        * For 'acc_ev_device_init_start' and 'acc_ev_device_init_end',
          it will always be 'acc_async_sync'.  It's not clear if that's
          the expected behavior.

'acc_prof_info.async_queue'
     There is no 'limited number of asynchronous queues' in libgomp.
     This will always have the same value as 'acc_prof_info.async'.

'acc_prof_info.src_file'
     Always 'NULL'; not yet implemented.

'acc_prof_info.func_name'
     Always 'NULL'; not yet implemented.

'acc_prof_info.line_no'
     Always '-1'; not yet implemented.

'acc_prof_info.end_line_no'
     Always '-1'; not yet implemented.

'acc_prof_info.func_line_no'
     Always '-1'; not yet implemented.

'acc_prof_info.func_end_line_no'
     Always '-1'; not yet implemented.

'acc_event_info.event_type', 'acc_event_info.*.event_type'
     Relating to 'acc_prof_info.event_type' discussed above, in this
     implementation, this will always be the same value as
     'acc_prof_info.event_type'.

'acc_event_info.*.parent_construct'

        * Will be 'acc_construct_parallel' for all OpenACC compute
          constructs as well as many OpenACC Runtime API calls; should
          be the one matching the actual construct, or
          'acc_construct_runtime_api', respectively.

        * Will be 'acc_construct_enter_data' or
          'acc_construct_exit_data' when processing variable mappings
          specified in OpenACC _declare_ directives; should be
          'acc_construct_declare'.

        * For implicit 'acc_ev_device_init_start',
          'acc_ev_device_init_end', and explicit as well as implicit
          'acc_ev_alloc', 'acc_ev_free', 'acc_ev_enqueue_upload_start',
          'acc_ev_enqueue_upload_end', 'acc_ev_enqueue_download_start',
          and 'acc_ev_enqueue_download_end', will be
          'acc_construct_parallel'; should reflect the real parent
          construct.

'acc_event_info.*.implicit'
     For 'acc_ev_alloc', 'acc_ev_free', 'acc_ev_enqueue_upload_start',
     'acc_ev_enqueue_upload_end', 'acc_ev_enqueue_download_start', and
     'acc_ev_enqueue_download_end', this currently will be '1' also for
     explicit usage.

'acc_event_info.data_event.var_name'
     Always 'NULL'; not yet implemented.

'acc_event_info.data_event.host_ptr'
     For 'acc_ev_alloc', and 'acc_ev_free', this is always 'NULL'.

'typedef union acc_api_info'
     ... as printed in '5.2.3. Third Argument: API-Specific
     Information'.  This should obviously be 'typedef _struct_
     acc_api_info'.

'acc_api_info.device_api'
     Possibly not yet implemented correctly for
     'acc_ev_compute_construct_start', 'acc_ev_device_init_start',
     'acc_ev_device_init_end': will always be 'acc_device_api_none' for
     these event types.  For 'acc_ev_enter_data_start', it will be
     'acc_device_api_none' in some cases.

'acc_api_info.device_type'
     Always the same as 'acc_prof_info.device_type'.

'acc_api_info.vendor'
     Always '-1'; not yet implemented.

'acc_api_info.device_handle'
     Always 'NULL'; not yet implemented.

'acc_api_info.context_handle'
     Always 'NULL'; not yet implemented.

'acc_api_info.async_handle'
     Always 'NULL'; not yet implemented.

   Remarks about certain event types:

'acc_ev_device_init_start', 'acc_ev_device_init_end'

        * Whan a compute construct triggers implicit
          'acc_ev_device_init_start' and 'acc_ev_device_init_end'
          events, they currently aren't _nested within_ the
          corresponding 'acc_ev_compute_construct_start' and
          'acc_ev_compute_construct_end', but they're currently observed
          _before_ 'acc_ev_compute_construct_start'.  It's not clear
          what to do: the standard asks us provide a lot of details to
          the 'acc_ev_compute_construct_start' callback, without
          (implicitly) initializing a device before?

        * Callbacks for these event types will not be invoked for calls
          to the 'acc_set_device_type' and 'acc_set_device_num'
          functions.  It's not clear if they should be.

'acc_ev_enter_data_start', 'acc_ev_enter_data_end', 'acc_ev_exit_data_start', 'acc_ev_exit_data_end'

        * Callbacks for these event types will also be invoked for
          OpenACC _host_data_ constructs.  It's not clear if they should
          be.

        * Callbacks for these event types will also be invoked when
          processing variable mappings specified in OpenACC _declare_
          directives.  It's not clear if they should be.

   Callbacks for the following event types will be invoked, but dispatch
and information provided therein has not yet been thoroughly reviewed:

   * 'acc_ev_alloc'
   * 'acc_ev_free'
   * 'acc_ev_update_start', 'acc_ev_update_end'
   * 'acc_ev_enqueue_upload_start', 'acc_ev_enqueue_upload_end'
   * 'acc_ev_enqueue_download_start', 'acc_ev_enqueue_download_end'

   During device initialization, and finalization, respectively,
callbacks for the following event types will not yet be invoked:

   * 'acc_ev_alloc'
   * 'acc_ev_free'

   Callbacks for the following event types have not yet been
implemented, so currently won't be invoked:

   * 'acc_ev_device_shutdown_start', 'acc_ev_device_shutdown_end'
   * 'acc_ev_runtime_shutdown'
   * 'acc_ev_create', 'acc_ev_delete'
   * 'acc_ev_wait_start', 'acc_ev_wait_end'

   For the following runtime library functions, not all expected
callbacks will be invoked (mostly concerning implicit device
initialization):

   * 'acc_get_num_devices'
   * 'acc_set_device_type'
   * 'acc_get_device_type'
   * 'acc_set_device_num'
   * 'acc_get_device_num'
   * 'acc_init'
   * 'acc_shutdown'

   Aside from implicit device initialization, for the following runtime
library functions, no callbacks will be invoked for shared-memory
offloading devices (it's not clear if they should be):

   * 'acc_malloc'
   * 'acc_free'
   * 'acc_copyin', 'acc_present_or_copyin', 'acc_copyin_async'
   * 'acc_create', 'acc_present_or_create', 'acc_create_async'
   * 'acc_copyout', 'acc_copyout_async', 'acc_copyout_finalize',
     'acc_copyout_finalize_async'
   * 'acc_delete', 'acc_delete_async', 'acc_delete_finalize',
     'acc_delete_finalize_async'
   * 'acc_update_device', 'acc_update_device_async'
   * 'acc_update_self', 'acc_update_self_async'
   * 'acc_map_data', 'acc_unmap_data'
   * 'acc_memcpy_to_device', 'acc_memcpy_to_device_async'
   * 'acc_memcpy_from_device', 'acc_memcpy_from_device_async'


File: libgomp.info,  Node: The libgomp ABI,  Next: Reporting Bugs,  Prev: OpenACC Profiling Interface,  Up: Top

10 The libgomp ABI
******************
d2805 2
a2806 2
10.1 Implementing MASTER construct
==================================
d2818 2
a2819 2
10.2 Implementing CRITICAL construct
====================================
d2840 2
a2841 2
10.3 Implementing ATOMIC construct
==================================
d2856 2
a2857 2
10.4 Implementing FLUSH construct
=================================
d2864 2
a2865 2
10.5 Implementing BARRIER construct
===================================
d2872 2
a2873 2
10.6 Implementing THREADPRIVATE construct
=========================================
d2887 2
a2888 2
10.7 Implementing PRIVATE clause
================================
d2901 2
a2902 2
10.8 Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses
=========================================================================
d2939 2
a2940 2
10.9 Implementing REDUCTION clause
==================================
d2951 2
a2952 2
10.10 Implementing PARALLEL construct
=====================================
d2995 2
a2996 2
10.11 Implementing FOR construct
================================
d3057 2
a3058 2
10.12 Implementing ORDERED construct
====================================
d3066 2
a3067 2
10.13 Implementing SECTIONS construct
=====================================
d3101 2
a3102 2
10.14 Implementing SINGLE construct
===================================
d3138 2
a3139 2
10.15 Implementing OpenACC's PARALLEL construct
===============================================
d3146 1
a3146 1
11 Reporting Bugs
d3150 1
a3150 1
be reported via Bugzilla (https://gcc.gnu.org/bugzilla/).  Please add
d3868 1
a3868 1
please read <https://www.gnu.org/licenses/why-not-lgpl.html>.
a4410 2
* acc_get_property:                      acc_get_property.      (line 6)
* acc_get_property_string:               acc_get_property.      (line 6)
d4446 130
a4575 139
Node: Enabling OpenMP4645
Node: Runtime Library Routines5433
Node: omp_get_active_level8510
Node: omp_get_ancestor_thread_num9210
Node: omp_get_cancellation10140
Node: omp_get_default_device10954
Node: omp_get_dynamic11630
Node: omp_get_level12505
Node: omp_get_max_active_levels13125
Node: omp_get_max_task_priority13830
Node: omp_get_max_threads14450
Node: omp_get_nested15207
Node: omp_get_num_devices16121
Node: omp_get_num_procs16642
Node: omp_get_num_teams17181
Node: omp_get_num_threads17697
Node: omp_get_proc_bind18786
Node: omp_get_schedule19707
Node: omp_get_team_num20661
Node: omp_get_team_size21160
Node: omp_get_thread_limit22120
Node: omp_get_thread_num22739
Node: omp_in_parallel23610
Node: omp_in_final24259
Node: omp_is_initial_device24933
Node: omp_set_default_device25626
Node: omp_set_dynamic26417
Node: omp_set_max_active_levels27303
Node: omp_set_nested28080
Node: omp_set_num_threads28972
Node: omp_set_schedule29840
Node: omp_init_lock30921
Node: omp_set_lock31574
Node: omp_test_lock32429
Node: omp_unset_lock33405
Node: omp_destroy_lock34336
Node: omp_init_nest_lock35013
Node: omp_set_nest_lock35748
Node: omp_test_nest_lock36663
Node: omp_unset_nest_lock37690
Node: omp_destroy_nest_lock38705
Node: omp_get_wtick39456
Node: omp_get_wtime40048
Node: Environment Variables40824
Node: OMP_CANCELLATION42393
Node: OMP_DISPLAY_ENV42926
Node: OMP_DEFAULT_DEVICE43629
Node: OMP_DYNAMIC44409
Node: OMP_MAX_ACTIVE_LEVELS45005
Node: OMP_MAX_TASK_PRIORITY45655
Node: OMP_NESTED46313
Node: OMP_NUM_THREADS46918
Node: OMP_PROC_BIND47606
Node: OMP_PLACES48798
Node: OMP_STACKSIZE50975
Node: OMP_SCHEDULE51799
Node: OMP_THREAD_LIMIT52497
Node: OMP_WAIT_POLICY53097
Node: GOMP_CPU_AFFINITY53789
Node: GOMP_DEBUG55519
Node: GOMP_STACKSIZE56026
Node: GOMP_SPINCOUNT56857
Node: GOMP_RTEMS_THREAD_POOLS58061
Node: Enabling OpenACC60239
Node: OpenACC Runtime Library Routines61140
Node: acc_get_num_devices65421
Node: acc_set_device_type66147
Node: acc_get_device_type66911
Node: acc_set_device_num67924
Node: acc_get_device_num68741
Node: acc_get_property69540
Node: acc_async_test71763
Node: acc_async_test_all72751
Node: acc_wait73651
Node: acc_wait_all74514
Node: acc_wait_all_async75275
Node: acc_wait_async76027
Node: acc_init76735
Node: acc_shutdown77380
Node: acc_on_device78047
Node: acc_malloc79051
Node: acc_free79550
Node: acc_copyin79977
Node: acc_present_or_copyin81564
Node: acc_create83342
Node: acc_present_or_create84974
Node: acc_copyout86760
Node: acc_delete89064
Node: acc_update_device91311
Node: acc_update_self92885
Node: acc_map_data94475
Node: acc_unmap_data95160
Node: acc_deviceptr95681
Node: acc_hostptr96251
Node: acc_is_present96815
Node: acc_memcpy_to_device98342
Node: acc_memcpy_from_device99005
Node: acc_attach99672
Node: acc_detach100319
Node: acc_get_current_cuda_device101098
Node: acc_get_current_cuda_context101683
Node: acc_get_cuda_stream102283
Node: acc_set_cuda_stream102874
Node: acc_prof_register103545
Node: acc_prof_unregister104104
Node: acc_prof_lookup104671
Node: acc_register_library105192
Node: OpenACC Environment Variables105758
Node: ACC_DEVICE_TYPE106330
Node: ACC_DEVICE_NUM106566
Node: ACC_PROFLIB106820
Node: GCC_ACC_NOTIFY107151
Node: CUDA Streams Usage107371
Ref: CUDA Streams Usage-Footnote-1109272
Node: OpenACC Library Interoperability109381
Ref: OpenACC Library Interoperability-Footnote-1115749
Ref: OpenACC Library Interoperability-Footnote-2116001
Node: OpenACC Profiling Interface116209
Node: The libgomp ABI126233
Node: Implementing MASTER construct127086
Node: Implementing CRITICAL construct127502
Node: Implementing ATOMIC construct128243
Node: Implementing FLUSH construct128726
Node: Implementing BARRIER construct128999
Node: Implementing THREADPRIVATE construct129270
Node: Implementing PRIVATE clause129925
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses130508
Node: Implementing REDUCTION clause131834
Node: Implementing PARALLEL construct132393
Node: Implementing FOR construct133652
Node: Implementing ORDERED construct135652
Node: Implementing SECTIONS construct135960
Node: Implementing SINGLE construct136728
Node: Implementing OpenACC's PARALLEL construct137442
Node: Reporting Bugs137702
Node: Copying138065
Node: GNU Free Documentation License175611
Node: Funding200734
Node: Library Index203260
@


1.1.1.17
log
@initial import of GCC 10.4.0 sources.

mostly a large list of PRs fixed (210 total), plus one x86-64
specific change related to MMX and 64 bit integer return.

https://gcc.gnu.org/gcc-10/changes.html links to the full list
of PRs fixed.
@
text
@d1 1
a1 1
This is libgomp.info, produced by makeinfo version 6.8 from
a5120 5


Local Variables:
coding: utf-8
End:
@


1.1.1.18
log
@initial import of GCC 10.5.0.

(we plan to import 12.3 soon as well, this is mostly so it can be pulled up
to netbsd-10 branch more easily.)

the list of PR's fixed since 10.4.0 can be found here:

https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=10.5

which includes 3 C, 25 C++, 4 debug, 17 libstdc++, and many others for the
internals.
@
text
@d1 1
a1 1
This is libgomp.info, produced by makeinfo version 6.5 from
d153 1
a153 1
* omp_get_proc_bind::           Whether threads may be moved between CPUs
d510 2
a511 2
2.15 'omp_get_proc_bind' - Whether threads may be moved between CPUs
====================================================================
d1180 2
a1181 2
* OMP_PROC_BIND::           Whether threads may be moved between CPUs
* OMP_PLACES::              Specifies on which CPUs the threads should be placed
d1338 2
a1339 2
3.9 'OMP_PROC_BIND' - Whether threads may be moved between CPUs
===============================================================
d1343 1
a1343 1
     to 'TRUE', OpenMP threads should not be moved; if set to 'FALSE'
d1365 2
a1366 2
3.10 'OMP_PLACES' - Specifies on which CPUs the threads should be placed
========================================================================
d4982 137
a5118 137
Node: omp_get_active_level8511
Node: omp_get_ancestor_thread_num9211
Node: omp_get_cancellation10141
Node: omp_get_default_device10955
Node: omp_get_dynamic11631
Node: omp_get_level12506
Node: omp_get_max_active_levels13126
Node: omp_get_max_task_priority13831
Node: omp_get_max_threads14451
Node: omp_get_nested15208
Node: omp_get_num_devices16122
Node: omp_get_num_procs16643
Node: omp_get_num_teams17182
Node: omp_get_num_threads17698
Node: omp_get_proc_bind18787
Node: omp_get_schedule19710
Node: omp_get_team_num20664
Node: omp_get_team_size21163
Node: omp_get_thread_limit22123
Node: omp_get_thread_num22742
Node: omp_in_parallel23613
Node: omp_in_final24262
Node: omp_is_initial_device24936
Node: omp_set_default_device25629
Node: omp_set_dynamic26420
Node: omp_set_max_active_levels27306
Node: omp_set_nested28083
Node: omp_set_num_threads28975
Node: omp_set_schedule29843
Node: omp_init_lock30924
Node: omp_set_lock31577
Node: omp_test_lock32432
Node: omp_unset_lock33408
Node: omp_destroy_lock34339
Node: omp_init_nest_lock35016
Node: omp_set_nest_lock35751
Node: omp_test_nest_lock36666
Node: omp_unset_nest_lock37693
Node: omp_destroy_nest_lock38708
Node: omp_get_wtick39459
Node: omp_get_wtime40051
Node: Environment Variables40827
Node: OMP_CANCELLATION42398
Node: OMP_DISPLAY_ENV42931
Node: OMP_DEFAULT_DEVICE43634
Node: OMP_DYNAMIC44414
Node: OMP_MAX_ACTIVE_LEVELS45010
Node: OMP_MAX_TASK_PRIORITY45660
Node: OMP_NESTED46318
Node: OMP_NUM_THREADS46923
Node: OMP_PROC_BIND47611
Node: OMP_PLACES48806
Node: OMP_STACKSIZE50985
Node: OMP_SCHEDULE51809
Node: OMP_THREAD_LIMIT52507
Node: OMP_WAIT_POLICY53107
Node: GOMP_CPU_AFFINITY53799
Node: GOMP_DEBUG55529
Node: GOMP_STACKSIZE56036
Node: GOMP_SPINCOUNT56867
Node: GOMP_RTEMS_THREAD_POOLS58071
Node: Enabling OpenACC60249
Node: OpenACC Runtime Library Routines61150
Node: acc_get_num_devices65431
Node: acc_set_device_type66157
Node: acc_get_device_type66921
Node: acc_set_device_num67934
Node: acc_get_device_num68751
Node: acc_get_property69550
Node: acc_async_test71773
Node: acc_async_test_all72761
Node: acc_wait73661
Node: acc_wait_all74524
Node: acc_wait_all_async75285
Node: acc_wait_async76037
Node: acc_init76745
Node: acc_shutdown77390
Node: acc_on_device78057
Node: acc_malloc79061
Node: acc_free79560
Node: acc_copyin79987
Node: acc_present_or_copyin81574
Node: acc_create83352
Node: acc_present_or_create84984
Node: acc_copyout86770
Node: acc_delete89074
Node: acc_update_device91321
Node: acc_update_self92895
Node: acc_map_data94485
Node: acc_unmap_data95170
Node: acc_deviceptr95691
Node: acc_hostptr96261
Node: acc_is_present96825
Node: acc_memcpy_to_device98352
Node: acc_memcpy_from_device99015
Node: acc_attach99682
Node: acc_detach100329
Node: acc_get_current_cuda_device101108
Node: acc_get_current_cuda_context101693
Node: acc_get_cuda_stream102293
Node: acc_set_cuda_stream102884
Node: acc_prof_register103555
Node: acc_prof_unregister104114
Node: acc_prof_lookup104681
Node: acc_register_library105202
Node: OpenACC Environment Variables105768
Node: ACC_DEVICE_TYPE106340
Node: ACC_DEVICE_NUM106576
Node: ACC_PROFLIB106830
Node: GCC_ACC_NOTIFY107161
Node: CUDA Streams Usage107381
Ref: CUDA Streams Usage-Footnote-1109282
Node: OpenACC Library Interoperability109391
Ref: OpenACC Library Interoperability-Footnote-1115759
Ref: OpenACC Library Interoperability-Footnote-2116011
Node: OpenACC Profiling Interface116219
Node: The libgomp ABI126243
Node: Implementing MASTER construct127096
Node: Implementing CRITICAL construct127512
Node: Implementing ATOMIC construct128253
Node: Implementing FLUSH construct128736
Node: Implementing BARRIER construct129009
Node: Implementing THREADPRIVATE construct129280
Node: Implementing PRIVATE clause129935
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses130518
Node: Implementing REDUCTION clause131844
Node: Implementing PARALLEL construct132403
Node: Implementing FOR construct133662
Node: Implementing ORDERED construct135662
Node: Implementing SECTIONS construct135970
Node: Implementing SINGLE construct136738
Node: Implementing OpenACC's PARALLEL construct137452
Node: Reporting Bugs137712
Node: Copying138075
Node: GNU Free Documentation License175621
Node: Funding200744
Node: Library Index203270
d5121 5
@


1.1.1.19
log
@initial import of GCC 12.3.0.

major changes in GCC 11 included:

- The default mode for C++ is now -std=gnu++17 instead of -std=gnu++14.
- When building GCC itself, the host compiler must now support C++11,
  rather than C++98.
- Some short options of the gcov tool have been renamed: -i to -j and
  -j to -H.
- ThreadSanitizer improvements.
- Introduce Hardware-assisted AddressSanitizer support.
- For targets that produce DWARF debugging information GCC now defaults
  to DWARF version 5. This can produce up to 25% more compact debug
  information compared to earlier versions.
- Many optimisations.
- The existing malloc attribute has been extended so that it can be
  used to identify allocator/deallocator API pairs. A pair of new
  -Wmismatched-dealloc and -Wmismatched-new-delete warnings are added.
- Other new warnings:
  -Wsizeof-array-div, enabled by -Wall, warns about divisions of two
    sizeof operators when the first one is applied to an array and the
    divisor does not equal the size of the array element.
  -Wstringop-overread, enabled by default, warns about calls to string
    functions reading past the end of the arrays passed to them as
    arguments.
  -Wtsan, enabled by default, warns about unsupported features in
    ThreadSanitizer (currently std::atomic_thread_fence).
- Enchanced warnings:
  -Wfree-nonheap-object detects many more instances of calls to
    deallocation functions with pointers not returned from a dynamic
    memory allocation function.
  -Wmaybe-uninitialized diagnoses passing pointers or references to
    uninitialized memory to functions taking const-qualified arguments.
  -Wuninitialized detects reads from uninitialized dynamically
    allocated memory.
  -Warray-parameter warns about functions with inconsistent array forms.
  -Wvla-parameter warns about functions with inconsistent VLA forms.
- Several new features from the upcoming C2X revision of the ISO C
  standard are supported with -std=c2x and -std=gnu2x.
- Several C++20 features have been implemented.
- The C++ front end has experimental support for some of the upcoming
  C++23 draft.
- Several new C++ warnings.
- Enhanced Arm, AArch64, x86, and RISC-V CPU support.
- The implementation of how program state is tracked within
  -fanalyzer has been completely rewritten with many enhancements.

see https://gcc.gnu.org/gcc-11/changes.html for a full list.

major changes in GCC 12 include:

- An ABI incompatibility between C and C++ when passing or returning
  by value certain aggregates containing zero width bit-fields has
  been discovered on various targets. x86-64, ARM and AArch64
  will always ignore them (so there is a C ABI incompatibility
  between GCC 11 and earlier with GCC 12 or later), PowerPC64 ELFv2
  always take them into account (so there is a C++ ABI
  incompatibility, GCC 4.4 and earlier compatible with GCC 12 or
  later, incompatible with GCC 4.5 through GCC 11). RISC-V has
  changed the handling of these already starting with GCC 10. As
  the ABI requires, MIPS takes them into account handling function
  return values so there is a C++ ABI incompatibility with GCC 4.5
  through 11.
- STABS: Support for emitting the STABS debugging format is
  deprecated and will be removed in the next release. All ports now
  default to emit DWARF (version 2 or later) debugging info or are
  obsoleted.
- Vectorization is enabled at -O2 which is now equivalent to the
  original -O2 -ftree-vectorize -fvect-cost-model=very-cheap.
- GCC now supports the ShadowCallStack sanitizer.
- Support for __builtin_shufflevector compatible with the clang
  language extension was added.
- Support for attribute unavailable was added.
- Support for __builtin_dynamic_object_size compatible with the
  clang language extension was added.
- New warnings:
  -Wbidi-chars warns about potentially misleading UTF-8
    bidirectional control characters.
  -Warray-compare warns about comparisons between two operands of
    array type.
- Some new features from the upcoming C2X revision of the ISO C
  standard are supported with -std=c2x and -std=gnu2x.
- Several C++23 features have been implemented.
- Many C++ enhancements across warnings and -f options.

see https://gcc.gnu.org/gcc-12/changes.html for a full list.
@
text
@d4 1
a4 1
Copyright (C) 2006-2022 Free Software Foundation, Inc.
d36 1
a36 1
   Copyright (C) 2006-2022 Free Software Foundation, Inc.
d57 1
a57 1
File: libgomp.info,  Node: Top,  Next: Enabling OpenMP
a77 1
* OpenMP Implementation Status:: List of implemented features by OpenMP version
d107 1
a107 1
File: libgomp.info,  Node: Enabling OpenMP,  Next: OpenMP Implementation Status,  Up: Top
d120 3
a122 3
   A complete description of all OpenMP directives may be found in the
OpenMP Application Program Interface (https://www.openmp.org) manuals.
See also *note OpenMP Implementation Status::.
d125 1
a125 1
File: libgomp.info,  Node: OpenMP Implementation Status,  Next: Runtime Library Routines,  Prev: Enabling OpenMP,  Up: Top
d127 1
a127 239
2 OpenMP Implementation Status
******************************

* Menu:

* OpenMP 4.5:: Feature completion status to 4.5 specification
* OpenMP 5.0:: Feature completion status to 5.0 specification
* OpenMP 5.1:: Feature completion status to 5.1 specification

The '_OPENMP' preprocessor macro and Fortran's 'openmp_version'
parameter, provided by 'omp_lib.h' and the 'omp_lib' module, have the
value '201511' (i.e.  OpenMP 4.5).


File: libgomp.info,  Node: OpenMP 4.5,  Next: OpenMP 5.0,  Up: OpenMP Implementation Status

2.1 OpenMP 4.5
==============

The OpenMP 4.5 specification is fully supported.


File: libgomp.info,  Node: OpenMP 5.0,  Next: OpenMP 5.1,  Prev: OpenMP 4.5,  Up: OpenMP Implementation Status

2.2 OpenMP 5.0
==============

New features listed in Appendix B of the OpenMP specification
-------------------------------------------------------------

Description                                 Status  Comments
-----------------------------------------------------------------------
Array shaping                               N
Array sections with non-unit strides in C   N
and C++
Iterators                                   Y
'metadirective' directive                   N
'declare variant' directive                 P       simd traits not
                                                    handled
                                                    correctly
_target-offload-var_ ICV and                Y
'OMP_TARGET_OFFLOAD' env variable
Nested-parallel changes to                  Y
_max-active-levels-var_ ICV
'requires' directive                        P       Only fulfillable
                                                    requirement are
                                                    'atomic_default_mem_order'
                                                    and
                                                    'dynamic_allocators'
'teams' construct outside an enclosing      Y
target region
Non-rectangular loop nests                  P       Only C/C++
'!=' as relational-op in canonical loop     Y
form for C/C++
'nonmonotonic' as default loop schedule     Y
modifier for worksharing-loop constructs
Collapse of associated loops that are       N
imperfectly nested loops
Clauses 'if', 'nontemporal' and             Y
'order(concurrent)' in 'simd' construct
'atomic' constructs in 'simd'               Y
'loop' construct                            Y
'order(concurrent)' clause                  Y
'scan' directive and 'in_scan' modifier     Y
for the 'reduction' clause
'in_reduction' clause on 'task'             Y
constructs
'in_reduction' clause on 'target'           P       'nowait' only
constructs                                          stub
'task_reduction' clause with 'taskgroup'    Y
'task' modifier to 'reduction' clause       Y
'affinity' clause to 'task' construct       Y       Stub only
'detach' clause to 'task' construct         Y
'omp_fulfill_event' runtime routine         Y
'reduction' and 'in_reduction' clauses on   Y
'taskloop' and 'taskloop simd' constructs
'taskloop' construct cancelable by          Y
'cancel' construct
'mutexinoutset' _dependence-type_ for       Y
'depend' clause
Predefined memory spaces, memory            Y       Some are only
allocators, allocator traits                        stubs
Memory management routines                  Y
'allocate' directive                        N
'allocate' clause                           P       initial support
'use_device_addr' clause on 'target data'   Y
'ancestor' modifier on 'device' clause      P       Reverse offload
                                                    unsupported
Implicit declare target directive           Y
Discontiguous array section with 'target    N
update' construct
C/C++'s lvalue expressions in 'to',         N
'from' and 'map' clauses
C/C++'s lvalue expressions in 'depend'      Y
clauses
Nested 'declare target' directive           Y
Combined 'master' constructs                Y
'depend' clause on 'taskwait'               Y
Weak memory ordering clauses on 'atomic'    Y
and 'flush' construct
'hint' clause on the 'atomic' construct     Y       Stub only
'depobj' construct and depend objects       Y
Lock hints were renamed to                  Y
synchronization hints
'conditional' modifier to 'lastprivate'     Y
clause
Map-order clarifications                    P
'close' _map-type-modifier_                 Y
Mapping C/C++ pointer variables and to      P
assign the address of device memory
mapped by an array section
Mapping of Fortran pointer and              P       Mapping of vars
allocatable variables, including pointer            with allocatable
and allocatable components of variables             components
                                                    unsupported
'defaultmap' extensions                     Y
'declare mapper' directive                  N
'omp_get_supported_active_levels' routine   Y
Runtime routines and environment            Y
variables to display runtime thread
affinity information
'omp_pause_resource' and                    Y
'omp_pause_resource_all' runtime routines
'omp_get_device_num' runtime routine        Y
OMPT interface                              N
OMPD interface                              N

Other new OpenMP 5.0 features
-----------------------------

Description                                 Status  Comments
-----------------------------------------------------------------------
Supporting C++'s range-based for loop       Y


File: libgomp.info,  Node: OpenMP 5.1,  Prev: OpenMP 5.0,  Up: OpenMP Implementation Status

2.3 OpenMP 5.1
==============

New features listed in Appendix B of the OpenMP specification
-------------------------------------------------------------

Description                                 Status  Comments
-----------------------------------------------------------------------
OpenMP directive as C++ attribute           Y
specifiers
'omp_all_memory' reserved locator           N
_target_device trait_ in OpenMP Context     N
'target_device' selector set in context     N
selectors
C/C++'s 'declare variant' directive:        N
elision support of preprocessed code
'declare variant': new clauses              N
'adjust_args' and 'append_args'
'dispatch' construct                        N
device-specific ICV settings the            N
environment variables
assume directive                            N
'nothing' directive                         Y
'error' directive                           Y
'masked' construct                          Y
'scope' directive                           Y
Loop transformation constructs              N
'strict' modifier in the 'grainsize' and    Y
'num_tasks' clauses of the taskloop
construct
'align' clause/modifier in 'allocate'       P       C/C++ on clause
directive/clause and 'allocator'                    only
directive
'thread_limit' clause to 'target'           Y
construct
'has_device_addr' clause to 'target'        Y
construct
iterators in 'target update' motion         N
clauses and 'map' clauses
indirect calls to the device version of a   N
procedure or function in 'target' regions
'interop' directive                         N
'omp_interop_t' object support in runtime   N
routines
'nowait' clause in 'taskwait' directive     N
Extensions to the 'atomic' directive        Y
'seq_cst' clause on a 'flush' construct     Y
'inoutset' argument to the 'depend'         N
clause
'private' and 'firstprivate' argument to    Y
'default' clause in C and C++
'present' argument to 'defaultmap' clause   N
'omp_set_num_teams',                        Y
'omp_set_teams_thread_limit',
'omp_get_max_teams',
'omp_get_teams_thread_limit' runtime
routines
'omp_target_is_accessible' runtime          N
routine
'omp_target_memcpy_async' and               N
'omp_target_memcpy_rect_async' runtime
routines
'omp_get_mapped_ptr' runtime routine        N
'omp_calloc', 'omp_realloc',                Y
'omp_aligned_alloc' and
'omp_aligned_calloc' runtime routines
'omp_alloctrait_key_t' enum:                Y
'omp_atv_serialized' added,
'omp_atv_default' changed
'omp_display_env' runtime routine           Y
'ompt_scope_endpoint_t' enum:               N
'ompt_scope_beginend'
'ompt_sync_region_t' enum additions         N
'ompt_state_t' enum:                        N
'ompt_state_wait_barrier_implementation'
and 'ompt_state_wait_barrier_teams'
'ompt_callback_target_data_op_emi_t',       N
'ompt_callback_target_emi_t',
'ompt_callback_target_map_emi_t' and
'ompt_callback_target_submit_emi_t'
'ompt_callback_error_t' type                N
'OMP_PLACES' syntax extensions              Y
'OMP_NUM_TEAMS' and                         Y
'OMP_TEAMS_THREAD_LIMIT' environment
variables

Other new OpenMP 5.1 features
-----------------------------

Description                                 Status  Comments
-----------------------------------------------------------------------
Support of strictly structured blocks in    Y
Fortran
Support of structured block sequences in    Y
C/C++
'unconstrained' and 'reproducible'          Y
modifiers on 'order' clause


File: libgomp.info,  Node: Runtime Library Routines,  Next: Environment Variables,  Prev: OpenMP Implementation Status,  Up: Top

3 OpenMP Runtime Library Routines
a142 1
* omp_get_device_num::          Get device that current thread is running on
a143 1
* omp_get_initial_device::      Device number of host device
d145 1
a145 1
* omp_get_max_active_levels::   Current maximum number of active regions
a146 1
* omp_get_max_teams::           Maximum number of teams for teams region
a154 1
* omp_get_supported_active_levels:: Maximum number of active regions supported
a156 1
* omp_get_teams_thread_limit::  Maximum number of threads imposed by teams
a165 1
* omp_set_num_teams::           Set upper teams limit for teams region
a167 1
* omp_set_teams_thread_limit::  Set upper thread limit for teams construct
a186 4
Support for event objects.

* omp_fulfill_event::        Fulfill and destroy an OpenMP event.

d190 1
a190 1
3.1 'omp_get_active_level' - Number of parallel regions
d213 1
a213 1
3.2 'omp_get_ancestor_thread_num' - Ancestor thread ID
d239 1
a239 1
3.3 'omp_get_cancellation' - Whether cancellation support is enabled
d261 1
a261 1
File: libgomp.info,  Node: omp_get_default_device,  Next: omp_get_device_num,  Prev: omp_get_cancellation,  Up: Runtime Library Routines
d263 1
a263 1
3.4 'omp_get_default_device' - Get the default device for target regions
d282 1
a282 22
File: libgomp.info,  Node: omp_get_device_num,  Next: omp_get_dynamic,  Prev: omp_get_default_device,  Up: Runtime Library Routines

3.5 'omp_get_device_num' - Return device number of current device
=================================================================

_Description_:
     This function returns a device number that represents the device
     that the current thread is executing on.  For OpenMP 5.0, this must
     be equal to the value returned by the 'omp_get_initial_device'
     function when called from the host.

_C/C++_
     _Prototype_:   'int omp_get_device_num(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_device_num()'

_See also_:
     *note omp_get_initial_device::

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.2.37.
d284 1
a284 4

File: libgomp.info,  Node: omp_get_dynamic,  Next: omp_get_initial_device,  Prev: omp_get_device_num,  Up: Runtime Library Routines

3.6 'omp_get_dynamic' - Dynamic teams setting
d309 1
a309 24
File: libgomp.info,  Node: omp_get_initial_device,  Next: omp_get_level,  Prev: omp_get_dynamic,  Up: Runtime Library Routines

3.7 'omp_get_initial_device' - Return device number of initial device
=====================================================================

_Description_:
     This function returns a device number that represents the host
     device.  For OpenMP 5.1, this must be equal to the value returned
     by the 'omp_get_num_devices' function.

_C/C++_
     _Prototype_:   'int omp_get_initial_device(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_initial_device()'

_See also_:
     *note omp_get_num_devices::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.35.


File: libgomp.info,  Node: omp_get_level,  Next: omp_get_max_active_levels,  Prev: omp_get_initial_device,  Up: Runtime Library Routines
d311 1
a311 1
3.8 'omp_get_level' - Obtain the current nesting level
d333 2
a334 2
3.9 'omp_get_max_active_levels' - Current maximum number of active regions
==========================================================================
d353 1
a353 1
File: libgomp.info,  Node: omp_get_max_task_priority,  Next: omp_get_max_teams,  Prev: omp_get_max_active_levels,  Up: Runtime Library Routines
d355 2
a356 2
3.10 'omp_get_max_task_priority' - Maximum priority value
=========================================================
d373 1
a373 1
File: libgomp.info,  Node: omp_get_max_teams,  Next: omp_get_max_threads,  Prev: omp_get_max_task_priority,  Up: Runtime Library Routines
d375 2
a376 24
3.11 'omp_get_max_teams' - Maximum number of teams of teams region
==================================================================

_Description_:
     Return the maximum number of teams used for the teams region that
     does not use the clause 'num_teams'.

_C/C++_:
     _Prototype_:   'int omp_get_max_teams(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_max_teams()'

_See also_:
     *note omp_set_num_teams::, *note omp_get_num_teams::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.4.4.


File: libgomp.info,  Node: omp_get_max_threads,  Next: omp_get_nested,  Prev: omp_get_max_teams,  Up: Runtime Library Routines

3.12 'omp_get_max_threads' - Maximum number of threads of parallel region
=========================================================================
d398 1
a398 1
3.13 'omp_get_nested' - Nested parallel regions
d406 4
a409 14
     The state of nested parallel regions at startup depends on several
     environment variables.  If 'OMP_MAX_ACTIVE_LEVELS' is defined and
     is set to greater than one, then nested parallel regions will be
     enabled.  If not defined, then the value of the 'OMP_NESTED'
     environment variable will be followed if defined.  If neither are
     defined, then if either 'OMP_NUM_THREADS' or 'OMP_PROC_BIND' are
     defined with a list of more than one value, then nested parallel
     regions are enabled.  If none of these are defined, then nested
     parallel regions are disabled by default.

     Nested parallel regions can be enabled or disabled at runtime using
     'omp_set_nested', or by setting the maximum number of nested
     regions with 'omp_set_max_active_levels' to one to disable, or
     above one to enable.
d418 1
a418 2
     *note omp_set_max_active_levels::, *note omp_set_nested::, *note
     OMP_MAX_ACTIVE_LEVELS::, *note OMP_NESTED::
d426 1
a426 1
3.14 'omp_get_num_devices' - Number of target devices
d444 1
a444 1
3.15 'omp_get_num_procs' - Number of processors online
d462 1
a462 1
3.16 'omp_get_num_teams' - Number of teams
d480 1
a480 1
3.17 'omp_get_num_threads' - Size of the active team
d510 1
a510 1
3.18 'omp_get_proc_bind' - Whether threads may be moved between CPUs
d517 2
a518 3
     'omp_proc_bind_primary', 'omp_proc_bind_master',
     'omp_proc_bind_close' and 'omp_proc_bind_spread', where
     'omp_proc_bind_master' is an alias for 'omp_proc_bind_primary'.
d535 1
a535 1
File: libgomp.info,  Node: omp_get_schedule,  Next: omp_get_supported_active_levels,  Prev: omp_get_proc_bind,  Up: Runtime Library Routines
d537 1
a537 1
3.19 'omp_get_schedule' - Obtain the runtime scheduling method
d562 1
a562 11
File: libgomp.info,  Node: omp_get_supported_active_levels,  Next: omp_get_team_num,  Prev: omp_get_schedule,  Up: Runtime Library Routines

3.20 'omp_get_supported_active_levels' - Maximum number of active regions supported
===================================================================================

_Description_:
     This function returns the maximum number of nested, active parallel
     regions supported by this implementation.

_C/C++_
     _Prototype_:   'int omp_get_supported_active_levels(void);'
d564 1
a564 14
_Fortran_:
     _Interface_:   'integer function omp_get_supported_active_levels()'

_See also_:
     *note omp_get_max_active_levels::, *note
     omp_set_max_active_levels::

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.2.15.


File: libgomp.info,  Node: omp_get_team_num,  Next: omp_get_team_size,  Prev: omp_get_supported_active_levels,  Up: Runtime Library Routines

3.21 'omp_get_team_num' - Get team number
d580 1
a580 1
File: libgomp.info,  Node: omp_get_team_size,  Next: omp_get_teams_thread_limit,  Prev: omp_get_team_num,  Up: Runtime Library Routines
d582 1
a582 1
3.22 'omp_get_team_size' - Number of threads in a team
d607 1
a607 11
File: libgomp.info,  Node: omp_get_teams_thread_limit,  Next: omp_get_thread_limit,  Prev: omp_get_team_size,  Up: Runtime Library Routines

3.23 'omp_get_teams_thread_limit' - Maximum number of threads imposed by teams
==============================================================================

_Description_:
     Return the maximum number of threads that will be able to
     participate in each team created by a teams construct.

_C/C++_:
     _Prototype_:   'int omp_get_teams_thread_limit(void);'
d609 1
a609 13
_Fortran_:
     _Interface_:   'integer function omp_get_teams_thread_limit()'

_See also_:
     *note omp_set_teams_thread_limit::, *note OMP_TEAMS_THREAD_LIMIT::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.4.6.


File: libgomp.info,  Node: omp_get_thread_limit,  Next: omp_get_thread_num,  Prev: omp_get_teams_thread_limit,  Up: Runtime Library Routines

3.24 'omp_get_thread_limit' - Maximum number of threads
d630 1
a630 1
3.25 'omp_get_thread_num' - Current thread ID
d638 1
a638 1
     primary thread of a team is always 0.
d655 1
a655 1
3.26 'omp_in_parallel' - Whether a parallel region is active
d675 1
a675 1
3.27 'omp_in_final' - Whether in final or included task region
d695 1
a695 1
3.28 'omp_is_initial_device' - Whether executing on the host device
d715 1
a715 1
3.29 'omp_set_default_device' - Set the default device for target regions
d738 1
a738 1
3.30 'omp_set_dynamic' - Enable/disable dynamic teams
d763 1
a763 1
3.31 'omp_set_max_active_levels' - Limits the number of active parallel regions
d768 1
a768 2
     parallel regions.  MAX_LEVELS must be less or equal to the value
     returned by 'omp_get_supported_active_levels'.
d778 1
a778 2
     *note omp_get_max_active_levels::, *note omp_get_active_level::,
     *note omp_get_supported_active_levels::
d784 1
a784 1
File: libgomp.info,  Node: omp_set_nested,  Next: omp_set_num_teams,  Prev: omp_set_max_active_levels,  Up: Runtime Library Routines
d786 1
a786 1
3.32 'omp_set_nested' - Enable/disable nested parallel regions
a794 5
     Enabling nested parallel regions will also set the maximum number
     of active nested regions to the maximum supported.  Disabling
     nested parallel regions will set the maximum number of active
     nested regions to one.

d803 1
a803 2
     *note omp_get_nested::, *note omp_set_max_active_levels::, *note
     OMP_MAX_ACTIVE_LEVELS::, *note OMP_NESTED::
d809 1
a809 12
File: libgomp.info,  Node: omp_set_num_teams,  Next: omp_set_num_threads,  Prev: omp_set_nested,  Up: Runtime Library Routines

3.33 'omp_set_num_teams' - Set upper teams limit for teams construct
====================================================================

_Description_:
     Specifies the upper bound for number of teams created by the teams
     construct which does not specify a 'num_teams' clause.  The
     argument of 'omp_set_num_teams' shall be a positive integer.

_C/C++_:
     _Prototype_:   'void omp_set_num_teams(int num_teams);'
d811 1
a811 15
_Fortran_:
     _Interface_:   'subroutine omp_set_num_teams(num_teams)'
                    'integer, intent(in) :: num_teams'

_See also_:
     *note OMP_NUM_TEAMS::, *note omp_get_num_teams::, *note
     omp_get_max_teams::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.4.3.


File: libgomp.info,  Node: omp_set_num_threads,  Next: omp_set_schedule,  Prev: omp_set_num_teams,  Up: Runtime Library Routines

3.34 'omp_set_num_threads' - Set upper team size limit
d834 1
a834 1
File: libgomp.info,  Node: omp_set_schedule,  Next: omp_set_teams_thread_limit,  Prev: omp_set_num_threads,  Up: Runtime Library Routines
d836 1
a836 1
3.35 'omp_set_schedule' - Set the runtime scheduling method
d863 1
a863 4
File: libgomp.info,  Node: omp_set_teams_thread_limit,  Next: omp_init_lock,  Prev: omp_set_schedule,  Up: Runtime Library Routines

3.36 'omp_set_teams_thread_limit' - Set upper thread limit for teams construct
==============================================================================
d865 1
a865 24
_Description_:
     Specifies the upper bound for number of threads that will be
     available for each team created by the teams construct which does
     not specify a 'thread_limit' clause.  The argument of
     'omp_set_teams_thread_limit' shall be a positive integer.

_C/C++_:
     _Prototype_:   'void omp_set_teams_thread_limit(int thread_limit);'

_Fortran_:
     _Interface_:   'subroutine omp_set_teams_thread_limit(thread_limit)'
                    'integer, intent(in) :: thread_limit'

_See also_:
     *note OMP_TEAMS_THREAD_LIMIT::, *note omp_get_teams_thread_limit::,
     *note omp_get_thread_limit::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.4.5.


File: libgomp.info,  Node: omp_init_lock,  Next: omp_set_lock,  Prev: omp_set_teams_thread_limit,  Up: Runtime Library Routines

3.37 'omp_init_lock' - Initialize simple lock
d888 1
a888 1
3.38 'omp_set_lock' - Wait for and set simple lock
d914 1
a914 1
3.39 'omp_test_lock' - Test and set simple lock if available
d940 1
a940 1
3.40 'omp_unset_lock' - Unset simple lock
d967 1
a967 1
3.41 'omp_destroy_lock' - Destroy simple lock
d990 1
a990 1
3.42 'omp_init_nest_lock' - Initialize nested lock
d1013 1
a1013 1
3.43 'omp_set_nest_lock' - Wait for and set nested lock
d1038 1
a1038 1
3.44 'omp_test_nest_lock' - Test and set nested lock if available
d1064 1
a1064 1
3.45 'omp_unset_nest_lock' - Unset nested lock
d1092 1
a1092 1
3.46 'omp_destroy_nest_lock' - Destroy nested lock
d1116 1
a1116 1
3.47 'omp_get_wtick' - Get timer precision
d1136 1
a1136 1
File: libgomp.info,  Node: omp_get_wtime,  Next: omp_fulfill_event,  Prev: omp_get_wtick,  Up: Runtime Library Routines
d1138 1
a1138 1
3.48 'omp_get_wtime' - Elapsed wall clock time
a1160 27
File: libgomp.info,  Node: omp_fulfill_event,  Prev: omp_get_wtime,  Up: Runtime Library Routines

3.49 'omp_fulfill_event' - Fulfill and destroy an OpenMP event
==============================================================

_Description_:
     Fulfill the event associated with the event handle argument.
     Currently, it is only used to fulfill events generated by detach
     clauses on task constructs - the effect of fulfilling the event is
     to allow the task to complete.

     The result of calling 'omp_fulfill_event' with an event handle
     other than that generated by a detach clause is undefined.  Calling
     it with an event handle that has already been fulfilled is also
     undefined.

_C/C++_:
     _Prototype_:   'void omp_fulfill_event(omp_event_handle_t event);'

_Fortran_:
     _Interface_:   'subroutine omp_fulfill_event(event)'
                    'integer (kind=omp_event_handle_kind) :: event'

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.5.1.


d1163 1
a1163 1
4 OpenMP Environment Variables
a1178 1
* OMP_NUM_TEAMS::           Specifies the number of teams to use by teams region
a1183 2
* OMP_TARGET_OFFLOAD::      Controls offloading behaviour
* OMP_TEAMS_THREAD_LIMIT::  Set the maximum number of threads imposed by teams
d1195 1
a1195 1
4.1 'OMP_CANCELLATION' - Set whether cancellation is activated
d1212 1
a1212 1
4.2 'OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
d1228 1
a1228 1
4.3 'OMP_DEFAULT_DEVICE' - Set the device used in target regions
d1247 1
a1247 1
4.4 'OMP_DYNAMIC' - Dynamic adjustment of threads
d1265 1
a1265 1
4.5 'OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
d1271 1
a1271 5
     integer.  If undefined, then if 'OMP_NESTED' is defined and set to
     true, or if 'OMP_NUM_THREADS' or 'OMP_PROC_BIND' are defined and
     set to a list with more than one item, the maximum number of nested
     parallel regions will be initialized to the largest number
     supported, otherwise it will be set to one.
d1274 1
a1274 1
     *note omp_set_max_active_levels::, *note OMP_NESTED::
d1282 1
a1282 1
4.6 'OMP_MAX_TASK_PRIORITY' - Set the maximum priority
d1299 1
a1299 1
File: libgomp.info,  Node: OMP_NESTED,  Next: OMP_NUM_TEAMS,  Prev: OMP_MAX_TASK_PRIORITY,  Up: Environment Variables
d1301 1
a1301 1
4.7 'OMP_NESTED' - Nested parallel regions
d1307 2
a1308 8
     environment variable shall be 'TRUE' or 'FALSE'.  If set to 'TRUE',
     the number of maximum active nested regions supported will by
     default be set to the maximum supported, otherwise it will be set
     to one.  If 'OMP_MAX_ACTIVE_LEVELS' is defined, its setting will
     override this setting.  If both are undefined, nested parallel
     regions are enabled if 'OMP_NUM_THREADS' or 'OMP_PROC_BINDS' are
     defined to a list with more than one item, otherwise they are
     disabled by default.
d1311 1
a1311 1
     *note omp_set_max_active_levels::, *note omp_set_nested::
d1317 1
a1317 19
File: libgomp.info,  Node: OMP_NUM_TEAMS,  Next: OMP_NUM_THREADS,  Prev: OMP_NESTED,  Up: Environment Variables

4.8 'OMP_NUM_TEAMS' - Specifies the number of teams to use by teams region
==========================================================================

_Description_:
     Specifies the upper bound for number of teams to use in teams
     regions without explicit 'num_teams' clause.  The value of this
     variable shall be a positive integer.  If undefined it defaults to
     0 which means implementation defined upper bound.

_See also_:
     *note omp_set_num_teams::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 6.23


File: libgomp.info,  Node: OMP_NUM_THREADS,  Next: OMP_PROC_BIND,  Prev: OMP_NUM_TEAMS,  Up: Environment Variables
d1319 1
a1319 1
4.9 'OMP_NUM_THREADS' - Specifies the number of threads to use
d1325 3
a1327 4
     positive integers; the value specifies the number of threads to use
     for the corresponding nested level.  Specifying more than one item
     in the list will automatically enable nesting by default.  If
     undefined one thread per CPU is used.
d1330 1
a1330 1
     *note omp_set_num_threads::, *note OMP_NESTED::
d1338 2
a1339 2
4.10 'OMP_PROC_BIND' - Whether threads may be moved between CPUs
================================================================
d1345 6
a1350 8
     values 'PRIMARY', 'MASTER', 'CLOSE' and 'SPREAD' can be used to
     specify the thread affinity policy for the corresponding nesting
     level.  With 'PRIMARY' and 'MASTER' the worker threads are in the
     same place partition as the primary thread.  With 'CLOSE' those are
     kept close to the primary thread in contiguous place partitions.
     And with 'SPREAD' a sparse distribution across the place partitions
     is used.  Specifying more than one item in the list will
     automatically enable nesting by default.
d1356 2
a1357 2
     *note omp_get_proc_bind::, *note GOMP_CPU_AFFINITY::, *note
     OMP_NESTED::, *note OMP_PLACES::
d1365 1
a1365 1
4.11 'OMP_PLACES' - Specifies on which CPUs the threads should be placed
d1371 7
a1377 11
     'threads', 'cores', 'sockets', 'll_caches' and 'numa_domains' can
     be optionally followed by a positive number in parentheses, which
     denotes the how many places shall be created.  With 'threads' each
     place corresponds to a single hardware thread; 'cores' to a single
     core with the corresponding number of hardware threads; with
     'sockets' the place corresponds to a single socket; with
     'll_caches' to a set of cores that shares the last level cache on
     the device; and 'numa_domains' to a set of cores for which their
     closest memory on the device is the same memory and at a similar
     distance from the cores.  The resulting placement can be shown by
     setting the 'OMP_DISPLAY_ENV' environment variable.
d1381 11
a1391 16
     nonnegative numbers in curly braces, denoting the hardware threads.
     The curly braces can be omitted when only a single number has been
     specified.  The hardware threads belonging to a place can either be
     specified as comma-separated list of nonnegative thread numbers or
     using an interval.  Multiple places can also be either specified by
     a comma-separated list of places or by an interval.  To specify an
     interval, a colon followed by the count is placed after the
     hardware thread number or the place.  Optionally, the length can be
     followed by a colon and the stride number - otherwise a unit stride
     is assumed.  Placing an exclamation mark ('!') directly before a
     curly brace or numbers inside the curly braces (excluding
     intervals) will exclude those hardware threads.

     For instance, the following specifies the same places list:
     '"{0,1,2}, {3,4,6}, {7,8,9}, {10,11,12}"'; '"{0:3}, {3:3}, {7:3},
     {10:3}"'; and '"{0:2}:4:3"'.
d1407 1
a1407 1
4.12 'OMP_STACKSIZE' - Set default thread stack size
d1424 1
a1424 1
File: libgomp.info,  Node: OMP_SCHEDULE,  Next: OMP_TARGET_OFFLOAD,  Prev: OMP_STACKSIZE,  Up: Environment Variables
d1426 1
a1426 1
4.13 'OMP_SCHEDULE' - How threads are scheduled
d1444 1
a1444 43
File: libgomp.info,  Node: OMP_TARGET_OFFLOAD,  Next: OMP_TEAMS_THREAD_LIMIT,  Prev: OMP_SCHEDULE,  Up: Environment Variables

4.14 'OMP_TARGET_OFFLOAD' - Controls offloading behaviour
=========================================================

_Description_:
     Specifies the behaviour with regard to offloading code to a device.
     This variable can be set to one of three values - 'MANDATORY',
     'DISABLED' or 'DEFAULT'.

     If set to 'MANDATORY', the program will terminate with an error if
     the offload device is not present or is not supported.  If set to
     'DISABLED', then offloading is disabled and all code will run on
     the host.  If set to 'DEFAULT', the program will try offloading to
     the device first, then fall back to running code on the host if it
     cannot.

     If undefined, then the program will behave as if 'DEFAULT' was set.

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 6.17


File: libgomp.info,  Node: OMP_TEAMS_THREAD_LIMIT,  Next: OMP_THREAD_LIMIT,  Prev: OMP_TARGET_OFFLOAD,  Up: Environment Variables

4.15 'OMP_TEAMS_THREAD_LIMIT' - Set the maximum number of threads imposed by teams
==================================================================================

_Description_:
     Specifies an upper bound for the number of threads to use by each
     contention group created by a teams construct without explicit
     'thread_limit' clause.  The value of this variable shall be a
     positive integer.  If undefined, the value of 0 is used which
     stands for an implementation defined upper limit.

_See also_:
     *note OMP_THREAD_LIMIT::, *note omp_set_teams_thread_limit::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 6.24


File: libgomp.info,  Node: OMP_THREAD_LIMIT,  Next: OMP_WAIT_POLICY,  Prev: OMP_TEAMS_THREAD_LIMIT,  Up: Environment Variables
d1446 1
a1446 1
4.16 'OMP_THREAD_LIMIT' - Set the maximum number of threads
d1463 1
a1463 1
4.17 'OMP_WAIT_POLICY' - How waiting threads are handled
d1482 1
a1482 1
4.18 'GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d1518 1
a1518 1
4.19 'GOMP_DEBUG' - Enable debugging output
d1532 1
a1532 1
4.20 'GOMP_STACKSIZE' - Set default thread stack size
d1554 1
a1554 1
4.21 'GOMP_SPINCOUNT' - Set the busy-wait spin count
d1578 1
a1578 1
4.22 'GOMP_RTEMS_THREAD_POOLS' - Set the RTEMS specific thread pools
d1592 1
a1592 1
          inherit the priority of the OpenMP primary thread that created
d1594 1
a1594 1
          creation, even if a new OpenMP primary thread using the worker
d1599 4
a1602 4
     instance, then each OpenMP primary thread of this scheduler
     instance will use its own dynamically allocated thread pool.  To
     limit the worker thread count of the thread pools, each OpenMP
     primary thread must call 'omp_set_num_threads'.
d1610 1
a1610 1
     primary thread that created it.  In the scheduler instance 'WRK1'
d1617 1
a1617 1
5 Enabling OpenACC
d1638 1
a1638 1
6 OpenACC Runtime Library Routines
d1718 1
a1718 1
6.1 'acc_get_num_devices' - Get number of devices for given device type
d1739 1
a1739 1
6.2 'acc_set_device_type' - Set type of device accelerator to use.
d1761 1
a1761 1
6.3 'acc_get_device_type' - Get type of device accelerator to be used.
d1788 1
a1788 1
6.4 'acc_set_device_num' - Set device number to use.
d1812 1
a1812 1
6.5 'acc_get_device_num' - Get device number to be used.
d1835 1
a1835 1
6.6 'acc_get_property' - Get device property.
d1882 1
a1882 1
6.7 'acc_async_test' - Test for completion of a specific asynchronous operation.
d1907 1
a1907 1
6.8 'acc_async_test_all' - Tests for completion of all asynchronous operations.
d1931 1
a1931 1
6.9 'acc_wait' - Wait for completion of a specific asynchronous operation.
d1959 1
a1959 1
6.10 'acc_wait_all' - Waits for completion of all asynchronous operations.
d1985 1
a1985 1
6.11 'acc_wait_all_async' - Wait for completion of all asynchronous operations.
d2007 1
a2007 1
6.12 'acc_wait_async' - Wait for completion of asynchronous operations.
d2028 1
a2028 1
6.13 'acc_init' - Initialize runtime for a specific device type.
d2049 1
a2049 1
6.14 'acc_shutdown' - Shuts down the runtime for a specific device type.
d2070 1
a2070 1
6.15 'acc_on_device' - Whether executing on a particular device
d2096 1
a2096 1
6.16 'acc_malloc' - Allocate device memory.
d2113 1
a2113 1
6.17 'acc_free' - Free device memory.
d2129 1
a2129 1
6.18 'acc_copyin' - Allocate device memory and copy host memory to it.
d2167 1
a2167 1
6.19 'acc_present_or_copyin' - If the data is not present on the device, allocate device memory and copy from host memory.
d2207 1
a2207 1
6.20 'acc_create' - Allocate device memory and map it to host memory.
d2246 1
a2246 1
6.21 'acc_present_or_create' - If the data is not present on the device, allocate device memory and map it to host memory.
d2286 1
a2286 1
6.22 'acc_copyout' - Copy device memory to host memory.
d2337 1
a2337 1
6.23 'acc_delete' - Free device memory.
d2388 1
a2388 1
6.24 'acc_update_device' - Update device memory from mapped host memory.
d2425 1
a2425 1
6.25 'acc_update_self' - Update host memory from mapped device memory.
d2463 1
a2463 1
6.26 'acc_map_data' - Map previously allocated device memory to host memory.
d2481 1
a2481 1
6.27 'acc_unmap_data' - Unmap device memory from host memory.
d2498 1
a2498 1
6.28 'acc_deviceptr' - Get device pointer associated with specific host address.
d2515 1
a2515 1
6.29 'acc_hostptr' - Get host pointer associated with specific device address.
d2532 1
a2532 1
6.30 'acc_is_present' - Indicate whether host variable / array is present on device.
d2568 1
a2568 1
6.31 'acc_memcpy_to_device' - Copy host memory to device memory.
d2587 1
a2587 1
6.32 'acc_memcpy_from_device' - Copy device memory to host memory.
d2606 1
a2606 1
6.33 'acc_attach' - Let device pointer point to device-pointer target.
d2624 1
a2624 1
6.34 'acc_detach' - Let device pointer point to host-pointer target.
d2644 1
a2644 1
6.35 'acc_get_current_cuda_device' - Get CUDA device handle.
d2661 1
a2661 1
6.36 'acc_get_current_cuda_context' - Get CUDA context handle.
d2678 1
a2678 1
6.37 'acc_get_cuda_stream' - Get CUDA stream handle.
d2696 1
a2696 1
6.38 'acc_set_cuda_stream' - Set CUDA stream handle.
d2718 1
a2718 1
6.39 'acc_prof_register' - Register callbacks.
d2737 1
a2737 1
6.40 'acc_prof_unregister' - Unregister callbacks.
d2756 1
a2756 1
6.41 'acc_prof_lookup' - Obtain inquiry functions.
d2774 1
a2774 1
6.42 'acc_register_library' - Library registration.
d2793 1
a2793 1
7 OpenACC Environment Variables
d2812 1
a2812 1
7.1 'ACC_DEVICE_TYPE'
d2821 1
a2821 1
7.2 'ACC_DEVICE_NUM'
d2830 1
a2830 1
7.3 'ACC_PROFLIB'
d2842 1
a2842 1
7.4 'GCC_ACC_NOTIFY'
d2851 1
a2851 1
8 CUDA Streams Usage
d2894 1
a2894 1
9 OpenACC Library Interoperability
d2897 1
a2897 1
9.1 Introduction
d2906 1
a2906 1
9.2 First invocation: NVIDIA CUBLAS library API
d2956 1
a2956 1
9.3 First invocation: OpenACC library API
d3026 1
a3026 1
9.4 OpenACC library and environment variables
d3058 2
a3059 2
10 OpenACC Profiling Interface
******************************
d3061 2
a3062 2
10.1 Implementation Status and Implementation-Defined Behavior
==============================================================
d3230 1
a3230 1
        * When a compute construct triggers implicit
d3310 1
a3310 1
11 The libgomp ABI
d3337 1
a3337 1
11.1 Implementing MASTER construct
d3344 1
a3344 1
only include this in the version run by the primary thread.  Surely this
d3350 1
a3350 1
11.2 Implementing CRITICAL construct
d3372 1
a3372 1
11.3 Implementing ATOMIC construct
d3388 1
a3388 1
11.4 Implementing FLUSH construct
d3396 1
a3396 1
11.5 Implementing BARRIER construct
d3404 1
a3404 1
11.6 Implementing THREADPRIVATE construct
d3419 1
a3419 1
11.7 Implementing PRIVATE clause
d3433 1
a3433 1
11.8 Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses
d3471 1
a3471 1
11.9 Implementing REDUCTION clause
d3477 1
a3477 1
the barrier, the primary thread iterates over the array to collect the
d3483 1
a3483 1
11.10 Implementing PARALLEL construct
d3527 1
a3527 1
11.11 Implementing FOR construct
d3589 1
a3589 1
11.12 Implementing ORDERED construct
d3598 1
a3598 1
11.13 Implementing SECTIONS construct
d3633 1
a3633 1
11.14 Implementing SINGLE construct
d3670 1
a3670 1
11.15 Implementing OpenACC's PARALLEL construct
d3678 1
a3678 1
12 Reporting Bugs
d3694 1
a3694 1
     Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
d4372 1
a4372 1
     along with this program.  If not, see <https://www.gnu.org/licenses/>.
d4393 1
a4393 1
the GNU GPL, see <https://www.gnu.org/licenses/>.
d4411 1
a4411 1
     <https://fsf.org/>
d4808 1
a4808 1
     <https://www.gnu.org/copyleft/>.
d4952 12
a4963 16
* Environment Variable <7>:              OMP_NUM_TEAMS.         (line 6)
* Environment Variable <8>:              OMP_NUM_THREADS.       (line 6)
* Environment Variable <9>:              OMP_PROC_BIND.         (line 6)
* Environment Variable <10>:             OMP_PLACES.            (line 6)
* Environment Variable <11>:             OMP_STACKSIZE.         (line 6)
* Environment Variable <12>:             OMP_SCHEDULE.          (line 6)
* Environment Variable <13>:             OMP_TARGET_OFFLOAD.    (line 6)
* Environment Variable <14>:             OMP_TEAMS_THREAD_LIMIT.
                                                                (line 6)
* Environment Variable <15>:             OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <16>:             OMP_WAIT_POLICY.       (line 6)
* Environment Variable <17>:             GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <18>:             GOMP_DEBUG.            (line 6)
* Environment Variable <19>:             GOMP_STACKSIZE.        (line 6)
* Environment Variable <20>:             GOMP_SPINCOUNT.        (line 6)
* Environment Variable <21>:             GOMP_RTEMS_THREAD_POOLS.
d4970 3
a4972 4
* Implementation specific setting <3>:   OMP_TARGET_OFFLOAD.    (line 6)
* Implementation specific setting <4>:   GOMP_STACKSIZE.        (line 6)
* Implementation specific setting <5>:   GOMP_SPINCOUNT.        (line 6)
* Implementation specific setting <6>:   GOMP_RTEMS_THREAD_POOLS.
d4980 139
a5118 154
Node: Enabling OpenMP4713
Node: OpenMP Implementation Status5519
Node: OpenMP 4.56074
Node: OpenMP 5.06250
Node: OpenMP 5.111120
Node: Runtime Library Routines14711
Node: omp_get_active_level18416
Node: omp_get_ancestor_thread_num19116
Node: omp_get_cancellation20046
Node: omp_get_default_device20860
Node: omp_get_device_num21539
Node: omp_get_dynamic22344
Node: omp_get_initial_device23224
Node: omp_get_level23968
Node: omp_get_max_active_levels24595
Node: omp_get_max_task_priority25316
Node: omp_get_max_teams25936
Node: omp_get_max_threads26630
Node: omp_get_nested27381
Node: omp_get_num_devices28989
Node: omp_get_num_procs29510
Node: omp_get_num_teams30049
Node: omp_get_num_threads30565
Node: omp_get_proc_bind31654
Node: omp_get_schedule32677
Node: omp_get_supported_active_levels33646
Node: omp_get_team_num34432
Node: omp_get_team_size34946
Node: omp_get_teams_thread_limit35912
Node: omp_get_thread_limit36674
Node: omp_get_thread_num37302
Node: omp_in_parallel38174
Node: omp_in_final38823
Node: omp_is_initial_device39497
Node: omp_set_default_device40190
Node: omp_set_dynamic40981
Node: omp_set_max_active_levels41867
Node: omp_set_nested42789
Node: omp_set_num_teams43984
Node: omp_set_num_threads44857
Node: omp_set_schedule45728
Node: omp_set_teams_thread_limit46822
Node: omp_init_lock47824
Node: omp_set_lock48487
Node: omp_test_lock49342
Node: omp_unset_lock50318
Node: omp_destroy_lock51249
Node: omp_init_nest_lock51926
Node: omp_set_nest_lock52661
Node: omp_test_nest_lock53576
Node: omp_unset_nest_lock54603
Node: omp_destroy_nest_lock55618
Node: omp_get_wtick56369
Node: omp_get_wtime56961
Node: omp_fulfill_event57763
Node: Environment Variables58784
Node: OMP_CANCELLATION60573
Node: OMP_DISPLAY_ENV61106
Node: OMP_DEFAULT_DEVICE61809
Node: OMP_DYNAMIC62589
Node: OMP_MAX_ACTIVE_LEVELS63185
Node: OMP_MAX_TASK_PRIORITY64112
Node: OMP_NESTED64770
Node: OMP_NUM_TEAMS65797
Node: OMP_NUM_THREADS66470
Node: OMP_PROC_BIND67275
Node: OMP_PLACES68617
Node: OMP_STACKSIZE71306
Node: OMP_SCHEDULE72130
Node: OMP_TARGET_OFFLOAD72830
Node: OMP_TEAMS_THREAD_LIMIT73792
Node: OMP_THREAD_LIMIT74599
Node: OMP_WAIT_POLICY75209
Node: GOMP_CPU_AFFINITY75901
Node: GOMP_DEBUG77631
Node: GOMP_STACKSIZE78138
Node: GOMP_SPINCOUNT78969
Node: GOMP_RTEMS_THREAD_POOLS80173
Node: Enabling OpenACC82356
Node: OpenACC Runtime Library Routines83257
Node: acc_get_num_devices87538
Node: acc_set_device_type88264
Node: acc_get_device_type89028
Node: acc_set_device_num90041
Node: acc_get_device_num90858
Node: acc_get_property91657
Node: acc_async_test93880
Node: acc_async_test_all94868
Node: acc_wait95768
Node: acc_wait_all96631
Node: acc_wait_all_async97392
Node: acc_wait_async98144
Node: acc_init98852
Node: acc_shutdown99497
Node: acc_on_device100164
Node: acc_malloc101168
Node: acc_free101667
Node: acc_copyin102094
Node: acc_present_or_copyin103681
Node: acc_create105459
Node: acc_present_or_create107091
Node: acc_copyout108877
Node: acc_delete111181
Node: acc_update_device113428
Node: acc_update_self115002
Node: acc_map_data116592
Node: acc_unmap_data117277
Node: acc_deviceptr117798
Node: acc_hostptr118368
Node: acc_is_present118932
Node: acc_memcpy_to_device120459
Node: acc_memcpy_from_device121122
Node: acc_attach121789
Node: acc_detach122436
Node: acc_get_current_cuda_device123215
Node: acc_get_current_cuda_context123800
Node: acc_get_cuda_stream124400
Node: acc_set_cuda_stream124991
Node: acc_prof_register125662
Node: acc_prof_unregister126221
Node: acc_prof_lookup126788
Node: acc_register_library127309
Node: OpenACC Environment Variables127875
Node: ACC_DEVICE_TYPE128447
Node: ACC_DEVICE_NUM128683
Node: ACC_PROFLIB128937
Node: GCC_ACC_NOTIFY129268
Node: CUDA Streams Usage129488
Ref: CUDA Streams Usage-Footnote-1131389
Node: OpenACC Library Interoperability131498
Ref: OpenACC Library Interoperability-Footnote-1137866
Ref: OpenACC Library Interoperability-Footnote-2138118
Node: OpenACC Profiling Interface138326
Node: The libgomp ABI148354
Node: Implementing MASTER construct149207
Node: Implementing CRITICAL construct149624
Node: Implementing ATOMIC construct150365
Node: Implementing FLUSH construct150848
Node: Implementing BARRIER construct151121
Node: Implementing THREADPRIVATE construct151392
Node: Implementing PRIVATE clause152047
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses152630
Node: Implementing REDUCTION clause153956
Node: Implementing PARALLEL construct154516
Node: Implementing FOR construct155775
Node: Implementing ORDERED construct157775
Node: Implementing SECTIONS construct158083
Node: Implementing SINGLE construct158851
Node: Implementing OpenACC's PARALLEL construct159565
Node: Reporting Bugs159825
Node: Copying160188
Node: GNU Free Documentation License197737
Node: Funding222862
Node: Library Index225388
@


1.1.1.20
log
@import GCC 12.4.0.

this includes at least 85 GCC PRs fixed, 2 C, 17 C++, 16 libstdc++-v3,
at least 13 target-specific (x86, arm64, riscv mostly), and at least
24 optimisation PRs.
@
text
@d1 1
a1 1
This is libgomp.info, produced by makeinfo version 6.8 from
d57 1
a57 1
File: libgomp.info,  Node: Top,  Next: Enabling OpenMP,  Up: (dir)
d5532 154
a5685 154
Node: Enabling OpenMP4725
Node: OpenMP Implementation Status5531
Node: OpenMP 4.56086
Node: OpenMP 5.06262
Node: OpenMP 5.111132
Node: Runtime Library Routines14723
Node: omp_get_active_level18428
Node: omp_get_ancestor_thread_num19128
Node: omp_get_cancellation20058
Node: omp_get_default_device20872
Node: omp_get_device_num21551
Node: omp_get_dynamic22356
Node: omp_get_initial_device23236
Node: omp_get_level23980
Node: omp_get_max_active_levels24607
Node: omp_get_max_task_priority25328
Node: omp_get_max_teams25948
Node: omp_get_max_threads26642
Node: omp_get_nested27393
Node: omp_get_num_devices29001
Node: omp_get_num_procs29522
Node: omp_get_num_teams30061
Node: omp_get_num_threads30577
Node: omp_get_proc_bind31666
Node: omp_get_schedule32689
Node: omp_get_supported_active_levels33658
Node: omp_get_team_num34444
Node: omp_get_team_size34958
Node: omp_get_teams_thread_limit35924
Node: omp_get_thread_limit36686
Node: omp_get_thread_num37314
Node: omp_in_parallel38186
Node: omp_in_final38835
Node: omp_is_initial_device39509
Node: omp_set_default_device40202
Node: omp_set_dynamic40993
Node: omp_set_max_active_levels41879
Node: omp_set_nested42801
Node: omp_set_num_teams43996
Node: omp_set_num_threads44869
Node: omp_set_schedule45740
Node: omp_set_teams_thread_limit46834
Node: omp_init_lock47836
Node: omp_set_lock48499
Node: omp_test_lock49354
Node: omp_unset_lock50330
Node: omp_destroy_lock51261
Node: omp_init_nest_lock51938
Node: omp_set_nest_lock52673
Node: omp_test_nest_lock53588
Node: omp_unset_nest_lock54615
Node: omp_destroy_nest_lock55630
Node: omp_get_wtick56381
Node: omp_get_wtime56973
Node: omp_fulfill_event57775
Node: Environment Variables58796
Node: OMP_CANCELLATION60585
Node: OMP_DISPLAY_ENV61118
Node: OMP_DEFAULT_DEVICE61821
Node: OMP_DYNAMIC62601
Node: OMP_MAX_ACTIVE_LEVELS63197
Node: OMP_MAX_TASK_PRIORITY64124
Node: OMP_NESTED64782
Node: OMP_NUM_TEAMS65809
Node: OMP_NUM_THREADS66482
Node: OMP_PROC_BIND67287
Node: OMP_PLACES68629
Node: OMP_STACKSIZE71318
Node: OMP_SCHEDULE72142
Node: OMP_TARGET_OFFLOAD72842
Node: OMP_TEAMS_THREAD_LIMIT73804
Node: OMP_THREAD_LIMIT74611
Node: OMP_WAIT_POLICY75221
Node: GOMP_CPU_AFFINITY75913
Node: GOMP_DEBUG77643
Node: GOMP_STACKSIZE78150
Node: GOMP_SPINCOUNT78981
Node: GOMP_RTEMS_THREAD_POOLS80185
Node: Enabling OpenACC82368
Node: OpenACC Runtime Library Routines83269
Node: acc_get_num_devices87550
Node: acc_set_device_type88276
Node: acc_get_device_type89040
Node: acc_set_device_num90053
Node: acc_get_device_num90870
Node: acc_get_property91669
Node: acc_async_test93892
Node: acc_async_test_all94880
Node: acc_wait95780
Node: acc_wait_all96643
Node: acc_wait_all_async97404
Node: acc_wait_async98156
Node: acc_init98864
Node: acc_shutdown99509
Node: acc_on_device100176
Node: acc_malloc101180
Node: acc_free101679
Node: acc_copyin102106
Node: acc_present_or_copyin103693
Node: acc_create105471
Node: acc_present_or_create107103
Node: acc_copyout108889
Node: acc_delete111193
Node: acc_update_device113440
Node: acc_update_self115014
Node: acc_map_data116604
Node: acc_unmap_data117289
Node: acc_deviceptr117810
Node: acc_hostptr118380
Node: acc_is_present118944
Node: acc_memcpy_to_device120471
Node: acc_memcpy_from_device121134
Node: acc_attach121801
Node: acc_detach122448
Node: acc_get_current_cuda_device123227
Node: acc_get_current_cuda_context123812
Node: acc_get_cuda_stream124412
Node: acc_set_cuda_stream125003
Node: acc_prof_register125674
Node: acc_prof_unregister126233
Node: acc_prof_lookup126800
Node: acc_register_library127321
Node: OpenACC Environment Variables127887
Node: ACC_DEVICE_TYPE128459
Node: ACC_DEVICE_NUM128695
Node: ACC_PROFLIB128949
Node: GCC_ACC_NOTIFY129280
Node: CUDA Streams Usage129500
Ref: CUDA Streams Usage-Footnote-1131401
Node: OpenACC Library Interoperability131510
Ref: OpenACC Library Interoperability-Footnote-1137878
Ref: OpenACC Library Interoperability-Footnote-2138130
Node: OpenACC Profiling Interface138338
Node: The libgomp ABI148366
Node: Implementing MASTER construct149219
Node: Implementing CRITICAL construct149636
Node: Implementing ATOMIC construct150377
Node: Implementing FLUSH construct150860
Node: Implementing BARRIER construct151133
Node: Implementing THREADPRIVATE construct151404
Node: Implementing PRIVATE clause152059
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses152642
Node: Implementing REDUCTION clause153968
Node: Implementing PARALLEL construct154528
Node: Implementing FOR construct155787
Node: Implementing ORDERED construct157787
Node: Implementing SECTIONS construct158095
Node: Implementing SINGLE construct158863
Node: Implementing OpenACC's PARALLEL construct159577
Node: Reporting Bugs159837
Node: Copying160200
Node: GNU Free Documentation License197749
Node: Funding222874
Node: Library Index225400
a5687 5


Local Variables:
coding: utf-8
End:
@


1.1.1.21
log
@initial import of GCC 12.5.0.

this is the final GCC 12 release, and fixes at least 241 specific bugs
in the GCC bugzilla:

   https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=12.5

though many are in components we don't ship in base (ada, fortran, etc.)
@
text
@d1 1
a1 1
This is libgomp.info, produced by makeinfo version 6.5 from
d57 1
a57 1
File: libgomp.info,  Node: Top,  Next: Enabling OpenMP
d5532 154
a5685 154
Node: Enabling OpenMP4713
Node: OpenMP Implementation Status5519
Node: OpenMP 4.56074
Node: OpenMP 5.06250
Node: OpenMP 5.111120
Node: Runtime Library Routines14711
Node: omp_get_active_level18416
Node: omp_get_ancestor_thread_num19116
Node: omp_get_cancellation20046
Node: omp_get_default_device20860
Node: omp_get_device_num21539
Node: omp_get_dynamic22344
Node: omp_get_initial_device23224
Node: omp_get_level23968
Node: omp_get_max_active_levels24595
Node: omp_get_max_task_priority25316
Node: omp_get_max_teams25936
Node: omp_get_max_threads26630
Node: omp_get_nested27381
Node: omp_get_num_devices28989
Node: omp_get_num_procs29510
Node: omp_get_num_teams30049
Node: omp_get_num_threads30565
Node: omp_get_proc_bind31654
Node: omp_get_schedule32677
Node: omp_get_supported_active_levels33646
Node: omp_get_team_num34432
Node: omp_get_team_size34946
Node: omp_get_teams_thread_limit35912
Node: omp_get_thread_limit36674
Node: omp_get_thread_num37302
Node: omp_in_parallel38174
Node: omp_in_final38823
Node: omp_is_initial_device39497
Node: omp_set_default_device40190
Node: omp_set_dynamic40981
Node: omp_set_max_active_levels41867
Node: omp_set_nested42789
Node: omp_set_num_teams43984
Node: omp_set_num_threads44857
Node: omp_set_schedule45728
Node: omp_set_teams_thread_limit46822
Node: omp_init_lock47824
Node: omp_set_lock48487
Node: omp_test_lock49342
Node: omp_unset_lock50318
Node: omp_destroy_lock51249
Node: omp_init_nest_lock51926
Node: omp_set_nest_lock52661
Node: omp_test_nest_lock53576
Node: omp_unset_nest_lock54603
Node: omp_destroy_nest_lock55618
Node: omp_get_wtick56369
Node: omp_get_wtime56961
Node: omp_fulfill_event57763
Node: Environment Variables58784
Node: OMP_CANCELLATION60573
Node: OMP_DISPLAY_ENV61106
Node: OMP_DEFAULT_DEVICE61809
Node: OMP_DYNAMIC62589
Node: OMP_MAX_ACTIVE_LEVELS63185
Node: OMP_MAX_TASK_PRIORITY64112
Node: OMP_NESTED64770
Node: OMP_NUM_TEAMS65797
Node: OMP_NUM_THREADS66470
Node: OMP_PROC_BIND67275
Node: OMP_PLACES68617
Node: OMP_STACKSIZE71306
Node: OMP_SCHEDULE72130
Node: OMP_TARGET_OFFLOAD72830
Node: OMP_TEAMS_THREAD_LIMIT73792
Node: OMP_THREAD_LIMIT74599
Node: OMP_WAIT_POLICY75209
Node: GOMP_CPU_AFFINITY75901
Node: GOMP_DEBUG77631
Node: GOMP_STACKSIZE78138
Node: GOMP_SPINCOUNT78969
Node: GOMP_RTEMS_THREAD_POOLS80173
Node: Enabling OpenACC82356
Node: OpenACC Runtime Library Routines83257
Node: acc_get_num_devices87538
Node: acc_set_device_type88264
Node: acc_get_device_type89028
Node: acc_set_device_num90041
Node: acc_get_device_num90858
Node: acc_get_property91657
Node: acc_async_test93880
Node: acc_async_test_all94868
Node: acc_wait95768
Node: acc_wait_all96631
Node: acc_wait_all_async97392
Node: acc_wait_async98144
Node: acc_init98852
Node: acc_shutdown99497
Node: acc_on_device100164
Node: acc_malloc101168
Node: acc_free101667
Node: acc_copyin102094
Node: acc_present_or_copyin103681
Node: acc_create105459
Node: acc_present_or_create107091
Node: acc_copyout108877
Node: acc_delete111181
Node: acc_update_device113428
Node: acc_update_self115002
Node: acc_map_data116592
Node: acc_unmap_data117277
Node: acc_deviceptr117798
Node: acc_hostptr118368
Node: acc_is_present118932
Node: acc_memcpy_to_device120459
Node: acc_memcpy_from_device121122
Node: acc_attach121789
Node: acc_detach122436
Node: acc_get_current_cuda_device123215
Node: acc_get_current_cuda_context123800
Node: acc_get_cuda_stream124400
Node: acc_set_cuda_stream124991
Node: acc_prof_register125662
Node: acc_prof_unregister126221
Node: acc_prof_lookup126788
Node: acc_register_library127309
Node: OpenACC Environment Variables127875
Node: ACC_DEVICE_TYPE128447
Node: ACC_DEVICE_NUM128683
Node: ACC_PROFLIB128937
Node: GCC_ACC_NOTIFY129268
Node: CUDA Streams Usage129488
Ref: CUDA Streams Usage-Footnote-1131389
Node: OpenACC Library Interoperability131498
Ref: OpenACC Library Interoperability-Footnote-1137866
Ref: OpenACC Library Interoperability-Footnote-2138118
Node: OpenACC Profiling Interface138326
Node: The libgomp ABI148354
Node: Implementing MASTER construct149207
Node: Implementing CRITICAL construct149624
Node: Implementing ATOMIC construct150365
Node: Implementing FLUSH construct150848
Node: Implementing BARRIER construct151121
Node: Implementing THREADPRIVATE construct151392
Node: Implementing PRIVATE clause152047
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses152630
Node: Implementing REDUCTION clause153956
Node: Implementing PARALLEL construct154516
Node: Implementing FOR construct155775
Node: Implementing ORDERED construct157775
Node: Implementing SECTIONS construct158083
Node: Implementing SINGLE construct158851
Node: Implementing OpenACC's PARALLEL construct159565
Node: Reporting Bugs159825
Node: Copying160188
Node: GNU Free Documentation License197737
Node: Funding222862
Node: Library Index225388
d5688 5
@


1.1.1.22
log
@initial import of GCC 14.3.0.

major changes in GCC 13:
- improved sanitizer
- zstd debug info compression
- LTO improvements
- SARIF based diagnostic support
- new warnings: -Wxor-used-as-pow, -Wenum-int-mismatch, -Wself-move,
  -Wdangling-reference
- many new -Wanalyzer* specific warnings
- enhanced warnings: -Wpessimizing-move, -Wredundant-move
- new attributes to mark file descriptors, c++23 "assume"
- several C23 features added
- several C++23 features added
- many new features for Arm, x86, RISC-V

major changes in GCC 14:
- more strict C99 or newer support
- ia64* marked deprecated (but seemingly still in GCC 15.)
- several new hardening features
- support for "hardbool", which can have user supplied values of true/false
- explicit support for stack scrubbing upon function exit
- better auto-vectorisation support
- added clang-compatible __has_feature and __has_extension
- more C23, including -std=c23
- several C++26 features added
- better diagnostics in C++ templates
- new warnings: -Wnrvo, Welaborated-enum-base
- many new features for Arm, x86, RISC-V
- possible ABI breaking change for SPARC64 and small structures with arrays
  of floats.
@
text
@d4 1
a4 1
Copyright (C) 2006-2024 Free Software Foundation, Inc.
d36 1
a36 1
   Copyright (C) 2006-2024 Free Software Foundation, Inc.
a95 3
* OpenMP-Implementation Specifics:: Notes specifics of this OpenMP
                               implementation
* Offload-Target Specifics::   Notes on offload-target specific internals
d114 6
a119 13
compile-time flag '-fopenmp' must be specified.  For C and C++, this
enables the handling of the OpenMP directives using '#pragma omp' and
the '[[omp::directive(...)]]', '[[omp::sequence(...)]]' and
'[[omp::decl(...)]]' attributes.  For Fortran, it enables for free
source form the '!$omp' sentinel for directives and the '!$' conditional
compilation sentinel and for fixed source form the 'c$omp', '*$omp' and
'!$omp' sentinels for directives and the 'c$', '*$' and '!$' conditional
compilation sentinels.  The flag also arranges for automatic linking of
the OpenMP runtime library (*note Runtime Library Routines::).

   The '-fopenmp-simd' flag can be used to enable a subset of OpenMP
directives that do not require the linking of either the OpenMP runtime
library or the POSIX threads library.
a135 2
* OpenMP 5.2:: Feature completion status to 5.2 specification
* OpenMP Technical Report 12:: Feature completion status to second 6.0 preview
d165 2
a166 2
'declare variant' directive                 P       _simd_ traits
                                                    not handled
d168 1
a168 1
TARGET-OFFLOAD-VAR ICV and                  Y
d171 6
a176 5
MAX-ACTIVE-LEVELS-VAR ICV
'requires' directive                        P       complete but no
                                                    non-host device
                                                    provides
                                                    'unified_shared_memory'
d179 1
a179 5
Non-rectangular loop nests                  P       Full support for
                                                    C/C++, partial
                                                    for Fortran
                                                    (PR110735
                                                    (https://gcc.gnu.org/PR110735))
d184 1
a184 1
Collapse of associated loops that are       Y
d208 2
a209 2
Predefined memory spaces, memory            Y       See also
allocators, allocator traits                        *note Memory allocation::
d211 2
a212 8
'allocate' directive                        P       Only C for
                                                    stack/automatic
                                                    and Fortran for
                                                    stack/automatic
                                                    and
                                                    allocatable/pointer
                                                    variables
'allocate' clause                           P       Initial support
d214 2
a215 1
'ancestor' modifier on 'device' clause      Y
d219 1
a219 1
C/C++'s lvalue expressions in 'to',         Y
d263 1
a263 1
File: libgomp.info,  Node: OpenMP 5.1,  Next: OpenMP 5.2,  Prev: OpenMP 5.0,  Up: OpenMP Implementation Status
d275 1
a275 1
'omp_all_memory' reserved locator           Y
d284 1
a284 1
device-specific ICV settings with           Y
d286 1
a286 1
'assume' and 'assumes' directives           Y
d293 1
a293 1
'num_tasks' clauses of the 'taskloop'
d295 3
a297 5
'align' clause in 'allocate' directive      P       Only C and
                                                    Fortran (and not
                                                    for static
                                                    variables)
'align' modifier in 'allocate' clause       Y
d302 1
a302 1
Iterators in 'target update' motion         N
d304 1
a304 1
Indirect calls to the device version of a   Y
d309 1
a309 1
'nowait' clause in 'taskwait' directive     Y
d312 1
a312 1
'inoutset' argument to the 'depend'         Y
d316 1
a316 1
'present' argument to 'defaultmap' clause   Y
d322 1
a322 1
'omp_target_is_accessible' runtime          Y
d324 1
a324 1
'omp_target_memcpy_async' and               Y
d327 1
a327 1
'omp_get_mapped_ptr' runtime routine        Y
a361 238
Support 'begin/end declare target' syntax   Y
in C/C++
Pointer predetermined firstprivate          N
getting initialized to address of
matching mapped list item per 5.1, Sect.
2.21.7.2
For Fortran, diagnose placing declarative   N
before/between 'USE', 'IMPORT', and
'IMPLICIT' as invalid
Optional comma between directive and        Y
clause in the '#pragma' form
'indirect' clause in 'declare target'       Y
'device_type(nohost)'/'device_type(host)'   N
for variables
'present' modifier to the 'map', 'to' and   Y
'from' clauses


File: libgomp.info,  Node: OpenMP 5.2,  Next: OpenMP Technical Report 12,  Prev: OpenMP 5.1,  Up: OpenMP Implementation Status

2.4 OpenMP 5.2
==============

New features listed in Appendix B of the OpenMP specification
-------------------------------------------------------------

Description                                 Status  Comments
-----------------------------------------------------------------------
'omp_in_explicit_task' routine and          Y
EXPLICIT-TASK-VAR ICV
'omp'/'ompx'/'omx' sentinels and            N/A     warning for
'omp_'/'ompx_' namespaces                           'ompx/omx'
                                                    sentinels(1)
Clauses on 'end' directive can be on        Y
directive
'destroy' clause with destroy-var           Y
argument on 'depobj'
Deprecation of no-argument 'destroy'        N
clause on 'depobj'
'linear' clause syntax changes and 'step'   Y
modifier
Deprecation of minus operator for           N
reductions
Deprecation of separating 'map' modifiers   N
without comma
'declare mapper' with iterator and          N
'present' modifiers
If a matching mapped list item is not       Y
found in the data environment, the
pointer retains its original value
New 'enter' clause as alias for 'to' on     Y
declare target directive
Deprecation of 'to' clause on declare       N
target directive
Extended list of directives permitted in    Y
Fortran pure procedures
New 'allocators' directive for Fortran      Y
Deprecation of 'allocate' directive for     N
Fortran allocatables/pointers
Optional paired 'end' directive with        N
'dispatch'
New 'memspace' and 'traits' modifiers for   N
'uses_allocators'
Deprecation of traits array following the   N
allocator_handle expression in
'uses_allocators'
New 'otherwise' clause as alias for         N
'default' on metadirectives
Deprecation of 'default' clause on          N
metadirectives
Deprecation of delimited form of 'declare   N
target'
Reproducible semantics changed for          N
'order(concurrent)'
'allocate' and 'firstprivate' clauses on    Y
'scope'
'ompt_callback_work'                        N
Default map-type for the 'map' clause in    Y
'target enter/exit data'
New 'doacross' clause as alias for          Y
'depend' with 'source'/'sink' modifier
Deprecation of 'depend' with                N
'source'/'sink' modifier
'omp_cur_iteration' keyword                 Y

Other new OpenMP 5.2 features
-----------------------------

Description                                 Status  Comments
-----------------------------------------------------------------------
For Fortran, optional comma between         N
directive and clause
Conforming device numbers and               Y
'omp_initial_device' and
'omp_invalid_device' enum/PARAMETER
Initial value of DEFAULT-DEVICE-VAR ICV     Y
with 'OMP_TARGET_OFFLOAD=mandatory'
'all' as _implicit-behavior_ for            Y
'defaultmap'
_interop_types_ in any position of the      N
modifier list for the 'init' clause of
the 'interop' construct
Invoke virtual member functions of C++      N
objects created on the host device on
other devices

   ---------- Footnotes ----------

   (1) The 'ompx' sentinel as C/C++ pragma and C++ attributes are warned
for with '-Wunknown-pragmas' (implied by '-Wall') and '-Wattributes'
(enabled by default), respectively; for Fortran free-source code, there
is a warning enabled by default and, for fixed-source code, the 'omx'
sentinel is warned for with '-Wsurprising' (enabled by '-Wall').
Unknown clauses are always rejected with an error.


File: libgomp.info,  Node: OpenMP Technical Report 12,  Prev: OpenMP 5.2,  Up: OpenMP Implementation Status

2.5 OpenMP Technical Report 12
==============================

Technical Report (TR) 12 is the second preview for OpenMP 6.0.

New features listed in Appendix B of the OpenMP specification
-------------------------------------------------------------

Features deprecated in versions 5.2, 5.1    N/A     Backward
and 5.0 were removed                                compatibility
Full support for C23 was added              P
Full support for C++23 was added            P
'_ALL' suffix to the device-scope           P       Host device
environment variables                               number wrongly
                                                    accepted
'num_threads' now accepts a list            N
Supporting increments with abstract names   N
in 'OMP_PLACES'
Extension of 'OMP_DEFAULT_DEVICE' and new   N
'OMP_AVAILABLE_DEVICES' environment vars
New 'OMP_THREADS_RESERVE' environment       N
variable
The 'decl' attribute was added to the C++   Y
attribute syntax
The OpenMP directive syntax was extended    Y
to include C 23 attribute specifiers
All inarguable clauses take now an          N
optional Boolean argument
For Fortran, _locator list_ can be also     N
function reference with data pointer
result
Concept of _assumed-size arrays_ in C and   N
C++
_directive-name-modifier_ accepted in all   N
clauses
For Fortran, atomic with BLOCK construct    N
and, for C/C++, with unlimited curly
braces supported
For Fortran, atomic compare with storing    N
the comparison result
New 'looprange' clause                      N
Ref-count change for                        N
'use_device_ptr'/'use_device_addr'
Support for inductions                      N
Implicit reduction identifiers of C++       N
classes
Change of the _map-type_ property from      N
_ultimate_ to _default_
'self' modifier to 'map' and 'self' as      N
'defaultmap' argument
Mapping of _assumed-size arrays_ in C,      N
C++ and Fortran
'groupprivate' directive                    N
'local' clause to 'declare target'          N
directive
'part_size' allocator trait                 N
'pin_device', 'preferred_device' and        N
'target_access' allocator traits
'access' allocator trait changes            N
Extension of 'interop' operation of         N
'append_args', allowing all modifiers of
the 'init' clause
'interop' clause to 'dispatch'              N
'message' and 'severity' clauses to         N
'parallel' directive
'self' clause to 'requires' directive       N
'no_openmp_constructs' assumptions clause   N
'reverse' loop-transformation construct     N
'interchange' loop-transformation           N
construct
'fuse' loop-transformation construct        N
'apply' code to loop-transforming           N
constructs
'omp_curr_progress_width' identifier        N
'safesync' clause to the 'parallel'         N
construct
'omp_get_max_progress_width' runtime        N
routine
'strict' modifier keyword to                N
'num_threads'
'atomic' permitted in a construct with      N
'order(concurrent)'
'workdistribute' directive for Fortran      N       Renamed just
                                                    after TR12;
                                                    added in TR12 as
                                                    'coexecute'
Fortran DO CONCURRENT as associated loop    N
in a 'loop' construct
'threadset' clause in task-generating       N
constructs
'nowait' clause with reverse-offload        N
'target' directives
Boolean argument to 'nowait' and            N
'nogroup' may be non constant
'memscope' clause to 'atomic' and 'flush'   N
'omp_is_free_agent' and                     N
'omp_ancestor_is_free_agent' routines
'omp_target_memset' and                     N
'omp_target_memset_rect_async' routines
Routines for obtaining memory               N
spaces/allocators for shared/device
memory
'omp_get_memspace_num_resources' routine    N
'omp_get_submemspace' routine               N
'ompt_target_data_transfer' and             N
'ompt_target_data_transfer_async' values
in 'ompt_target_data_op_t' enum
'ompt_get_buffer_limits' OMPT routine       N

Other new TR 12 features
------------------------

Canonical loop nest enclosed in             N
(multiple) curly braces (C/C++) or BLOCK
constructs (Fortran)
Relaxed Fortran restrictions to the         N
'aligned' clause
Mapping lambda captures                     N
New 'omp_pause_stop_tool' constant for      N
omp_pause_resource
d369 3
a371 2
The runtime routines described here are defined by Section 18 of the
OpenMP specification in version 5.2.
d375 2
a376 12
* Thread Team Routines::
* Thread Affinity Routines::
* Teams Region Routines::
* Tasking Routines::
* Resource Relinquishing Routines::
* Device Information Routines::
* Device Memory Routines::
* Lock Routines::
* Timing Routines::
* Event Routine::
* Memory Management Routines::
* Environment Display Routine::
d378 16
a393 12

File: libgomp.info,  Node: Thread Team Routines,  Next: Thread Affinity Routines,  Up: Runtime Library Routines

3.1 Thread Team Routines
========================

Routines controlling threads in the current contention group.  They have
C linkage and do not throw exceptions.

* Menu:

* omp_set_num_threads::         Set upper team size limit
d395 7
a401 1
* omp_get_max_threads::         Maximum number of threads of parallel region
d404 3
d408 1
a408 2
* omp_get_dynamic::             Dynamic teams setting
* omp_get_cancellation::        Whether cancellation support is enabled
d410 2
a411 1
* omp_get_nested::              Nested parallel regions
d413 1
a413 9
* omp_get_schedule::            Obtain the runtime scheduling method
* omp_get_teams_thread_limit::  Maximum number of threads imposed by teams
* omp_get_supported_active_levels:: Maximum number of active regions supported
* omp_set_max_active_levels::   Limits the number of active parallel regions
* omp_get_max_active_levels::   Current maximum number of active regions
* omp_get_level::               Number of parallel regions
* omp_get_ancestor_thread_num:: Ancestor thread ID
* omp_get_team_size::           Number of threads in a team
* omp_get_active_level::        Number of active parallel regions
d415 1
a415 2

File: libgomp.info,  Node: omp_set_num_threads,  Next: omp_get_num_threads,  Up: Thread Team Routines
d417 10
a426 2
3.1.1 'omp_set_num_threads' - Set upper team size limit
-------------------------------------------------------
d428 1
a428 4
_Description_:
     Specifies the number of threads used by default in subsequent
     parallel sections, if those do not specify a 'num_threads' clause.
     The argument of 'omp_set_num_threads' shall be a positive integer.
d430 2
a431 2
_C/C++_:
     _Prototype_:   'void omp_set_num_threads(int num_threads);'
d433 1
a433 3
_Fortran_:
     _Interface_:   'subroutine omp_set_num_threads(num_threads)'
                    'integer, intent(in) :: num_threads'
d435 1
a435 6
_See also_:
     *note OMP_NUM_THREADS::, *note omp_get_num_threads::, *note
     omp_get_max_threads::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.1.
d438 1
a438 1
File: libgomp.info,  Node: omp_get_num_threads,  Next: omp_get_max_threads,  Prev: omp_set_num_threads,  Up: Thread Team Routines
d440 2
a441 2
3.1.2 'omp_get_num_threads' - Size of the active team
-----------------------------------------------------
d444 2
a445 2
     Returns the number of threads in the current team.  In a sequential
     section of the program 'omp_get_num_threads' returns 1.
d447 2
a448 9
     The default team size may be initialized at startup by the
     'OMP_NUM_THREADS' environment variable.  At runtime, the size of
     the current team may be set either by the 'NUM_THREADS' clause or
     by 'omp_set_num_threads'.  If none of the above were used to define
     a specific value and 'OMP_DYNAMIC' is disabled, one thread per CPU
     online is used.

_C/C++_:
     _Prototype_:   'int omp_get_num_threads(void);'
d451 1
a451 1
     _Interface_:   'integer function omp_get_num_threads()'
d454 2
a455 2
     *note omp_get_max_threads::, *note omp_set_num_threads::, *note
     OMP_NUM_THREADS::
d458 1
a458 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.2.
d461 1
a461 1
File: libgomp.info,  Node: omp_get_max_threads,  Next: omp_get_thread_num,  Prev: omp_get_num_threads,  Up: Thread Team Routines
d463 2
a464 2
3.1.3 'omp_get_max_threads' - Maximum number of threads of parallel region
--------------------------------------------------------------------------
d467 4
a470 2
     Return the maximum number of threads used for the current parallel
     region that does not use the clause 'num_threads'.
d472 2
a473 2
_C/C++_:
     _Prototype_:   'int omp_get_max_threads(void);'
d476 2
a477 1
     _Interface_:   'integer function omp_get_max_threads()'
d480 2
a481 2
     *note omp_set_num_threads::, *note omp_set_dynamic::, *note
     omp_get_thread_limit::
d484 1
a484 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.3.
d487 1
a487 1
File: libgomp.info,  Node: omp_get_thread_num,  Next: omp_in_parallel,  Prev: omp_get_max_threads,  Up: Thread Team Routines
d489 2
a490 2
3.1.4 'omp_get_thread_num' - Current thread ID
----------------------------------------------
d493 4
a496 5
     Returns a unique thread identification number within the current
     team.  In a sequential parts of the program, 'omp_get_thread_num'
     always returns 0.  In parallel regions the return value varies from
     0 to 'omp_get_num_threads'-1 inclusive.  The return value of the
     primary thread of a team is always 0.
d499 1
a499 1
     _Prototype_:   'int omp_get_thread_num(void);'
d502 1
a502 1
     _Interface_:   'integer function omp_get_thread_num()'
d505 1
a505 1
     *note omp_get_num_threads::, *note omp_get_ancestor_thread_num::
d508 1
a508 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.4.
d511 1
a511 1
File: libgomp.info,  Node: omp_in_parallel,  Next: omp_set_dynamic,  Prev: omp_get_thread_num,  Up: Thread Team Routines
d513 2
a514 2
3.1.5 'omp_in_parallel' - Whether a parallel region is active
-------------------------------------------------------------
d517 1
a517 3
     This function returns 'true' if currently running in parallel,
     'false' otherwise.  Here, 'true' and 'false' represent their
     language-specific counterparts.
d520 1
a520 1
     _Prototype_:   'int omp_in_parallel(void);'
d523 4
a526 1
     _Interface_:   'logical function omp_in_parallel()'
d529 1
a529 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.6.
d532 1
a532 1
File: libgomp.info,  Node: omp_set_dynamic,  Next: omp_get_dynamic,  Prev: omp_in_parallel,  Up: Thread Team Routines
d534 2
a535 2
3.1.6 'omp_set_dynamic' - Enable/disable dynamic teams
------------------------------------------------------
d538 4
a541 4
     Enable or disable the dynamic adjustment of the number of threads
     within a team.  The function takes the language-specific equivalent
     of 'true' and 'false', where 'true' enables dynamic adjustment of
     team sizes and 'false' disables it.
d543 2
a544 2
_C/C++_:
     _Prototype_:   'void omp_set_dynamic(int dynamic_threads);'
d547 1
a547 2
     _Interface_:   'subroutine omp_set_dynamic(dynamic_threads)'
                    'logical, intent(in) :: dynamic_threads'
d550 1
a550 1
     *note OMP_DYNAMIC::, *note omp_get_dynamic::
d553 1
a553 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.7.
d556 1
a556 1
File: libgomp.info,  Node: omp_get_dynamic,  Next: omp_get_cancellation,  Prev: omp_set_dynamic,  Up: Thread Team Routines
d558 2
a559 2
3.1.7 'omp_get_dynamic' - Dynamic teams setting
-----------------------------------------------
d583 1
a583 1
File: libgomp.info,  Node: omp_get_cancellation,  Next: omp_set_nested,  Prev: omp_get_dynamic,  Up: Thread Team Routines
d585 2
a586 2
3.1.8 'omp_get_cancellation' - Whether cancellation support is enabled
----------------------------------------------------------------------
d589 3
a591 4
     This function returns 'true' if cancellation is activated, 'false'
     otherwise.  Here, 'true' and 'false' represent their
     language-specific counterparts.  Unless 'OMP_CANCELLATION' is set
     true, cancellations are deactivated.
d593 2
a594 2
_C/C++_:
     _Prototype_:   'int omp_get_cancellation(void);'
d597 1
a597 1
     _Interface_:   'logical function omp_get_cancellation()'
d600 1
a600 1
     *note OMP_CANCELLATION::
d603 1
a603 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.9.
d606 1
a606 1
File: libgomp.info,  Node: omp_set_nested,  Next: omp_get_nested,  Prev: omp_get_cancellation,  Up: Thread Team Routines
d608 2
a609 2
3.1.9 'omp_set_nested' - Enable/disable nested parallel regions
---------------------------------------------------------------
d612 2
a613 4
     Enable or disable nested parallel regions, i.e., whether team
     members are allowed to create new teams.  The function takes the
     language-specific equivalent of 'true' and 'false', where 'true'
     enables dynamic adjustment of team sizes and 'false' disables it.
d615 2
a616 10
     Enabling nested parallel regions also sets the maximum number of
     active nested regions to the maximum supported.  Disabling nested
     parallel regions sets the maximum number of active nested regions
     to one.

     Note that the 'omp_set_nested' API routine was deprecated in the
     OpenMP specification 5.2 in favor of 'omp_set_max_active_levels'.

_C/C++_:
     _Prototype_:   'void omp_set_nested(int nested);'
d619 1
a619 2
     _Interface_:   'subroutine omp_set_nested(nested)'
                    'logical, intent(in) :: nested'
d622 1
a622 2
     *note omp_get_nested::, *note omp_set_max_active_levels::, *note
     OMP_MAX_ACTIVE_LEVELS::, *note OMP_NESTED::
d625 1
a625 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.10.
d628 1
a628 1
File: libgomp.info,  Node: omp_get_nested,  Next: omp_set_schedule,  Prev: omp_set_nested,  Up: Thread Team Routines
d630 89
a718 2
3.1.10 'omp_get_nested' - Nested parallel regions
-------------------------------------------------
a739 3
     Note that the 'omp_get_nested' API routine was deprecated in the
     OpenMP specification 5.2 in favor of 'omp_get_max_active_levels'.

d747 1
a747 1
     *note omp_get_max_active_levels::, *note omp_set_nested::, *note
d754 1
a754 1
File: libgomp.info,  Node: omp_set_schedule,  Next: omp_get_schedule,  Prev: omp_get_nested,  Up: Thread Team Routines
d756 2
a757 2
3.1.11 'omp_set_schedule' - Set the runtime scheduling method
-------------------------------------------------------------
d760 1
a760 6
     Sets the runtime scheduling method.  The KIND argument can have the
     value 'omp_sched_static', 'omp_sched_dynamic', 'omp_sched_guided'
     or 'omp_sched_auto'.  Except for 'omp_sched_auto', the chunk size
     is set to the value of CHUNK_SIZE if positive, or to the default
     value if zero or negative.  For 'omp_sched_auto' the CHUNK_SIZE
     argument is ignored.
d762 2
a763 3
_C/C++_
     _Prototype_:   'void omp_set_schedule(omp_sched_t kind, int
                    chunk_size);'
d766 1
a766 6
     _Interface_:   'subroutine omp_set_schedule(kind, chunk_size)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer chunk_size'

_See also_:
     *note omp_get_schedule:: *note OMP_SCHEDULE::
d769 1
a769 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.12.
d772 1
a772 1
File: libgomp.info,  Node: omp_get_schedule,  Next: omp_get_teams_thread_limit,  Prev: omp_set_schedule,  Up: Thread Team Routines
d774 2
a775 2
3.1.12 'omp_get_schedule' - Obtain the runtime scheduling method
----------------------------------------------------------------
d778 1
a778 4
     Obtain the runtime scheduling method.  The KIND argument is set to
     'omp_sched_static', 'omp_sched_dynamic', 'omp_sched_guided' or
     'omp_sched_auto'.  The second argument, CHUNK_SIZE, is set to the
     chunk size.
d780 2
a781 3
_C/C++_
     _Prototype_:   'void omp_get_schedule(omp_sched_t *kind, int
                    *chunk_size);'
d784 1
a784 6
     _Interface_:   'subroutine omp_get_schedule(kind, chunk_size)'
                    'integer(kind=omp_sched_kind) kind'
                    'integer chunk_size'

_See also_:
     *note omp_set_schedule::, *note OMP_SCHEDULE::
d787 1
a787 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.13.
d790 1
a790 1
File: libgomp.info,  Node: omp_get_teams_thread_limit,  Next: omp_get_supported_active_levels,  Prev: omp_get_schedule,  Up: Thread Team Routines
d792 2
a793 2
3.1.13 'omp_get_teams_thread_limit' - Maximum number of threads imposed by teams
--------------------------------------------------------------------------------
d796 1
a796 2
     Return the maximum number of threads that are able to participate
     in each team created by a teams construct.
d799 1
a799 1
     _Prototype_:   'int omp_get_teams_thread_limit(void);'
d802 1
a802 4
     _Interface_:   'integer function omp_get_teams_thread_limit()'

_See also_:
     *note omp_set_teams_thread_limit::, *note OMP_TEAMS_THREAD_LIMIT::
d805 1
a805 1
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.4.6.
d808 1
a808 1
File: libgomp.info,  Node: omp_get_supported_active_levels,  Next: omp_set_max_active_levels,  Prev: omp_get_teams_thread_limit,  Up: Thread Team Routines
d810 2
a811 2
3.1.14 'omp_get_supported_active_levels' - Maximum number of active regions supported
-------------------------------------------------------------------------------------
d814 9
a822 2
     This function returns the maximum number of nested, active parallel
     regions supported by this implementation.
d824 2
a825 2
_C/C++_
     _Prototype_:   'int omp_get_supported_active_levels(void);'
d828 1
a828 1
     _Interface_:   'integer function omp_get_supported_active_levels()'
d831 2
a832 2
     *note omp_get_max_active_levels::, *note
     omp_set_max_active_levels::
d835 1
a835 1
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.2.15.
d838 1
a838 1
File: libgomp.info,  Node: omp_set_max_active_levels,  Next: omp_get_max_active_levels,  Prev: omp_get_supported_active_levels,  Up: Thread Team Routines
d840 2
a841 2
3.1.15 'omp_set_max_active_levels' - Limits the number of active parallel regions
---------------------------------------------------------------------------------
d844 6
a849 3
     This function limits the maximum allowed number of nested, active
     parallel regions.  MAX_LEVELS must be less or equal to the value
     returned by 'omp_get_supported_active_levels'.
d851 2
a852 2
_C/C++_
     _Prototype_:   'void omp_set_max_active_levels(int max_levels);'
d855 2
a856 2
     _Interface_:   'subroutine omp_set_max_active_levels(max_levels)'
                    'integer max_levels'
d859 2
a860 2
     *note omp_get_max_active_levels::, *note omp_get_active_level::,
     *note omp_get_supported_active_levels::
d863 1
a863 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.15.
d866 1
a866 1
File: libgomp.info,  Node: omp_get_max_active_levels,  Next: omp_get_level,  Prev: omp_set_max_active_levels,  Up: Thread Team Routines
d868 2
a869 2
3.1.16 'omp_get_max_active_levels' - Current maximum number of active regions
-----------------------------------------------------------------------------
d872 4
a875 2
     This function obtains the maximum allowed number of nested, active
     parallel regions.
d878 2
a879 1
     _Prototype_:   'int omp_get_max_active_levels(void);'
d882 3
a884 1
     _Interface_:   'integer function omp_get_max_active_levels()'
d887 1
a887 1
     *note omp_set_max_active_levels::, *note omp_get_active_level::
d890 1
a890 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.16.
d893 1
a893 1
File: libgomp.info,  Node: omp_get_level,  Next: omp_get_ancestor_thread_num,  Prev: omp_get_max_active_levels,  Up: Thread Team Routines
d895 2
a896 2
3.1.17 'omp_get_level' - Obtain the current nesting level
---------------------------------------------------------
d899 2
a900 2
     This function returns the nesting level for the parallel blocks,
     which enclose the calling call.
d903 1
a903 1
     _Prototype_:   'int omp_get_level(void);'
d906 1
a906 1
     _Interface_:   'integer function omp_level()'
d909 2
a910 1
     *note omp_get_active_level::
d913 1
a913 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.17.
d916 1
a916 1
File: libgomp.info,  Node: omp_get_ancestor_thread_num,  Next: omp_get_team_size,  Prev: omp_get_level,  Up: Thread Team Routines
d918 2
a919 2
3.1.18 'omp_get_ancestor_thread_num' - Ancestor thread ID
---------------------------------------------------------
d922 1
a922 4
     This function returns the thread identification number for the
     given nesting level of the current thread.  For values of LEVEL
     outside zero to 'omp_get_level' -1 is returned; if LEVEL is
     'omp_get_level' the result is identical to 'omp_get_thread_num'.
d924 2
a925 2
_C/C++_
     _Prototype_:   'int omp_get_ancestor_thread_num(int level);'
d928 1
a928 6
     _Interface_:   'integer function omp_get_ancestor_thread_num(level)'
                    'integer level'

_See also_:
     *note omp_get_level::, *note omp_get_thread_num::, *note
     omp_get_team_size::
d931 1
a931 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.18.
d934 1
a934 1
File: libgomp.info,  Node: omp_get_team_size,  Next: omp_get_active_level,  Prev: omp_get_ancestor_thread_num,  Up: Thread Team Routines
d936 2
a937 2
3.1.19 'omp_get_team_size' - Number of threads in a team
--------------------------------------------------------
d961 1
a961 1
File: libgomp.info,  Node: omp_get_active_level,  Prev: omp_get_team_size,  Up: Thread Team Routines
d963 2
a964 2
3.1.20 'omp_get_active_level' - Number of parallel regions
----------------------------------------------------------
d967 2
a968 2
     This function returns the nesting level for the active parallel
     blocks, which enclose the calling call.
d970 2
a971 2
_C/C++_
     _Prototype_:   'int omp_get_active_level(void);'
d974 1
a974 1
     _Interface_:   'integer function omp_get_active_level()'
d977 1
a977 2
     *note omp_get_level::, *note omp_get_max_active_levels::, *note
     omp_set_max_active_levels::
d980 1
a980 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.20.
d983 7
a989 1
File: libgomp.info,  Node: Thread Affinity Routines,  Next: Teams Region Routines,  Prev: Thread Team Routines,  Up: Runtime Library Routines
d991 2
a992 2
3.2 Thread Affinity Routines
============================
d994 2
a995 2
Routines controlling and accessing thread-affinity policies.  They have
C linkage and do not throw exceptions.
d997 2
a998 1
* Menu:
d1000 2
a1001 1
* omp_get_proc_bind::           Whether threads may be moved between CPUs
d1004 1
a1004 1
File: libgomp.info,  Node: omp_get_proc_bind,  Up: Thread Affinity Routines
d1006 2
a1007 2
3.2.1 'omp_get_proc_bind' - Whether threads may be moved between CPUs
---------------------------------------------------------------------
d1010 5
a1014 6
     This functions returns the currently active thread affinity policy,
     which is set via 'OMP_PROC_BIND'.  Possible values are
     'omp_proc_bind_false', 'omp_proc_bind_true',
     'omp_proc_bind_primary', 'omp_proc_bind_master',
     'omp_proc_bind_close' and 'omp_proc_bind_spread', where
     'omp_proc_bind_master' is an alias for 'omp_proc_bind_primary'.
d1017 1
a1017 1
     _Prototype_:   'omp_proc_bind_t omp_get_proc_bind(void);'
d1020 1
a1020 2
     _Interface_:   'integer(kind=omp_proc_bind_kind) function
                    omp_get_proc_bind()'
d1023 1
a1023 2
     *note OMP_PROC_BIND::, *note OMP_PLACES::, *note
     GOMP_CPU_AFFINITY::,
d1026 1
a1026 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.22.
d1029 1
a1029 1
File: libgomp.info,  Node: Teams Region Routines,  Next: Tasking Routines,  Prev: Thread Affinity Routines,  Up: Runtime Library Routines
d1031 2
a1032 20
3.3 Teams Region Routines
=========================

Routines controlling the league of teams that are executed in a 'teams'
region.  They have C linkage and do not throw exceptions.

* Menu:

* omp_get_num_teams::           Number of teams
* omp_get_team_num::            Get team number
* omp_set_num_teams::           Set upper teams limit for teams region
* omp_get_max_teams::           Maximum number of teams for teams region
* omp_set_teams_thread_limit::  Set upper thread limit for teams construct
* omp_get_thread_limit::        Maximum number of threads


File: libgomp.info,  Node: omp_get_num_teams,  Next: omp_get_team_num,  Up: Teams Region Routines

3.3.1 'omp_get_num_teams' - Number of teams
-------------------------------------------
d1035 3
a1037 1
     Returns the number of teams in the current team region.
d1040 1
a1040 1
     _Prototype_:   'int omp_get_num_teams(void);'
d1043 1
a1043 1
     _Interface_:   'integer function omp_get_num_teams()'
d1046 1
a1046 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.32.
d1049 1
a1049 1
File: libgomp.info,  Node: omp_get_team_num,  Next: omp_set_num_teams,  Prev: omp_get_num_teams,  Up: Teams Region Routines
d1051 2
a1052 2
3.3.2 'omp_get_team_num' - Get team number
------------------------------------------
d1055 3
a1057 1
     Returns the team number of the calling thread.
d1060 1
a1060 1
     _Prototype_:   'int omp_get_team_num(void);'
d1063 1
a1063 1
     _Interface_:   'integer function omp_get_team_num()'
d1066 1
a1066 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.33.
d1069 1
a1069 1
File: libgomp.info,  Node: omp_set_num_teams,  Next: omp_get_max_teams,  Prev: omp_get_team_num,  Up: Teams Region Routines
d1071 2
a1072 2
3.3.3 'omp_set_num_teams' - Set upper teams limit for teams construct
---------------------------------------------------------------------
d1075 3
a1077 3
     Specifies the upper bound for number of teams created by the teams
     construct which does not specify a 'num_teams' clause.  The
     argument of 'omp_set_num_teams' shall be a positive integer.
d1080 1
a1080 1
     _Prototype_:   'void omp_set_num_teams(int num_teams);'
d1083 1
a1083 6
     _Interface_:   'subroutine omp_set_num_teams(num_teams)'
                    'integer, intent(in) :: num_teams'

_See also_:
     *note OMP_NUM_TEAMS::, *note omp_get_num_teams::, *note
     omp_get_max_teams::
d1086 1
a1086 1
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.4.3.
d1089 1
a1089 1
File: libgomp.info,  Node: omp_get_max_teams,  Next: omp_set_teams_thread_limit,  Prev: omp_set_num_teams,  Up: Teams Region Routines
d1091 2
a1092 2
3.3.4 'omp_get_max_teams' - Maximum number of teams of teams region
-------------------------------------------------------------------
d1095 2
a1096 2
     Return the maximum number of teams used for the teams region that
     does not use the clause 'num_teams'.
d1099 1
a1099 1
     _Prototype_:   'int omp_get_max_teams(void);'
d1102 2
a1103 1
     _Interface_:   'integer function omp_get_max_teams()'
d1106 1
a1106 1
     *note omp_set_num_teams::, *note omp_get_num_teams::
d1109 1
a1109 1
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.4.4.
d1112 1
a1112 1
File: libgomp.info,  Node: omp_set_teams_thread_limit,  Next: omp_get_thread_limit,  Prev: omp_get_max_teams,  Up: Teams Region Routines
d1114 2
a1115 2
3.3.5 'omp_set_teams_thread_limit' - Set upper thread limit for teams construct
-------------------------------------------------------------------------------
d1118 4
a1121 4
     Specifies the upper bound for number of threads that are available
     for each team created by the teams construct which does not specify
     a 'thread_limit' clause.  The argument of
     'omp_set_teams_thread_limit' shall be a positive integer.
d1124 1
a1124 1
     _Prototype_:   'void omp_set_teams_thread_limit(int thread_limit);'
d1127 2
a1128 2
     _Interface_:   'subroutine omp_set_teams_thread_limit(thread_limit)'
                    'integer, intent(in) :: thread_limit'
d1131 1
a1131 2
     *note OMP_TEAMS_THREAD_LIMIT::, *note omp_get_teams_thread_limit::,
     *note omp_get_thread_limit::
d1134 1
a1134 1
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.4.5.
d1137 1
a1137 1
File: libgomp.info,  Node: omp_get_thread_limit,  Prev: omp_set_teams_thread_limit,  Up: Teams Region Routines
d1139 2
a1140 2
3.3.6 'omp_get_thread_limit' - Maximum number of threads
--------------------------------------------------------
d1143 3
a1145 1
     Return the maximum number of threads of the program.
d1147 2
a1148 2
_C/C++_:
     _Prototype_:   'int omp_get_thread_limit(void);'
d1151 2
a1152 1
     _Interface_:   'integer function omp_get_thread_limit()'
d1155 2
a1156 1
     *note omp_get_max_threads::, *note OMP_THREAD_LIMIT::
d1159 1
a1159 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.14.
d1162 1
a1162 1
File: libgomp.info,  Node: Tasking Routines,  Next: Resource Relinquishing Routines,  Prev: Teams Region Routines,  Up: Runtime Library Routines
d1164 2
a1165 2
3.4 Tasking Routines
====================
d1167 5
a1171 2
Routines relating to explicit tasks.  They have C linkage and do not
throw exceptions.
d1173 4
a1176 1
* Menu:
d1178 2
a1179 3
* omp_get_max_task_priority::   Maximum task priority value that can be set
* omp_in_explicit_task::        Whether a given task is an explicit task
* omp_in_final::                Whether in final or included task region
d1181 3
a1183 2

File: libgomp.info,  Node: omp_get_max_task_priority,  Next: omp_in_explicit_task,  Up: Tasking Routines
d1185 3
a1187 13
3.4.1 'omp_get_max_task_priority' - Maximum priority value
----------------------------------------------------------

that can be set for tasks.
_Description_:
     This function obtains the maximum allowed priority number for
     tasks.

_C/C++_
     _Prototype_:   'int omp_get_max_task_priority(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_max_task_priority()'
d1190 1
a1190 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.29.
d1193 1
a1193 1
File: libgomp.info,  Node: omp_in_explicit_task,  Next: omp_in_final,  Prev: omp_get_max_task_priority,  Up: Tasking Routines
d1195 2
a1196 2
3.4.2 'omp_in_explicit_task' - Whether a given task is an explicit task
-----------------------------------------------------------------------
d1199 3
a1201 6
     The function returns the EXPLICIT-TASK-VAR ICV; it returns true
     when the encountering task was generated by a task-generating
     construct such as 'target', 'task' or 'taskloop'.  Otherwise, the
     encountering task is in an implicit task region such as generated
     by the implicit or explicit 'parallel' region and
     'omp_in_explicit_task' returns false.
d1203 2
a1204 2
_C/C++_
     _Prototype_:   'int omp_in_explicit_task(void);'
d1207 6
a1212 1
     _Interface_:   'logical function omp_in_explicit_task()'
d1215 1
a1215 1
     OpenMP specification v5.2 (https://www.openmp.org), Section 18.5.2.
d1218 1
a1218 1
File: libgomp.info,  Node: omp_in_final,  Prev: omp_in_explicit_task,  Up: Tasking Routines
d1220 2
a1221 2
3.4.3 'omp_in_final' - Whether in final or included task region
---------------------------------------------------------------
d1224 3
a1226 3
     This function returns 'true' if currently running in a final or
     included task region, 'false' otherwise.  Here, 'true' and 'false'
     represent their language-specific counterparts.
d1229 1
a1229 1
     _Prototype_:   'int omp_in_final(void);'
d1232 6
a1237 1
     _Interface_:   'logical function omp_in_final()'
d1240 1
a1240 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.21.
d1243 1
a1243 1
File: libgomp.info,  Node: Resource Relinquishing Routines,  Next: Device Information Routines,  Prev: Tasking Routines,  Up: Runtime Library Routines
d1245 2
a1246 16
3.5 Resource Relinquishing Routines
===================================

Routines releasing resources used by the OpenMP runtime.  They have C
linkage and do not throw exceptions.

* Menu:

* omp_pause_resource:: Release OpenMP resources on a device
* omp_pause_resource_all:: Release OpenMP resources on all devices


File: libgomp.info,  Node: omp_pause_resource,  Next: omp_pause_resource_all,  Up: Resource Relinquishing Routines

3.5.1 'omp_pause_resource' - Release OpenMP resources on a device
-----------------------------------------------------------------
d1249 6
a1254 3
     Free resources used by the OpenMP program and the runtime library
     on and for the device specified by DEVICE_NUM; on success, zero is
     returned and non-zero otherwise.
d1256 3
a1258 4
     The value of DEVICE_NUM must be a conforming device number.  The
     routine may not be called from within any explicit region and all
     explicit threads that do not bind to the implicit parallel region
     have finalized execution.
d1260 4
a1263 3
_C/C++_:
     _Prototype_:   'int omp_pause_resource(omp_pause_resource_t kind, int
                    device_num);'
d1265 2
a1266 4
_Fortran_:
     _Interface_:   'integer function omp_pause_resource(kind, device_num)'
                    'integer (kind=omp_pause_resource_kind) kind'
                    'integer device_num'
d1269 1
a1269 1
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.2.43.
d1272 1
a1272 1
File: libgomp.info,  Node: omp_pause_resource_all,  Prev: omp_pause_resource,  Up: Resource Relinquishing Routines
d1274 2
a1275 2
3.5.2 'omp_pause_resource_all' - Release OpenMP resources on all devices
------------------------------------------------------------------------
d1278 4
a1281 7
     Free resources used by the OpenMP program and the runtime library
     on all devices, including the host.  On success, zero is returned
     and non-zero otherwise.

     The routine may not be called from within any explicit region and
     all explicit threads that do not bind to the implicit parallel
     region have finalized execution.
d1284 1
a1284 1
     _Prototype_:   'int omp_pause_resource(omp_pause_resource_t kind);'
d1287 2
a1288 2
     _Interface_:   'integer function omp_pause_resource(kind)'
                    'integer (kind=omp_pause_resource_kind) kind'
d1291 2
a1292 1
     *note omp_pause_resource::
d1295 1
a1295 1
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.2.44.
d1298 1
a1298 1
File: libgomp.info,  Node: Device Information Routines,  Next: Device Memory Routines,  Prev: Resource Relinquishing Routines,  Up: Runtime Library Routines
d1300 2
a1301 21
3.6 Device Information Routines
===============================

Routines related to devices available to an OpenMP program.  They have C
linkage and do not throw exceptions.

* Menu:

* omp_get_num_procs::           Number of processors online
* omp_set_default_device::      Set the default device for target regions
* omp_get_default_device::      Get the default device for target regions
* omp_get_num_devices::         Number of target devices
* omp_get_device_num::          Get device that current thread is running on
* omp_is_initial_device::       Whether executing on the host device
* omp_get_initial_device::      Device number of host device


File: libgomp.info,  Node: omp_get_num_procs,  Next: omp_set_default_device,  Up: Device Information Routines

3.6.1 'omp_get_num_procs' - Number of processors online
-------------------------------------------------------
d1304 2
a1305 1
     Returns the number of processors online on that device.
d1308 1
a1308 1
     _Prototype_:   'int omp_get_num_procs(void);'
d1311 5
a1315 1
     _Interface_:   'integer function omp_get_num_procs()'
d1318 1
a1318 1
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.5.
d1321 1
a1321 1
File: libgomp.info,  Node: omp_set_default_device,  Next: omp_get_default_device,  Prev: omp_get_num_procs,  Up: Device Information Routines
d1323 2
a1324 2
3.6.2 'omp_set_default_device' - Set the default device for target regions
--------------------------------------------------------------------------
d1327 4
a1330 2
     Set the default device for target regions without device clause.
     The argument shall be a nonnegative device number.
d1333 1
a1333 814
     _Prototype_:   'void omp_set_default_device(int device_num);'

_Fortran_:
     _Interface_:   'subroutine omp_set_default_device(device_num)'
                    'integer device_num'

_See also_:
     *note OMP_DEFAULT_DEVICE::, *note omp_get_default_device::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.29.


File: libgomp.info,  Node: omp_get_default_device,  Next: omp_get_num_devices,  Prev: omp_set_default_device,  Up: Device Information Routines

3.6.3 'omp_get_default_device' - Get the default device for target regions
--------------------------------------------------------------------------

_Description_:
     Get the default device for target regions without device clause.

_C/C++_:
     _Prototype_:   'int omp_get_default_device(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_default_device()'

_See also_:
     *note OMP_DEFAULT_DEVICE::, *note omp_set_default_device::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.30.


File: libgomp.info,  Node: omp_get_num_devices,  Next: omp_get_device_num,  Prev: omp_get_default_device,  Up: Device Information Routines

3.6.4 'omp_get_num_devices' - Number of target devices
------------------------------------------------------

_Description_:
     Returns the number of target devices.

_C/C++_:
     _Prototype_:   'int omp_get_num_devices(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_num_devices()'

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.31.


File: libgomp.info,  Node: omp_get_device_num,  Next: omp_is_initial_device,  Prev: omp_get_num_devices,  Up: Device Information Routines

3.6.5 'omp_get_device_num' - Return device number of current device
-------------------------------------------------------------------

_Description_:
     This function returns a device number that represents the device
     that the current thread is executing on.  For OpenMP 5.0, this must
     be equal to the value returned by the 'omp_get_initial_device'
     function when called from the host.

_C/C++_
     _Prototype_:   'int omp_get_device_num(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_device_num()'

_See also_:
     *note omp_get_initial_device::

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.2.37.


File: libgomp.info,  Node: omp_is_initial_device,  Next: omp_get_initial_device,  Prev: omp_get_device_num,  Up: Device Information Routines

3.6.6 'omp_is_initial_device' - Whether executing on the host device
--------------------------------------------------------------------

_Description_:
     This function returns 'true' if currently running on the host
     device, 'false' otherwise.  Here, 'true' and 'false' represent
     their language-specific counterparts.

_C/C++_:
     _Prototype_:   'int omp_is_initial_device(void);'

_Fortran_:
     _Interface_:   'logical function omp_is_initial_device()'

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.34.


File: libgomp.info,  Node: omp_get_initial_device,  Prev: omp_is_initial_device,  Up: Device Information Routines

3.6.7 'omp_get_initial_device' - Return device number of initial device
-----------------------------------------------------------------------

_Description_:
     This function returns a device number that represents the host
     device.  For OpenMP 5.1, this must be equal to the value returned
     by the 'omp_get_num_devices' function.

_C/C++_
     _Prototype_:   'int omp_get_initial_device(void);'

_Fortran_:
     _Interface_:   'integer function omp_get_initial_device()'

_See also_:
     *note omp_get_num_devices::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.2.35.


File: libgomp.info,  Node: Device Memory Routines,  Next: Lock Routines,  Prev: Device Information Routines,  Up: Runtime Library Routines

3.7 Device Memory Routines
==========================

Routines related to memory allocation and managing corresponding
pointers on devices.  They have C linkage and do not throw exceptions.

* Menu:

* omp_target_alloc:: Allocate device memory
* omp_target_free:: Free device memory
* omp_target_is_present:: Check whether storage is mapped
* omp_target_is_accessible:: Check whether memory is device accessible
* omp_target_memcpy:: Copy data between devices
* omp_target_memcpy_async:: Copy data between devices asynchronously
* omp_target_memcpy_rect:: Copy a subvolume of data between devices
* omp_target_memcpy_rect_async:: Copy a subvolume of data between devices asynchronously
* omp_target_associate_ptr:: Associate a device pointer with a host pointer
* omp_target_disassociate_ptr:: Remove device-host pointer association
* omp_get_mapped_ptr:: Return device pointer to a host pointer


File: libgomp.info,  Node: omp_target_alloc,  Next: omp_target_free,  Up: Device Memory Routines

3.7.1 'omp_target_alloc' - Allocate device memory
-------------------------------------------------

_Description_:
     This routine allocates SIZE bytes of memory in the device
     environment associated with the device number DEVICE_NUM.  If
     successful, a device pointer is returned, otherwise a null pointer.

     In GCC, when the device is the host or the device shares memory
     with the host, the memory is allocated on the host; in that case,
     when SIZE is zero, either NULL or a unique pointer value that can
     later be successfully passed to 'omp_target_free' is returned.
     When the allocation is not performed on the host, a null pointer is
     returned when SIZE is zero; in that case, additionally a diagnostic
     might be printed to standard error (stderr).

     Running this routine in a 'target' region except on the initial
     device is not supported.

_C/C++_
     _Prototype_:   'void *omp_target_alloc(size_t size, int device_num)'

_Fortran_:
     _Interface_:   'type(c_ptr) function omp_target_alloc(size, device_num)
                    bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_int,
                    c_size_t'
                    'integer(c_size_t), value :: size'
                    'integer(c_int), value :: device_num'

_See also_:
     *note omp_target_free::, *note omp_target_associate_ptr::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.1


File: libgomp.info,  Node: omp_target_free,  Next: omp_target_is_present,  Prev: omp_target_alloc,  Up: Device Memory Routines

3.7.2 'omp_target_free' - Free device memory
--------------------------------------------

_Description_:
     This routine frees memory allocated by the 'omp_target_alloc'
     routine.  The DEVICE_PTR argument must be either a null pointer or
     a device pointer returned by 'omp_target_alloc' for the specified
     'device_num'.  The device number DEVICE_NUM must be a conforming
     device number.

     Running this routine in a 'target' region except on the initial
     device is not supported.

_C/C++_
     _Prototype_:   'void omp_target_free(void *device_ptr, int device_num)'

_Fortran_:
     _Interface_:   'subroutine omp_target_free(device_ptr, device_num)
                    bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_int'
                    'type(c_ptr), value :: device_ptr'
                    'integer(c_int), value :: device_num'

_See also_:
     *note omp_target_alloc::, *note omp_target_disassociate_ptr::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.2


File: libgomp.info,  Node: omp_target_is_present,  Next: omp_target_is_accessible,  Prev: omp_target_free,  Up: Device Memory Routines

3.7.3 'omp_target_is_present' - Check whether storage is mapped
---------------------------------------------------------------

_Description_:
     This routine tests whether storage, identified by the host pointer
     PTR is mapped to the device specified by DEVICE_NUM.  If so, it
     returns a nonzero value and otherwise zero.

     In GCC, this includes self mapping such that
     'omp_target_is_present' returns _true_ when DEVICE_NUM specifies
     the host or when the host and the device share memory.  If PTR is a
     null pointer, TRUE is returned and if DEVICE_NUM is an invalid
     device number, FALSE is returned.

     If those conditions do not apply, _true_ is returned if the
     association has been established by an explicit or implicit 'map'
     clause, the 'declare target' directive or a call to the
     'omp_target_associate_ptr' routine.

     Running this routine in a 'target' region except on the initial
     device is not supported.

_C/C++_
     _Prototype_:   'int omp_target_is_present(const void *ptr,'
                    ' int device_num)'

_Fortran_:
     _Interface_:   'integer(c_int) function omp_target_is_present(ptr, &'
                    ' device_num) bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_int'
                    'type(c_ptr), value :: ptr'
                    'integer(c_int), value :: device_num'

_See also_:
     *note omp_target_associate_ptr::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.3


File: libgomp.info,  Node: omp_target_is_accessible,  Next: omp_target_memcpy,  Prev: omp_target_is_present,  Up: Device Memory Routines

3.7.4 'omp_target_is_accessible' - Check whether memory is device accessible
----------------------------------------------------------------------------

_Description_:
     This routine tests whether memory, starting at the address given by
     PTR and extending SIZE bytes, is accessibly on the device specified
     by DEVICE_NUM.  If so, it returns a nonzero value and otherwise
     zero.

     The address given by PTR is interpreted to be in the address space
     of the device and SIZE must be positive.

     Note that GCC's current implementation assumes that PTR is a valid
     host pointer.  Therefore, all addresses given by PTR are assumed to
     be accessible on the initial device.  And, to err on the safe side,
     this memory is only available on a non-host device that can access
     all host memory ([uniform] shared memory access).

     Running this routine in a 'target' region except on the initial
     device is not supported.

_C/C++_
     _Prototype_:   'int omp_target_is_accessible(const void *ptr,'
                    ' size_t size,'
                    ' int device_num)'

_Fortran_:
     _Interface_:   'integer(c_int) function omp_target_is_accessible(ptr,
                    &'
                    ' size, device_num) bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_size_t,
                    c_int'
                    'type(c_ptr), value :: ptr'
                    'integer(c_size_t), value :: size'
                    'integer(c_int), value :: device_num'

_See also_:
     *note omp_target_associate_ptr::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.4


File: libgomp.info,  Node: omp_target_memcpy,  Next: omp_target_memcpy_async,  Prev: omp_target_is_accessible,  Up: Device Memory Routines

3.7.5 'omp_target_memcpy' - Copy data between devices
-----------------------------------------------------

_Description_:
     This routine copies LENGTH of bytes of data from the device
     identified by device number SRC_DEVICE_NUM to device
     DST_DEVICE_NUM.  The data is copied from the source device from the
     address provided by SRC, shifted by the offset of SRC_OFFSET bytes,
     to the destination device's DST address shifted by DST_OFFSET.  The
     routine returns zero on success and non-zero otherwise.

     Running this routine in a 'target' region except on the initial
     device is not supported.

_C/C++_
     _Prototype_:   'int omp_target_memcpy(void *dst,'
                    ' const void *src,'
                    ' size_t length,'
                    ' size_t dst_offset,'
                    ' size_t src_offset,'
                    ' int dst_device_num,'
                    ' int src_device_num)'

_Fortran_:
     _Interface_:   'integer(c_int) function omp_target_memcpy( &'
                    ' dst, src, length, dst_offset, src_offset, &'
                    ' dst_device_num, src_device_num) bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_size_t,
                    c_int'
                    'type(c_ptr), value :: dst, src'
                    'integer(c_size_t), value :: length, dst_offset,
                    src_offset'
                    'integer(c_int), value :: dst_device_num,
                    src_device_num'

_See also_:
     *note omp_target_memcpy_async::, *note omp_target_memcpy_rect::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.5


File: libgomp.info,  Node: omp_target_memcpy_async,  Next: omp_target_memcpy_rect,  Prev: omp_target_memcpy,  Up: Device Memory Routines

3.7.6 'omp_target_memcpy_async' - Copy data between devices asynchronously
--------------------------------------------------------------------------

_Description_:
     This routine copies asynchronously LENGTH of bytes of data from the
     device identified by device number SRC_DEVICE_NUM to device
     DST_DEVICE_NUM.  The data is copied from the source device from the
     address provided by SRC, shifted by the offset of SRC_OFFSET bytes,
     to the destination device's DST address shifted by DST_OFFSET.
     Task dependence is expressed by passing an array of depend objects
     to DEPOBJ_LIST, where the number of array elements is passed as
     DEPOBJ_COUNT; if the count is zero, the DEPOBJ_LIST argument is
     ignored.  The routine returns zero if the copying process has
     successfully been started and non-zero otherwise.

     Running this routine in a 'target' region except on the initial
     device is not supported.

_C/C++_
     _Prototype_:   'int omp_target_memcpy_async(void *dst,'
                    ' const void *src,'
                    ' size_t length,'
                    ' size_t dst_offset,'
                    ' size_t src_offset,'
                    ' int dst_device_num,'
                    ' int src_device_num,'
                    ' int depobj_count,'
                    ' omp_depend_t *depobj_list)'

_Fortran_:
     _Interface_:   'integer(c_int) function omp_target_memcpy_async( &'
                    ' dst, src, length, dst_offset, src_offset, &'
                    ' dst_device_num, src_device_num, &'
                    ' depobj_count, depobj_list) bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_size_t,
                    c_int'
                    'type(c_ptr), value :: dst, src'
                    'integer(c_size_t), value :: length, dst_offset,
                    src_offset'
                    'integer(c_int), value :: dst_device_num,
                    src_device_num, depobj_count'
                    'integer(omp_depend_kind), optional :: depobj_list(*)'

_See also_:
     *note omp_target_memcpy::, *note omp_target_memcpy_rect_async::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.7


File: libgomp.info,  Node: omp_target_memcpy_rect,  Next: omp_target_memcpy_rect_async,  Prev: omp_target_memcpy_async,  Up: Device Memory Routines

3.7.7 'omp_target_memcpy_rect' - Copy a subvolume of data between devices
-------------------------------------------------------------------------

_Description_:
     This routine copies a subvolume of data from the device identified
     by device number SRC_DEVICE_NUM to device DST_DEVICE_NUM.  The
     array has NUM_DIMS dimensions and each array element has a size of
     ELEMENT_SIZE bytes.  The VOLUME array specifies how many elements
     per dimension are copied.  The full sizes of the destination and
     source arrays are given by the DST_DIMENSIONS and SRC_DIMENSIONS
     arguments, respectively.  The offset per dimension to the first
     element to be copied is given by the DST_OFFSET and SRC_OFFSET
     arguments.  The routine returns zero on success and non-zero
     otherwise.

     The OpenMP specification only requires that NUM_DIMS up to three is
     supported.  In order to find implementation-specific maximally
     supported number of dimensions, the routine returns this value when
     invoked with a null pointer to both the DST and SRC arguments.  As
     GCC supports arbitrary dimensions, it returns 'INT_MAX'.

     The device-number arguments must be conforming device numbers, the
     SRC and DST must be either both null pointers or all of the
     following must be fulfilled: ELEMENT_SIZE and NUM_DIMS must be
     positive and the VOLUME, offset and dimension arrays must have at
     least NUM_DIMS dimensions.

     Running this routine in a 'target' region is not supported except
     on the initial device.

_C/C++_
     _Prototype_:   'int omp_target_memcpy_rect(void *dst,'
                    ' const void *src,'
                    ' size_t element_size,'
                    ' int num_dims,'
                    ' const size_t *volume,'
                    ' const size_t *dst_offset,'
                    ' const size_t *src_offset,'
                    ' const size_t *dst_dimensions,'
                    ' const size_t *src_dimensions,'
                    ' int dst_device_num,'
                    ' int src_device_num)'

_Fortran_:
     _Interface_:   'integer(c_int) function omp_target_memcpy_rect( &'
                    ' dst, src, element_size, num_dims, volume, &'
                    ' dst_offset, src_offset, dst_dimensions, &'
                    ' src_dimensions, dst_device_num, src_device_num)
                    bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_size_t,
                    c_int'
                    'type(c_ptr), value :: dst, src'
                    'integer(c_size_t), value :: element_size, dst_offset,
                    src_offset'
                    'integer(c_size_t), value :: volume, dst_dimensions,
                    src_dimensions'
                    'integer(c_int), value :: num_dims, dst_device_num,
                    src_device_num'

_See also_:
     *note omp_target_memcpy_rect_async::, *note omp_target_memcpy::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.6


File: libgomp.info,  Node: omp_target_memcpy_rect_async,  Next: omp_target_associate_ptr,  Prev: omp_target_memcpy_rect,  Up: Device Memory Routines

3.7.8 'omp_target_memcpy_rect_async' - Copy a subvolume of data between devices asynchronously
----------------------------------------------------------------------------------------------

_Description_:
     This routine copies asynchronously a subvolume of data from the
     device identified by device number SRC_DEVICE_NUM to device
     DST_DEVICE_NUM.  The array has NUM_DIMS dimensions and each array
     element has a size of ELEMENT_SIZE bytes.  The VOLUME array
     specifies how many elements per dimension are copied.  The full
     sizes of the destination and source arrays are given by the
     DST_DIMENSIONS and SRC_DIMENSIONS arguments, respectively.  The
     offset per dimension to the first element to be copied is given by
     the DST_OFFSET and SRC_OFFSET arguments.  Task dependence is
     expressed by passing an array of depend objects to DEPOBJ_LIST,
     where the number of array elements is passed as DEPOBJ_COUNT; if
     the count is zero, the DEPOBJ_LIST argument is ignored.  The
     routine returns zero on success and non-zero otherwise.

     The OpenMP specification only requires that NUM_DIMS up to three is
     supported.  In order to find implementation-specific maximally
     supported number of dimensions, the routine returns this value when
     invoked with a null pointer to both the DST and SRC arguments.  As
     GCC supports arbitrary dimensions, it returns 'INT_MAX'.

     The device-number arguments must be conforming device numbers, the
     SRC and DST must be either both null pointers or all of the
     following must be fulfilled: ELEMENT_SIZE and NUM_DIMS must be
     positive and the VOLUME, offset and dimension arrays must have at
     least NUM_DIMS dimensions.

     Running this routine in a 'target' region is not supported except
     on the initial device.

_C/C++_
     _Prototype_:   'int omp_target_memcpy_rect_async(void *dst,'
                    ' const void *src,'
                    ' size_t element_size,'
                    ' int num_dims,'
                    ' const size_t *volume,'
                    ' const size_t *dst_offset,'
                    ' const size_t *src_offset,'
                    ' const size_t *dst_dimensions,'
                    ' const size_t *src_dimensions,'
                    ' int dst_device_num,'
                    ' int src_device_num,'
                    ' int depobj_count,'
                    ' omp_depend_t *depobj_list)'

_Fortran_:
     _Interface_:   'integer(c_int) function omp_target_memcpy_rect_async(
                    &'
                    ' dst, src, element_size, num_dims, volume, &'
                    ' dst_offset, src_offset, dst_dimensions, &'
                    ' src_dimensions, dst_device_num, src_device_num, &'
                    ' depobj_count, depobj_list) bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_size_t,
                    c_int'
                    'type(c_ptr), value :: dst, src'
                    'integer(c_size_t), value :: element_size, dst_offset,
                    src_offset'
                    'integer(c_size_t), value :: volume, dst_dimensions,
                    src_dimensions'
                    'integer(c_int), value :: num_dims, dst_device_num,
                    src_device_num'
                    'integer(c_int), value :: depobj_count'
                    'integer(omp_depend_kind), optional :: depobj_list(*)'

_See also_:
     *note omp_target_memcpy_rect::, *note omp_target_memcpy_async::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.8


File: libgomp.info,  Node: omp_target_associate_ptr,  Next: omp_target_disassociate_ptr,  Prev: omp_target_memcpy_rect_async,  Up: Device Memory Routines

3.7.9 'omp_target_associate_ptr' - Associate a device pointer with a host pointer
---------------------------------------------------------------------------------

_Description_:
     This routine associates storage on the host with storage on a
     device identified by DEVICE_NUM.  The device pointer is usually
     obtained by calling 'omp_target_alloc' or by other means (but not
     by using the 'map' clauses or the 'declare target' directive).  The
     host pointer should point to memory that has a storage size of at
     least SIZE.

     The DEVICE_OFFSET parameter specifies the offset into DEVICE_PTR
     that is used as the base address for the device side of the
     mapping; the storage size should be at least DEVICE_OFFSET plus
     SIZE.

     After the association, the host pointer can be used in a 'map'
     clause and in the 'to' and 'from' clauses of the 'target update'
     directive to transfer data between the associated pointers.  The
     reference count of such associated storage is infinite.  The
     association can be removed by calling 'omp_target_disassociate_ptr'
     which should be done before the lifetime of either storage ends.

     The routine returns nonzero ('EINVAL') when the DEVICE_NUM invalid,
     for when the initial device or the associated device shares memory
     with the host.  'omp_target_associate_ptr' returns zero if HOST_PTR
     points into already associated storage that is fully inside of a
     previously associated memory.  Otherwise, if the association was
     successful zero is returned; if none of the cases above apply,
     nonzero ('EINVAL') is returned.

     The 'omp_target_is_present' routine can be used to test whether
     associated storage for a device pointer exists.

     Running this routine in a 'target' region except on the initial
     device is not supported.

_C/C++_
     _Prototype_:   'int omp_target_associate_ptr(const void *host_ptr,'
                    ' const void *device_ptr,'
                    ' size_t size,'
                    ' size_t device_offset,'
                    ' int device_num)'

_Fortran_:
     _Interface_:   'integer(c_int) function
                    omp_target_associate_ptr(host_ptr, &'
                    ' device_ptr, size, device_offset, device_num) bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_int,
                    c_size_t'
                    'type(c_ptr), value :: host_ptr, device_ptr'
                    'integer(c_size_t), value :: size, device_offset'
                    'integer(c_int), value :: device_num'

_See also_:
     *note omp_target_disassociate_ptr::, *note omp_target_is_present::,
     *note omp_target_alloc::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.9


File: libgomp.info,  Node: omp_target_disassociate_ptr,  Next: omp_get_mapped_ptr,  Prev: omp_target_associate_ptr,  Up: Device Memory Routines

3.7.10 'omp_target_disassociate_ptr' - Remove device-host pointer association
-----------------------------------------------------------------------------

_Description_:
     This routine removes the storage association established by calling
     'omp_target_associate_ptr' and sets the reference count to zero,
     even if 'omp_target_associate_ptr' was invoked multiple times for
     for host pointer 'ptr'.  If applicable, the device memory needs to
     be freed by the user.

     If an associated device storage location for the DEVICE_NUM was
     found and has infinite reference count, the association is removed
     and zero is returned.  In all other cases, nonzero ('EINVAL') is
     returned and no other action is taken.

     Note that passing a host pointer where the association to the
     device pointer was established with the 'declare target' directive
     yields undefined behavior.

     Running this routine in a 'target' region except on the initial
     device is not supported.

_C/C++_
     _Prototype_:   'int omp_target_disassociate_ptr(const void *ptr,'
                    ' int device_num)'

_Fortran_:
     _Interface_:   'integer(c_int) function
                    omp_target_disassociate_ptr(ptr, &'
                    ' device_num) bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_int'
                    'type(c_ptr), value :: ptr'
                    'integer(c_int), value :: device_num'

_See also_:
     *note omp_target_associate_ptr::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.10


File: libgomp.info,  Node: omp_get_mapped_ptr,  Prev: omp_target_disassociate_ptr,  Up: Device Memory Routines

3.7.11 'omp_get_mapped_ptr' - Return device pointer to a host pointer
---------------------------------------------------------------------

_Description_:
     If the device number is refers to the initial device or to a device
     with memory accessible from the host (shared memory), the
     'omp_get_mapped_ptr' routines returns the value of the passed PTR.
     Otherwise, if associated storage to the passed host pointer PTR
     exists on device associated with DEVICE_NUM, it returns that
     pointer.  In all other cases and in cases of an error, a null
     pointer is returned.

     The association of storage location is established either via an
     explicit or implicit 'map' clause, the 'declare target' directive
     or the 'omp_target_associate_ptr' routine.

     Running this routine in a 'target' region except on the initial
     device is not supported.

_C/C++_
     _Prototype_:   'void *omp_get_mapped_ptr(const void *ptr, int
                    device_num);'

_Fortran_:
     _Interface_:   'type(c_ptr) function omp_get_mapped_ptr(ptr,
                    device_num) bind(C)'
                    'use, intrinsic :: iso_c_binding, only: c_ptr, c_int'
                    'type(c_ptr), value :: ptr'
                    'integer(c_int), value :: device_num'

_See also_:
     *note omp_target_associate_ptr::

_Reference_:
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.8.11


File: libgomp.info,  Node: Lock Routines,  Next: Timing Routines,  Prev: Device Memory Routines,  Up: Runtime Library Routines

3.8 Lock Routines
=================

Initialize, set, test, unset and destroy simple and nested locks.  The
routines have C linkage and do not throw exceptions.

* Menu:

* omp_init_lock::            Initialize simple lock
* omp_init_nest_lock::       Initialize nested lock
* omp_destroy_lock::         Destroy simple lock
* omp_destroy_nest_lock::    Destroy nested lock
* omp_set_lock::             Wait for and set simple lock
* omp_set_nest_lock::        Wait for and set simple lock
* omp_unset_lock::           Unset simple lock
* omp_unset_nest_lock::      Unset nested lock
* omp_test_lock::            Test and set simple lock if available
* omp_test_nest_lock::       Test and set nested lock if available


File: libgomp.info,  Node: omp_init_lock,  Next: omp_init_nest_lock,  Up: Lock Routines

3.8.1 'omp_init_lock' - Initialize simple lock
----------------------------------------------

_Description_:
     Initialize a simple lock.  After initialization, the lock is in an
     unlocked state.

_C/C++_:
     _Prototype_:   'void omp_init_lock(omp_lock_t *lock);'

_Fortran_:
     _Interface_:   'subroutine omp_init_lock(svar)'
                    'integer(omp_lock_kind), intent(out) :: svar'

_See also_:
     *note omp_destroy_lock::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.1.


File: libgomp.info,  Node: omp_init_nest_lock,  Next: omp_destroy_lock,  Prev: omp_init_lock,  Up: Lock Routines

3.8.2 'omp_init_nest_lock' - Initialize nested lock
---------------------------------------------------

_Description_:
     Initialize a nested lock.  After initialization, the lock is in an
     unlocked state and the nesting count is set to zero.

_C/C++_:
     _Prototype_:   'void omp_init_nest_lock(omp_nest_lock_t *lock);'

_Fortran_:
     _Interface_:   'subroutine omp_init_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(out) :: nvar'

_See also_:
     *note omp_destroy_nest_lock::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.1.


File: libgomp.info,  Node: omp_destroy_lock,  Next: omp_destroy_nest_lock,  Prev: omp_init_nest_lock,  Up: Lock Routines

3.8.3 'omp_destroy_lock' - Destroy simple lock
----------------------------------------------

_Description_:
     Destroy a simple lock.  In order to be destroyed, a simple lock
     must be in the unlocked state.

_C/C++_:
     _Prototype_:   'void omp_destroy_lock(omp_lock_t *lock);'

_Fortran_:
     _Interface_:   'subroutine omp_destroy_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'

_See also_:
     *note omp_init_lock::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.3.


File: libgomp.info,  Node: omp_destroy_nest_lock,  Next: omp_set_lock,  Prev: omp_destroy_lock,  Up: Lock Routines

3.8.4 'omp_destroy_nest_lock' - Destroy nested lock
---------------------------------------------------

_Description_:
     Destroy a nested lock.  In order to be destroyed, a nested lock
     must be in the unlocked state and its nesting count must equal
     zero.

_C/C++_:
     _Prototype_:   'void omp_destroy_nest_lock(omp_nest_lock_t *);'

_Fortran_:
     _Interface_:   'subroutine omp_destroy_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'

_See also_:
     *note omp_init_lock::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.3.


File: libgomp.info,  Node: omp_set_lock,  Next: omp_set_nest_lock,  Prev: omp_destroy_nest_lock,  Up: Lock Routines

3.8.5 'omp_set_lock' - Wait for and set simple lock
---------------------------------------------------

_Description_:
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  The calling thread is blocked until the lock
     is available.  If the lock is already held by the current thread, a
     deadlock occurs.

_C/C++_:
     _Prototype_:   'void omp_set_lock(omp_lock_t *lock);'
d1343 2
a1344 257
_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.4.


File: libgomp.info,  Node: omp_set_nest_lock,  Next: omp_unset_lock,  Prev: omp_set_lock,  Up: Lock Routines

3.8.6 'omp_set_nest_lock' - Wait for and set nested lock
--------------------------------------------------------

_Description_:
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  The calling thread is blocked until the
     lock is available.  If the lock is already held by the current
     thread, the nesting count for the lock is incremented.

_C/C++_:
     _Prototype_:   'void omp_set_nest_lock(omp_nest_lock_t *lock);'

_Fortran_:
     _Interface_:   'subroutine omp_set_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'

_See also_:
     *note omp_init_nest_lock::, *note omp_unset_nest_lock::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.4.


File: libgomp.info,  Node: omp_unset_lock,  Next: omp_unset_nest_lock,  Prev: omp_set_nest_lock,  Up: Lock Routines

3.8.7 'omp_unset_lock' - Unset simple lock
------------------------------------------

_Description_:
     A simple lock about to be unset must have been locked by
     'omp_set_lock' or 'omp_test_lock' before.  In addition, the lock
     must be held by the thread calling 'omp_unset_lock'.  Then, the
     lock becomes unlocked.  If one or more threads attempted to set the
     lock before, one of them is chosen to, again, set the lock to
     itself.

_C/C++_:
     _Prototype_:   'void omp_unset_lock(omp_lock_t *lock);'

_Fortran_:
     _Interface_:   'subroutine omp_unset_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'

_See also_:
     *note omp_set_lock::, *note omp_test_lock::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.5.


File: libgomp.info,  Node: omp_unset_nest_lock,  Next: omp_test_lock,  Prev: omp_unset_lock,  Up: Lock Routines

3.8.8 'omp_unset_nest_lock' - Unset nested lock
-----------------------------------------------

_Description_:
     A nested lock about to be unset must have been locked by
     'omp_set_nested_lock' or 'omp_test_nested_lock' before.  In
     addition, the lock must be held by the thread calling
     'omp_unset_nested_lock'.  If the nesting count drops to zero, the
     lock becomes unlocked.  If one ore more threads attempted to set
     the lock before, one of them is chosen to, again, set the lock to
     itself.

_C/C++_:
     _Prototype_:   'void omp_unset_nest_lock(omp_nest_lock_t *lock);'

_Fortran_:
     _Interface_:   'subroutine omp_unset_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'

_See also_:
     *note omp_set_nest_lock::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.5.


File: libgomp.info,  Node: omp_test_lock,  Next: omp_test_nest_lock,  Prev: omp_unset_nest_lock,  Up: Lock Routines

3.8.9 'omp_test_lock' - Test and set simple lock if available
-------------------------------------------------------------

_Description_:
     Before setting a simple lock, the lock variable must be initialized
     by 'omp_init_lock'.  Contrary to 'omp_set_lock', 'omp_test_lock'
     does not block if the lock is not available.  This function returns
     'true' upon success, 'false' otherwise.  Here, 'true' and 'false'
     represent their language-specific counterparts.

_C/C++_:
     _Prototype_:   'int omp_test_lock(omp_lock_t *lock);'

_Fortran_:
     _Interface_:   'logical function omp_test_lock(svar)'
                    'integer(omp_lock_kind), intent(inout) :: svar'

_See also_:
     *note omp_init_lock::, *note omp_set_lock::, *note omp_set_lock::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.6.


File: libgomp.info,  Node: omp_test_nest_lock,  Prev: omp_test_lock,  Up: Lock Routines

3.8.10 'omp_test_nest_lock' - Test and set nested lock if available
-------------------------------------------------------------------

_Description_:
     Before setting a nested lock, the lock variable must be initialized
     by 'omp_init_nest_lock'.  Contrary to 'omp_set_nest_lock',
     'omp_test_nest_lock' does not block if the lock is not available.
     If the lock is already held by the current thread, the new nesting
     count is returned.  Otherwise, the return value equals zero.

_C/C++_:
     _Prototype_:   'int omp_test_nest_lock(omp_nest_lock_t *lock);'

_Fortran_:
     _Interface_:   'logical function omp_test_nest_lock(nvar)'
                    'integer(omp_nest_lock_kind), intent(inout) :: nvar'

_See also_:
     *note omp_init_lock::, *note omp_set_lock::, *note omp_set_lock::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.3.6.


File: libgomp.info,  Node: Timing Routines,  Next: Event Routine,  Prev: Lock Routines,  Up: Runtime Library Routines

3.9 Timing Routines
===================

Portable, thread-based, wall clock timer.  The routines have C linkage
and do not throw exceptions.

* Menu:

* omp_get_wtick::            Get timer precision.
* omp_get_wtime::            Elapsed wall clock time.


File: libgomp.info,  Node: omp_get_wtick,  Next: omp_get_wtime,  Up: Timing Routines

3.9.1 'omp_get_wtick' - Get timer precision
-------------------------------------------

_Description_:
     Gets the timer precision, i.e., the number of seconds between two
     successive clock ticks.

_C/C++_:
     _Prototype_:   'double omp_get_wtick(void);'

_Fortran_:
     _Interface_:   'double precision function omp_get_wtick()'

_See also_:
     *note omp_get_wtime::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.4.2.


File: libgomp.info,  Node: omp_get_wtime,  Prev: omp_get_wtick,  Up: Timing Routines

3.9.2 'omp_get_wtime' - Elapsed wall clock time
-----------------------------------------------

_Description_:
     Elapsed wall clock time in seconds.  The time is measured per
     thread, no guarantee can be made that two distinct threads measure
     the same time.  Time is measured from some "time in the past",
     which is an arbitrary time guaranteed not to change during the
     execution of the program.

_C/C++_:
     _Prototype_:   'double omp_get_wtime(void);'

_Fortran_:
     _Interface_:   'double precision function omp_get_wtime()'

_See also_:
     *note omp_get_wtick::

_Reference_:
     OpenMP specification v4.5 (https://www.openmp.org), Section 3.4.1.


File: libgomp.info,  Node: Event Routine,  Next: Memory Management Routines,  Prev: Timing Routines,  Up: Runtime Library Routines

3.10 Event Routine
==================

Support for event objects.  The routine has C linkage and do not throw
exceptions.

* Menu:

* omp_fulfill_event::        Fulfill and destroy an OpenMP event.


File: libgomp.info,  Node: omp_fulfill_event,  Up: Event Routine

3.10.1 'omp_fulfill_event' - Fulfill and destroy an OpenMP event
----------------------------------------------------------------

_Description_:
     Fulfill the event associated with the event handle argument.
     Currently, it is only used to fulfill events generated by detach
     clauses on task constructs - the effect of fulfilling the event is
     to allow the task to complete.

     The result of calling 'omp_fulfill_event' with an event handle
     other than that generated by a detach clause is undefined.  Calling
     it with an event handle that has already been fulfilled is also
     undefined.

_C/C++_:
     _Prototype_:   'void omp_fulfill_event(omp_event_handle_t event);'

_Fortran_:
     _Interface_:   'subroutine omp_fulfill_event(event)'
                    'integer (kind=omp_event_handle_kind) :: event'

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.5.1.


File: libgomp.info,  Node: Memory Management Routines,  Next: Environment Display Routine,  Prev: Event Routine,  Up: Runtime Library Routines

3.11 Memory Management Routines
===============================

Routines to manage and allocate memory on the current device.  They have
C linkage and do not throw exceptions.

* Menu:

* omp_init_allocator:: Create an allocator
* omp_destroy_allocator:: Destroy an allocator
* omp_set_default_allocator:: Set the default allocator
* omp_get_default_allocator:: Get the default allocator
* omp_alloc:: Memory allocation with an allocator
* omp_aligned_alloc:: Memory allocation with an allocator and alignment
* omp_free:: Freeing memory allocated with OpenMP routines
* omp_calloc:: Allocate nullified memory with an allocator
* omp_aligned_calloc:: Allocate nullified aligned memory with an allocator
* omp_realloc:: Reallocate memory allocated with OpenMP routines
d1347 1
a1347 1
File: libgomp.info,  Node: omp_init_allocator,  Next: omp_destroy_allocator,  Up: Memory Management Routines
d1349 2
a1350 2
3.11.1 'omp_init_allocator' - Create an allocator
-------------------------------------------------
d1353 5
a1357 10
     Create an allocator that uses the specified memory space and has
     the specified traits; if an allocator that fulfills the
     requirements cannot be created, 'omp_null_allocator' is returned.

     The predefined memory spaces and available traits can be found at
     *note OMP_ALLOCATOR::, where the trait names have to be prefixed by
     'omp_atk_' (e.g.  'omp_atk_pinned') and the named trait values by
     'omp_atv_' (e.g.  'omp_atv_true'); additionally, 'omp_atv_default'
     may be used as trait value to specify that the default value should
     be used.
d1360 1
a1360 4
     _Prototype_:   'omp_allocator_handle_t omp_init_allocator('
                    ' omp_memspace_handle_t memspace,'
                    ' int ntraits,'
                    ' const omp_alloctrait_t traits[]);'
d1363 2
a1364 7
     _Interface_:   'function omp_init_allocator(memspace, ntraits, traits)'
                    'integer (omp_allocator_handle_kind) ::
                    omp_init_allocator'
                    'integer (omp_memspace_handle_kind), intent(in) ::
                    memspace'
                    'integer, intent(in) :: ntraits'
                    'type (omp_alloctrait), intent(in) :: traits(*)'
d1367 1
a1367 2
     *note OMP_ALLOCATOR::, *note Memory allocation::, *note
     omp_destroy_allocator::
d1370 1
a1370 1
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.7.2
d1373 1
a1373 1
File: libgomp.info,  Node: omp_destroy_allocator,  Next: omp_set_default_allocator,  Prev: omp_init_allocator,  Up: Memory Management Routines
d1375 2
a1376 2
3.11.2 'omp_destroy_allocator' - Destroy an allocator
-----------------------------------------------------
d1379 6
a1384 4
     Releases all resources used by a memory allocator, which must not
     represent a predefined memory allocator.  Accessing memory after
     its allocator has been destroyed has unspecified behavior.  Passing
     'omp_null_allocator' to the routine is permitted but has no effect.
d1387 1
a1387 2
     _Prototype_:   'void omp_destroy_allocator (omp_allocator_handle_t
                    allocator);'
d1390 2
a1391 3
     _Interface_:   'subroutine omp_destroy_allocator(allocator)'
                    'integer (omp_allocator_handle_kind), intent(in) ::
                    allocator'
d1394 1
a1394 1
     *note omp_init_allocator::
d1397 1
a1397 1
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.7.3
d1400 1
a1400 1
File: libgomp.info,  Node: omp_set_default_allocator,  Next: omp_get_default_allocator,  Prev: omp_destroy_allocator,  Up: Memory Management Routines
d1402 2
a1403 2
3.11.3 'omp_set_default_allocator' - Set the default allocator
--------------------------------------------------------------
d1406 2
a1407 3
     Sets the default allocator that is used when no allocator has been
     specified in the 'allocate' or 'allocator' clause or if an OpenMP
     memory routine is invoked with the 'omp_null_allocator' allocator.
d1410 1
a1410 2
     _Prototype_:   'void omp_set_default_allocator(omp_allocator_handle_t
                    allocator);'
d1413 2
a1414 3
     _Interface_:   'subroutine omp_set_default_allocator(allocator)'
                    'integer (omp_allocator_handle_kind), intent(in) ::
                    allocator'
d1417 1
a1417 2
     *note omp_get_default_allocator::, *note omp_init_allocator::,
     *note OMP_ALLOCATOR::, *note Memory allocation::
d1420 1
a1420 1
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.7.4
d1423 1
a1423 1
File: libgomp.info,  Node: omp_get_default_allocator,  Next: omp_alloc,  Prev: omp_set_default_allocator,  Up: Memory Management Routines
d1425 2
a1426 2
3.11.4 'omp_get_default_allocator' - Get the default allocator
--------------------------------------------------------------
d1429 2
a1430 4
     The routine returns the default allocator that is used when no
     allocator has been specified in the 'allocate' or 'allocator'
     clause or if an OpenMP memory routine is invoked with the
     'omp_null_allocator' allocator.
d1433 1
a1433 1
     _Prototype_:   'omp_allocator_handle_t omp_get_default_allocator();'
d1436 2
a1437 3
     _Interface_:   'function omp_get_default_allocator()'
                    'integer (omp_allocator_handle_kind) ::
                    omp_get_default_allocator'
d1440 1
a1440 1
     *note omp_set_default_allocator::, *note OMP_ALLOCATOR::
d1443 1
a1443 1
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.7.5
d1446 1
a1446 1
File: libgomp.info,  Node: omp_alloc,  Next: omp_aligned_alloc,  Prev: omp_get_default_allocator,  Up: Memory Management Routines
d1448 2
a1449 2
3.11.5 'omp_alloc' - Memory allocation with an allocator
--------------------------------------------------------
d1452 4
a1455 9
     Allocate memory with the specified allocator, which can either be a
     predefined allocator, an allocator handle or 'omp_null_allocator'.
     If the allocators is 'omp_null_allocator', the allocator specified
     by the DEF-ALLOCATOR-VAR ICV is used.  SIZE must be a nonnegative
     number denoting the number of bytes to be allocated; if SIZE is
     zero, 'omp_alloc' will return a null pointer.  If successful, a
     pointer to the allocated memory is returned, otherwise the
     'fallback' trait of the allocator determines the behavior.  The
     content of the allocated memory is unspecified.
d1457 2
a1458 15
     In 'target' regions, either the 'dynamic_allocators' clause must
     appear on a 'requires' directive in the same compilation unit - or
     the ALLOCATOR argument may only be a constant expression with the
     value of one of the predefined allocators and may not be
     'omp_null_allocator'.

     Memory allocated by 'omp_alloc' must be freed using 'omp_free'.

_C_:
     _Prototype_:   'void* omp_alloc(size_t size,'
                    ' omp_allocator_handle_t allocator)'

_C++_:
     _Prototype_:   'void* omp_alloc(size_t size,'
                    ' omp_allocator_handle_t allocator=omp_null_allocator)'
d1461 2
a1462 7
     _Interface_:   'type(c_ptr) function omp_alloc(size, allocator)
                    bind(C)'
                    'use, intrinsic :: iso_c_binding, only : c_ptr,
                    c_size_t'
                    'integer (c_size_t), value :: size'
                    'integer (omp_allocator_handle_kind), value ::
                    allocator'
d1465 1
a1465 3
     *note OMP_ALLOCATOR::, *note Memory allocation::, *note
     omp_set_default_allocator::, *note omp_free::, *note
     omp_init_allocator::
d1468 1
a1468 1
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.7.6
d1471 1
a1471 1
File: libgomp.info,  Node: omp_aligned_alloc,  Next: omp_free,  Prev: omp_alloc,  Up: Memory Management Routines
d1473 2
a1474 2
3.11.6 'omp_aligned_alloc' - Memory allocation with an allocator and alignment
------------------------------------------------------------------------------
d1477 5
a1481 13
     Allocate memory with the specified allocator, which can either be a
     predefined allocator, an allocator handle or 'omp_null_allocator'.
     If the allocators is 'omp_null_allocator', the allocator specified
     by the DEF-ALLOCATOR-VAR ICV is used.  ALIGNMENT must be a positive
     power of two and SIZE must be a nonnegative number that is a
     multiple of the alignment and denotes the number of bytes to be
     allocated; if SIZE is zero, 'omp_aligned_alloc' will return a null
     pointer.  The alignment will be at least the maximal value required
     by 'alignment' trait of the allocator and the value of the passed
     ALIGNMENT argument.  If successful, a pointer to the allocated
     memory is returned, otherwise the 'fallback' trait of the allocator
     determines the behavior.  The content of the allocated memory is
     unspecified.
d1483 2
a1484 18
     In 'target' regions, either the 'dynamic_allocators' clause must
     appear on a 'requires' directive in the same compilation unit - or
     the ALLOCATOR argument may only be a constant expression with the
     value of one of the predefined allocators and may not be
     'omp_null_allocator'.

     Memory allocated by 'omp_aligned_alloc' must be freed using
     'omp_free'.

_C_:
     _Prototype_:   'void* omp_aligned_alloc(size_t alignment,'
                    ' size_t size,'
                    ' omp_allocator_handle_t allocator)'

_C++_:
     _Prototype_:   'void* omp_aligned_alloc(size_t alignment,'
                    ' size_t size,'
                    ' omp_allocator_handle_t allocator=omp_null_allocator)'
d1487 2
a1488 7
     _Interface_:   'type(c_ptr) function omp_aligned_alloc(alignment, size,
                    allocator) bind(C)'
                    'use, intrinsic :: iso_c_binding, only : c_ptr,
                    c_size_t'
                    'integer (c_size_t), value :: alignment, size'
                    'integer (omp_allocator_handle_kind), value ::
                    allocator'
d1491 1
a1491 3
     *note OMP_ALLOCATOR::, *note Memory allocation::, *note
     omp_set_default_allocator::, *note omp_free::, *note
     omp_init_allocator::
d1494 1
a1494 1
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.13.6
d1497 1
a1497 1
File: libgomp.info,  Node: omp_free,  Next: omp_calloc,  Prev: omp_aligned_alloc,  Up: Memory Management Routines
d1499 2
a1500 2
3.11.7 'omp_free' - Freeing memory allocated with OpenMP routines
-----------------------------------------------------------------
d1503 7
a1509 7
     The 'omp_free' routine deallocates memory previously allocated by
     an OpenMP memory-management routine.  The PTR argument must point
     to such memory or be a null pointer; if it is a null pointer, no
     operation is performed.  If specified, the ALLOCATOR argument must
     be either the memory allocator that was used for the allocation or
     'omp_null_allocator'; if it is 'omp_null_allocator', the
     implementation will determine the value automatically.
d1511 2
a1512 11
     Calling 'omp_free' invokes undefined behavior if the memory was
     already deallocated or when the used allocator has already been
     destroyed.

_C_:
     _Prototype_:   'void omp_free(void *ptr,'
                    ' omp_allocator_handle_t allocator)'

_C++_:
     _Prototype_:   'void omp_free(void *ptr,'
                    ' omp_allocator_handle_t allocator=omp_null_allocator)'
d1515 2
a1516 5
     _Interface_:   'subroutine omp_free(ptr, allocator) bind(C)'
                    'use, intrinsic :: iso_c_binding, only : c_ptr'
                    'type (c_ptr), value :: ptr'
                    'integer (omp_allocator_handle_kind), value ::
                    allocator'
d1519 1
a1519 2
     *note omp_alloc::, *note omp_aligned_alloc::, *note omp_calloc::,
     *note omp_aligned_calloc::, *note omp_realloc::
d1522 1
a1522 1
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.7.7
d1525 1
a1525 1
File: libgomp.info,  Node: omp_calloc,  Next: omp_aligned_calloc,  Prev: omp_free,  Up: Memory Management Routines
d1527 2
a1528 2
3.11.8 'omp_calloc' - Allocate nullified memory with an allocator
-----------------------------------------------------------------
d1531 3
a1533 10
     Allocate zero-initialized memory with the specified allocator,
     which can either be a predefined allocator, an allocator handle or
     'omp_null_allocator'.  If the allocators is 'omp_null_allocator',
     the allocator specified by the DEF-ALLOCATOR-VAR ICV is used.  The
     to-be allocated memory is for an array with NMEMB elements, each
     having a size of SIZE bytes.  Both NMEMB and SIZE must be
     nonnegative numbers; if either of them is zero, 'omp_calloc' will
     return a null pointer.  If successful, a pointer to the
     zero-initialized allocated memory is returned, otherwise the
     'fallback' trait of the allocator determines the behavior.
d1535 2
a1536 15
     In 'target' regions, either the 'dynamic_allocators' clause must
     appear on a 'requires' directive in the same compilation unit - or
     the ALLOCATOR argument may only be a constant expression with the
     value of one of the predefined allocators and may not be
     'omp_null_allocator'.

     Memory allocated by 'omp_calloc' must be freed using 'omp_free'.

_C_:
     _Prototype_:   'void* omp_calloc(size_t nmemb, size_t size,'
                    ' omp_allocator_handle_t allocator)'

_C++_:
     _Prototype_:   'void* omp_calloc(size_t nmemb, size_t size,'
                    ' omp_allocator_handle_t allocator=omp_null_allocator)'
d1539 2
a1540 7
     _Interface_:   'type(c_ptr) function omp_calloc(nmemb, size, allocator)
                    bind(C)'
                    'use, intrinsic :: iso_c_binding, only : c_ptr,
                    c_size_t'
                    'integer (c_size_t), value :: nmemb, size'
                    'integer (omp_allocator_handle_kind), value ::
                    allocator'
d1543 1
a1543 3
     *note OMP_ALLOCATOR::, *note Memory allocation::, *note
     omp_set_default_allocator::, *note omp_free::, *note
     omp_init_allocator::
d1546 1
a1546 1
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.13.8
d1549 1
a1549 1
File: libgomp.info,  Node: omp_aligned_calloc,  Next: omp_realloc,  Prev: omp_calloc,  Up: Memory Management Routines
d1551 2
a1552 2
3.11.9 'omp_aligned_calloc' - Allocate aligned nullified memory with an allocator
---------------------------------------------------------------------------------
d1555 2
a1556 14
     Allocate zero-initialized memory with the specified allocator,
     which can either be a predefined allocator, an allocator handle or
     'omp_null_allocator'.  If the allocators is 'omp_null_allocator',
     the allocator specified by the DEF-ALLOCATOR-VAR ICV is used.  The
     to-be allocated memory is for an array with NMEMB elements, each
     having a size of SIZE bytes.  Both NMEMB and SIZE must be
     nonnegative numbers; if either of them is zero,
     'omp_aligned_calloc' will return a null pointer.  ALIGNMENT must be
     a positive power of two and SIZE must be a multiple of the
     alignment; the alignment will be at least the maximal value
     required by 'alignment' trait of the allocator and the value of the
     passed ALIGNMENT argument.  If successful, a pointer to the
     zero-initialized allocated memory is returned, otherwise the
     'fallback' trait of the allocator determines the behavior.
d1558 2
a1559 16
     In 'target' regions, either the 'dynamic_allocators' clause must
     appear on a 'requires' directive in the same compilation unit - or
     the ALLOCATOR argument may only be a constant expression with the
     value of one of the predefined allocators and may not be
     'omp_null_allocator'.

     Memory allocated by 'omp_aligned_calloc' must be freed using
     'omp_free'.

_C_:
     _Prototype_:   'void* omp_aligned_calloc(size_t nmemb, size_t size,'
                    ' omp_allocator_handle_t allocator)'

_C++_:
     _Prototype_:   'void* omp_aligned_calloc(size_t nmemb, size_t size,'
                    ' omp_allocator_handle_t allocator=omp_null_allocator)'
d1562 1
a1562 7
     _Interface_:   'type(c_ptr) function omp_aligned_calloc(nmemb, size,
                    allocator) bind(C)'
                    'use, intrinsic :: iso_c_binding, only : c_ptr,
                    c_size_t'
                    'integer (c_size_t), value :: nmemb, size'
                    'integer (omp_allocator_handle_kind), value ::
                    allocator'
d1565 1
a1565 3
     *note OMP_ALLOCATOR::, *note Memory allocation::, *note
     omp_set_default_allocator::, *note omp_free::, *note
     omp_init_allocator::
d1568 1
a1568 1
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.13.8
d1571 1
a1571 1
File: libgomp.info,  Node: omp_realloc,  Prev: omp_aligned_calloc,  Up: Memory Management Routines
d1573 2
a1574 2
3.11.10 'omp_realloc' - Reallocate memory allocated with OpenMP routines
------------------------------------------------------------------------
d1577 5
a1581 9
     The 'omp_realloc' routine deallocates memory to which PTR points to
     and allocates new memory with the specified ALLOCATOR argument; the
     new memory will have the content of the old memory up to the
     minimum of the old size and the new SIZE, otherwise the content of
     the returned memory is unspecified.  If the new allocator is the
     same as the old one, the routine tries to resize the existing
     memory allocation, returning the same address as PTR if successful.
     PTR must point to memory allocated by an OpenMP memory-management
     routine.
d1583 2
a1584 37
     The ALLOCATOR and FREE_ALLOCATOR arguments must be a predefined
     allocator, an allocator handle or 'omp_null_allocator'.  If
     FREE_ALLOCATOR is 'omp_null_allocator', the implementation
     automatically determines the allocator used for the allocation of
     PTR.  If ALLOCATOR is 'omp_null_allocator' and PTR is not a null
     pointer, the same allocator as 'free_allocator' is used and when
     PTR is a null pointer the allocator specified by the
     DEF-ALLOCATOR-VAR ICV is used.

     The SIZE must be a nonnegative number denoting the number of bytes
     to be allocated; if SIZE is zero, 'omp_realloc' will return free
     the memory and return a null pointer.  When SIZE is nonzero: if
     successful, a pointer to the allocated memory is returned,
     otherwise the 'fallback' trait of the allocator determines the
     behavior.

     In 'target' regions, either the 'dynamic_allocators' clause must
     appear on a 'requires' directive in the same compilation unit - or
     the FREE_ALLOCATOR and ALLOCATOR arguments may only be a constant
     expression with the value of one of the predefined allocators and
     may not be 'omp_null_allocator'.

     Memory allocated by 'omp_realloc' must be freed using 'omp_free'.
     Calling 'omp_free' invokes undefined behavior if the memory was
     already deallocated or when the used allocator has already been
     destroyed.

_C_:
     _Prototype_:   'void* omp_realloc(void *ptr, size_t size,'
                    ' omp_allocator_handle_t allocator,'
                    ' omp_allocator_handle_t free_allocator)'

_C++_:
     _Prototype_:   'void* omp_realloc(void *ptr, size_t size,'
                    ' omp_allocator_handle_t allocator=omp_null_allocator,'
                    ' omp_allocator_handle_t
                    free_allocator=omp_null_allocator)'
d1587 1
a1587 8
     _Interface_:   'type(c_ptr) function omp_realloc(ptr, size, allocator,
                    free_allocator) bind(C)'
                    'use, intrinsic :: iso_c_binding, only : c_ptr,
                    c_size_t'
                    'type(C_ptr), value :: ptr'
                    'integer (c_size_t), value :: size'
                    'integer (omp_allocator_handle_kind), value ::
                    allocator, free_allocator'
d1590 1
a1590 3
     *note OMP_ALLOCATOR::, *note Memory allocation::, *note
     omp_set_default_allocator::, *note omp_free::, *note
     omp_init_allocator::
d1593 1
a1593 1
     OpenMP specification v5.0 (https://www.openmp.org), Section 3.7.9
d1596 1
a1596 1
File: libgomp.info,  Node: Environment Display Routine,  Prev: Memory Management Routines,  Up: Runtime Library Routines
d1598 2
a1599 15
3.12 Environment Display Routine
================================

Routine to display the OpenMP version number and the initial value of
ICVs.  It has C linkage and does not throw exceptions.

* Menu:

* omp_display_env:: print the initial ICV values


File: libgomp.info,  Node: omp_display_env,  Up: Environment Display Routine

3.12.1 'omp_display_env' - print the initial ICV values
-------------------------------------------------------
d1602 4
a1605 5
     Each time this routine is invoked, the OpenMP version number and
     initial value of internal control variables (ICVs) is printed on
     'stderr'.  The displayed values are those at startup after
     evaluating the environment variables; later calls to API routines
     or clauses used in enclosing constructs do not affect the output.
d1607 4
a1610 27
     If the VERBOSE argument is 'false', only the OpenMP version and
     standard OpenMP ICVs are shown; if it is 'true', additionally, the
     GCC-specific ICVs are shown.

     The output consists of multiple lines and starts with 'OPENMP
     DISPLAY ENVIRONMENT BEGIN' followed by the name-value lines and
     ends with 'OPENMP DISPLAY ENVIRONMENT END'.  The NAME is followed
     by an equal sign and the VALUE is enclosed in single quotes.

     The first line has as NAME either '_OPENMP' or 'openmp_version' and
     shows as value the supported OpenMP version number (4-digit year,
     2-digit month) of the implementation, matching the value of the
     '_OPENMP' macro and, in Fortran, the named constant
     'openmp_version'.

     In each of the succeeding lines, the NAME matches the
     environment-variable name of an ICV and shows its value.  Those
     line are might be prefixed by pair of brackets and a space, where
     the brackets enclose a comma-separated list of devices to which the
     ICV-value combination applies to; the value can either be a numeric
     device number or an abstract name denoting all devices ('all'), the
     initial host device ('host') or all devices but the host
     ('device').  Note that the same ICV might be printed multiple times
     for multiple devices, even if all have the same value.

     The effect when invoked from within a 'target' region is
     unspecified.
d1613 1
a1613 1
     _Prototype_:   'void omp_display_env(int verbose)'
d1616 2
a1617 19
     _Interface_:   'subroutine omp_display_env(vebose)'
                    'logical, intent(in) :: verbose'

_Example_:
     Note that the GCC-specific ICVs, such as the shown
     'GOMP_SPINCOUNT', are only printed when VARBOSE set to 'true'.

          OPENMP DISPLAY ENVIRONMENT BEGIN
            _OPENMP = '201511'
            [host] OMP_DYNAMIC = 'FALSE'
            [host] OMP_NESTED = 'FALSE'
            [all] OMP_CANCELLATION = 'FALSE'
            ...
            [host] GOMP_SPINCOUNT = '300000'
          OPENMP DISPLAY ENVIRONMENT END

_See also_:
     *note OMP_DISPLAY_ENV::, *note Environment Variables::, *note
     Implementation-defined ICV Initialization::
d1620 1
a1620 1
     OpenMP specification v5.1 (https://www.openmp.org), Section 3.15
d1629 2
a1630 15
section 4 of the OpenMP specification in version 4.5 or in a later
version of the specification, while those beginning with 'GOMP_' are GNU
extensions.  Most 'OMP_' environment variables have an associated
internal control variable (ICV).

   For any OpenMP environment variable that sets an ICV and is neither
'OMP_DEFAULT_DEVICE' nor has global ICV scope, associated
device-specific environment variables exist.  For them, the environment
variable without suffix affects the host.  The suffix '_DEV_' followed
by a non-negative device number less that the number of available
devices sets the ICV for the corresponding device.  The suffix '_DEV'
sets the ICV of all non-host devices for which a device-specific
corresponding environment variable has not been set while the '_ALL'
suffix sets the ICV of all host and non-host devices for which a more
specific corresponding environment variable is not set.
a1633 2
* OMP_ALLOCATOR::           Set the default allocator
* OMP_AFFINITY_FORMAT::     Set the format string used for affinity display
a1634 1
* OMP_DISPLAY_AFFINITY::    Display thread affinity information
d1647 1
a1647 1
* OMP_TARGET_OFFLOAD::      Controls offloading behavior
d1658 1
a1658 139
File: libgomp.info,  Node: OMP_ALLOCATOR,  Next: OMP_AFFINITY_FORMAT,  Up: Environment Variables

4.1 'OMP_ALLOCATOR' - Set the default allocator
===============================================

_ICV:_ DEF-ALLOCATOR-VAR
_Scope:_ data environment
_Description_:
     Sets the default allocator that is used when no allocator has been
     specified in the 'allocate' or 'allocator' clause or if an OpenMP
     memory routine is invoked with the 'omp_null_allocator' allocator.
     If unset, 'omp_default_mem_alloc' is used.

     The value can either be a predefined allocator or a predefined
     memory space or a predefined memory space followed by a colon and a
     comma-separated list of memory trait and value pairs, separated by
     '='.

     Note: The corresponding device environment variables are currently
     not supported.  Therefore, the non-host DEF-ALLOCATOR-VAR ICVs are
     always initialized to 'omp_default_mem_alloc'.  However, on all
     devices, the 'omp_set_default_allocator' API routine can be used to
     change value.

     Predefined allocators            Associated predefined memory
                                      spaces
     ------------------------------------------------------------------
     omp_default_mem_alloc            omp_default_mem_space
     omp_large_cap_mem_alloc          omp_large_cap_mem_space
     omp_const_mem_alloc              omp_const_mem_space
     omp_high_bw_mem_alloc            omp_high_bw_mem_space
     omp_low_lat_mem_alloc            omp_low_lat_mem_space
     omp_cgroup_mem_alloc             omp_low_lat_mem_space
                                      (implementation defined)
     omp_pteam_mem_alloc              omp_low_lat_mem_space
                                      (implementation defined)
     omp_thread_mem_alloc             omp_low_lat_mem_space
                                      (implementation defined)

     The predefined allocators use the default values for the traits, as
     listed below.  Except that the last three allocators have the
     'access' trait set to 'cgroup', 'pteam', and 'thread',
     respectively.

     Trait              Allowed values                Default value
     --------------------------------------------------------------------
     'sync_hint'        'contended', 'uncontended',   'contended'
                        'serialized', 'private'
     'alignment'        Positive integer being a      1 byte
                        power of two
     'access'           'all', 'cgroup', 'pteam',     'all'
                        'thread'
     'pool_size'        Positive integer              See
                                                      *note Memory allocation::
     'fallback'         'default_mem_fb',             See below
                        'null_fb', 'abort_fb',
                        'allocator_fb'
     'fb_data'          _unsupported as it needs an   (none)
                        allocator handle_
     'pinned'           'true', 'false'               'false'
     'partition'        'environment', 'nearest',     'environment'
                        'blocked', 'interleaved'

     For the 'fallback' trait, the default value is 'null_fb' for the
     'omp_default_mem_alloc' allocator and any allocator that is
     associated with device memory; for all other allocators, it is
     'default_mem_fb' by default.

     Examples:
          OMP_ALLOCATOR=omp_high_bw_mem_alloc
          OMP_ALLOCATOR=omp_large_cap_mem_space
          OMP_ALLOCATOR=omp_low_lat_mem_space:pinned=true,partition=nearest

_See also_:
     *note Memory allocation::, *note omp_get_default_allocator::, *note
     omp_set_default_allocator::, *note Offload-Target Specifics::

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 6.21


File: libgomp.info,  Node: OMP_AFFINITY_FORMAT,  Next: OMP_CANCELLATION,  Prev: OMP_ALLOCATOR,  Up: Environment Variables

4.2 'OMP_AFFINITY_FORMAT' - Set the format string used for affinity display
===========================================================================

_ICV:_ AFFINITY-FORMAT-VAR
_Scope:_ device
_Description_:
     Sets the format string used when displaying OpenMP thread affinity
     information.  Special values are output using '%' followed by an
     optional size specification and then either the single-character
     field type or its long name enclosed in curly braces; using '%%'
     displays a literal percent.  The size specification consists of an
     optional '0.' or '.' followed by a positive integer, specifying the
     minimal width of the output.  With '0.' and numerical values, the
     output is padded with zeros on the left; with '.', the output is
     padded by spaces on the left; otherwise, the output is padded by
     spaces on the right.  If unset, the value is "'level %L thread %i
     affinity %A'".

     Supported field types are:

     t       team_num           value returned by 'omp_get_team_num'
     T       num_teams          value returned by 'omp_get_num_teams'
     L       nesting_level      value returned by 'omp_get_level'
     n       thread_num         value returned by 'omp_get_thread_num'
     N       num_threads        value returned by 'omp_get_num_threads'
     a       ancestor_tnum      value returned by
                                'omp_get_ancestor_thread_num(omp_get_level()-1)'
     H       host               name of the host that executes the thread
     P       process_id         process identifier
     i       native_thread_id   native thread identifier
     A       thread_affinity    comma separated list of integer values or
                                ranges, representing the processors on
                                which a process might execute, subject to
                                affinity mechanisms

     For instance, after setting

          OMP_AFFINITY_FORMAT="%0.2a!%n!%.4L!%N;%.2t;%0.2T;%{team_num};%{num_teams};%A"

     with either 'OMP_DISPLAY_AFFINITY' being set or when calling
     'omp_display_affinity' with 'NULL' or an empty string, the program
     might display the following:

          00!0!   1!4; 0;01;0;1;0-11
          00!3!   1!4; 0;01;0;1;0-11
          00!2!   1!4; 0;01;0;1;0-11
          00!1!   1!4; 0;01;0;1;0-11

_See also_:
     *note OMP_DISPLAY_AFFINITY::

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 6.14


File: libgomp.info,  Node: OMP_CANCELLATION,  Next: OMP_DISPLAY_AFFINITY,  Prev: OMP_AFFINITY_FORMAT,  Up: Environment Variables
d1660 1
a1660 1
4.3 'OMP_CANCELLATION' - Set whether cancellation is activated
a1662 2
_ICV:_ CANCEL-VAR
_Scope:_ global
d1675 1
a1675 21
File: libgomp.info,  Node: OMP_DISPLAY_AFFINITY,  Next: OMP_DISPLAY_ENV,  Prev: OMP_CANCELLATION,  Up: Environment Variables

4.4 'OMP_DISPLAY_AFFINITY' - Display thread affinity information
================================================================

_ICV:_ DISPLAY-AFFINITY-VAR
_Scope:_ global
_Description_:
     If set to 'FALSE' or if unset, affinity displaying is disabled.  If
     set to 'TRUE', the runtime displays affinity information about
     OpenMP threads in a parallel region upon entering the region and
     every time any change occurs.

_See also_:
     *note OMP_AFFINITY_FORMAT::

_Reference_:
     OpenMP specification v5.0 (https://www.openmp.org), Section 6.13


File: libgomp.info,  Node: OMP_DISPLAY_ENV,  Next: OMP_DEFAULT_DEVICE,  Prev: OMP_DISPLAY_AFFINITY,  Up: Environment Variables
d1677 1
a1677 1
4.5 'OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
a1679 2
_ICV:_ none
_Scope:_ not applicable
d1681 5
a1685 9
     If set to 'TRUE', the runtime displays the same information to
     'stderr' as shown by the 'omp_display_env' routine invoked with
     VERBOSE argument set to 'false'.  If set to 'VERBOSE', the same
     information is shown as invoking the routine with VERBOSE set to
     'true'.  If unset or set to 'FALSE', this information is not shown.
     The result for any other value is unspecified.

_See also_:
     *note omp_display_env::
d1693 1
a1693 1
4.6 'OMP_DEFAULT_DEVICE' - Set the device used in target regions
a1695 2
_ICV:_ DEFAULT-DEVICE-VAR
_Scope:_ data environment
d1701 1
a1701 4
     executed on the host.  If unset, 'OMP_TARGET_OFFLOAD' is
     'mandatory' and no non-host devices are available, it is set to
     'omp_invalid_device'.  Otherwise, if unset, device number 0 is
     used.
a1704 1
     *note OMP_TARGET_OFFLOAD::
d1707 1
a1707 1
     OpenMP specification v5.2 (https://www.openmp.org), Section 21.2.7
d1712 1
a1712 1
4.7 'OMP_DYNAMIC' - Dynamic adjustment of threads
a1714 2
_ICV:_ DYN-VAR
_Scope:_ global
d1730 1
a1730 1
4.8 'OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
a1732 2
_ICV:_ MAX-ACTIVE-LEVELS-VAR
_Scope:_ data environment
d1739 2
a1740 2
     parallel regions is initialized to the largest number supported,
     otherwise it is set to one.
d1743 1
a1743 2
     *note omp_set_max_active_levels::, *note OMP_NESTED::, *note
     OMP_PROC_BIND::, *note OMP_NUM_THREADS::
d1751 1
a1751 1
4.9 'OMP_MAX_TASK_PRIORITY' - Set the maximum priority
a1754 2
_ICV:_ MAX-TASK-PRIORITY-VAR
_Scope:_ global
d1770 2
a1771 2
4.10 'OMP_NESTED' - Nested parallel regions
===========================================
a1772 2
_ICV:_ MAX-ACTIVE-LEVELS-VAR
_Scope:_ data environment
d1777 7
a1783 10
     the number of maximum active nested regions supported is by default
     set to the maximum supported, otherwise it is set to one.  If
     'OMP_MAX_ACTIVE_LEVELS' is defined, its setting overrides this
     setting.  If both are undefined, nested parallel regions are
     enabled if 'OMP_NUM_THREADS' or 'OMP_PROC_BINDS' are defined to a
     list with more than one item, otherwise they are disabled by
     default.

     Note that the 'OMP_NESTED' environment variable was deprecated in
     the OpenMP specification 5.2 in favor of 'OMP_MAX_ACTIVE_LEVELS'.
d1786 1
a1786 2
     *note omp_set_max_active_levels::, *note omp_set_nested::, *note
     OMP_MAX_ACTIVE_LEVELS::
d1794 2
a1795 2
4.11 'OMP_NUM_TEAMS' - Specifies the number of teams to use by teams region
===========================================================================
a1796 2
_ICV:_ NTEAMS-VAR
_Scope:_ device
d1812 2
a1813 2
4.12 'OMP_NUM_THREADS' - Specifies the number of threads to use
===============================================================
a1814 2
_ICV:_ NTHREADS-VAR
_Scope:_ data environment
d1820 2
a1821 6
     in the list automatically enables nesting by default.  If undefined
     one thread per CPU is used.

     When a list with more than value is specified, it also affects the
     MAX-ACTIVE-LEVELS-VAR ICV as described in *note
     OMP_MAX_ACTIVE_LEVELS::.
d1824 1
a1824 1
     *note omp_set_num_threads::, *note OMP_MAX_ACTIVE_LEVELS::
d1832 1
a1832 1
4.13 'OMP_PROC_BIND' - Whether threads may be moved between CPUs
a1834 2
_ICV:_ BIND-VAR
_Scope:_ data environment
d1845 2
a1846 5
     is used.  Specifying more than one item in the list automatically
     enables nesting by default.

     When a list is specified, it also affects the MAX-ACTIVE-LEVELS-VAR
     ICV as described in *note OMP_MAX_ACTIVE_LEVELS::.
d1853 1
a1853 1
     OMP_PLACES::, *note OMP_MAX_ACTIVE_LEVELS::
d1861 1
a1861 1
4.14 'OMP_PLACES' - Specifies on which CPUs the threads should be placed
a1863 2
_ICV:_ PLACE-PARTITION-VAR
_Scope:_ implicit tasks
d1892 1
a1892 1
     intervals) excludes those hardware threads.
d1912 1
a1912 1
4.15 'OMP_STACKSIZE' - Set default thread stack size
a1914 2
_ICV:_ STACKSIZE-VAR
_Scope:_ device
a1924 3
_See also_:
     *note GOMP_STACKSIZE::

d1931 1
a1931 1
4.16 'OMP_SCHEDULE' - How threads are scheduled
a1933 2
_ICV:_ RUN-SCHED-VAR
_Scope:_ data environment
d1951 2
a1952 2
4.17 'OMP_TARGET_OFFLOAD' - Controls offloading behavior
========================================================
a1953 2
_ICV:_ TARGET-OFFLOAD-VAR
_Scope:_ global
d1955 1
a1955 1
     Specifies the behavior with regard to offloading code to a device.
d1959 6
a1964 9
     If set to 'MANDATORY', the program terminates with an error if any
     device construct or device memory routine uses a device that is
     unavailable or not supported by the implementation, or uses a
     non-conforming device number.  If set to 'DISABLED', then
     offloading is disabled and all code runs on the host.  If set to
     'DEFAULT', the program tries offloading to the device first, then
     falls back to running code on the host if it cannot.

     If undefined, then the program behaves as if 'DEFAULT' was set.
d1966 1
a1966 8
     Note: Even with 'MANDATORY', no run-time termination is performed
     when the device number in a 'device' clause or argument to a device
     memory routine is for host, which includes using the device number
     in the DEFAULT-DEVICE-VAR ICV. However, the initial value of the
     DEFAULT-DEVICE-VAR ICV is affected by 'MANDATORY'.

_See also_:
     *note OMP_DEFAULT_DEVICE::
d1969 1
a1969 1
     OpenMP specification v5.2 (https://www.openmp.org), Section 21.2.8
d1974 1
a1974 1
4.18 'OMP_TEAMS_THREAD_LIMIT' - Set the maximum number of threads imposed by teams
a1976 2
_ICV:_ TEAMS-THREAD-LIMIT-VAR
_Scope:_ device
d1993 1
a1993 1
4.19 'OMP_THREAD_LIMIT' - Set the maximum number of threads
a1995 2
_ICV:_ THREAD-LIMIT-VAR
_Scope:_ data environment
d2010 1
a2010 1
4.20 'OMP_WAIT_POLICY' - How waiting threads are handled
d2029 1
a2029 1
4.21 'GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
d2038 4
a2041 4
     'GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' binds the initial thread to
     CPU 0, the second to CPU 3, the third to CPU 1, the fourth to CPU
     2, the fifth to CPU 4, the sixth through tenth to CPUs 6, 8, 10,
     12, and 14 respectively and then starts assigning back from the
d2056 2
a2057 1
     'FALSE', the host system handles the assignment of threads to CPUs.
d2065 1
a2065 1
4.22 'GOMP_DEBUG' - Enable debugging output
d2072 1
a2072 1
     If enabled, some debugging output is printed during execution.
d2079 1
a2079 1
4.23 'GOMP_STACKSIZE' - Set default thread stack size
d2101 1
a2101 1
4.24 'GOMP_SPINCOUNT' - Set the busy-wait spin count
d2125 1
a2125 1
4.25 'GOMP_RTEMS_THREAD_POOLS' - Set the RTEMS specific thread pools
d2138 5
a2142 5
          case a priority value is omitted, then a worker thread
          inherits the priority of the OpenMP primary thread that
          created it.  The priority of the worker thread is not changed
          after creation, even if a new OpenMP primary thread using the
          worker has a different priority.
d2147 3
a2149 3
     instance uses its own dynamically allocated thread pool.  To limit
     the worker thread count of the thread pools, each OpenMP primary
     thread must call 'omp_set_num_threads'.
d2169 6
a2174 5
OpenACC directive '#pragma acc' in C/C++ and, in Fortran, the '!$acc'
sentinel in free source form and the 'c$acc', '*$acc' and '!$acc'
sentinels in fixed source form.  The flag also arranges for automatic
linking of the OpenACC runtime library (*note OpenACC Runtime Library
Routines::).
d2400 2
a2401 2
     'acc_device_property' is still provided, but might be removed in a
     future version of GCC.
d2434 4
a2437 4
     specified in ARG.  In C/C++, a non-zero value is returned to
     indicate the specified asynchronous operation has completed while
     Fortran returns 'true'.  If the asynchronous operation has not
     completed, C/C++ returns zero and Fortran returns 'false'.
d2459 4
a2462 4
     In C/C++, a non-zero value is returned to indicate all asynchronous
     operations have completed while Fortran returns 'true'.  If any
     asynchronous operation has not completed, C/C++ returns zero and
     Fortran returns 'false'.
d2624 3
a2626 3
     specified device type.  In Fortran, 'true' is returned.  If the
     program is not executing on the specified device type C/C++ returns
     zero, while Fortran returns 'false'.
d2647 2
a2648 2
     This function allocates BYTES bytes of device memory.  It returns
     the device address of the allocated memory.
d2651 1
a2651 5
     _Prototype_:   'd_void* acc_malloc(size_t bytes);'

_Fortran_:
     _Interface_:   'type(c_ptr) function acc_malloc(bytes)'
                    'integer(c_size_t), value :: bytes'
d2655 1
a2655 2
     3.2.18.  openacc specification v3.3 (https://www.openacc.org),
     section 3.2.16.
d2664 1
a2664 2
     Free previously allocated device memory at the device address
     'data_dev'.
d2667 1
a2667 5
     _Prototype_:   'void acc_free(d_void *data_dev);'

_Fortran_:
     _Interface_:   'subroutine acc_free(data_dev)'
                    'type(c_ptr), value :: data_dev'
d2671 1
a2671 2
     3.2.19.  openacc specification v3.3 (https://www.openacc.org),
     section 3.2.17.
d2719 3
a2721 3
     LEN is present or not.  If it is not present, device memory is
     allocated and the host memory copied.  The device address of the
     newly allocated device memory is returned.
d2798 3
a2800 3
     LEN is present or not.  If it is not present, device memory is
     allocated and mapped to host memory.  In C/C++, the device address
     of the newly allocated device memory is returned.
d3015 2
a3016 3
     The device memory is specified with the device address DATA_DEV.
     The host memory is specified with the host address DATA_ARG and a
     length of BYTES.
d3019 1
a3019 8
     _Prototype_:   'void acc_map_data(h_void *data_arg, d_void *data_dev,
                    size_t bytes);'

_Fortran_:
     _Interface_:   'subroutine acc_map_data(data_arg, data_dev, bytes)'
                    'type(*), dimension(*) :: data_arg'
                    'type(c_ptr), value :: data_dev'
                    'integer(c_size_t), value :: bytes'
d3023 1
a3023 2
     3.2.26.  OpenACC specification v3.3 (https://www.openacc.org),
     section 3.2.21.
d3033 1
a3033 1
     latter specified by DATA_ARG.
d3036 1
a3036 5
     _Prototype_:   'void acc_unmap_data(h_void *data_arg);'

_Fortran_:
     _Interface_:   'subroutine acc_unmap_data(data_arg)'
                    'type(*), dimension(*) :: data_arg'
d3040 1
a3040 2
     3.2.27.  OpenACC specification v3.3 (https://www.openacc.org),
     section 3.2.22.
d3050 1
a3050 1
     the host address specified by DATA_ARG.
d3053 1
a3053 5
     _Prototype_:   'void *acc_deviceptr(h_void *data_arg);'

_Fortran_:
     _Interface_:   'type(c_ptr) function acc_deviceptr(data_arg)'
                    'type(*), dimension(*) :: data_arg'
d3057 1
a3057 2
     3.2.28.  OpenACC specification v3.3 (https://www.openacc.org),
     section 3.2.23.
d3067 1
a3067 1
     device address specified by DATA_DEV.
d3070 1
a3070 5
     _Prototype_:   'void *acc_hostptr(d_void *data_dev);'

_Fortran_:
     _Interface_:   'type(c_ptr) function acc_hostptr(data_dev)'
                    'type(c_ptr), value :: data_dev'
d3074 1
a3074 2
     3.2.29.  OpenACC specification v3.3 (https://www.openacc.org),
     section 3.2.24.
d3119 7
a3125 19
     This function copies host memory specified by host address of
     DATA_HOST_SRC to device memory specified by the device address
     DATA_DEV_DEST for a length of BYTES bytes.

_C/C++_:
     _Prototype_:   'void acc_memcpy_to_device(d_void* data_dev_dest,'
                    'h_void* data_host_src, size_t bytes);'
     _Prototype_:   'void acc_memcpy_to_device_async(d_void* data_dev_dest,'
                    'h_void* data_host_src, size_t bytes, int async_arg);'

_Fortran_:
     _Interface_:   'subroutine acc_memcpy_to_device(data_dev_dest, &'
                    'data_host_src, bytes)'
     _Interface_:   'subroutine acc_memcpy_to_device_async(data_dev_dest, &'
                    'data_host_src, bytes, async_arg)'
                    'type(c_ptr), value :: data_dev_dest'
                    'type(*), dimension(*) :: data_host_src'
                    'integer(c_size_t), value :: bytes'
                    'integer(acc_handle_kind), value :: async_arg'
d3129 1
a3129 2
     3.2.31 OpenACC specification v3.3 (https://www.openacc.org),
     section 3.2.26.
d3138 7
a3144 21
     This function copies device memory specified by device address of
     DATA_DEV_SRC to host memory specified by the host address
     DATA_HOST_DEST for a length of BYTES bytes.

_C/C++_:
     _Prototype_:   'void acc_memcpy_from_device(h_void* data_host_dest,'
                    'd_void* data_dev_src, size_t bytes);'
     _Prototype_:   'void acc_memcpy_from_device_async(h_void*
                    data_host_dest,'
                    'd_void* data_dev_src, size_t bytes, int async_arg);'

_Fortran_:
     _Interface_:   'subroutine acc_memcpy_from_device(data_host_dest, &'
                    'data_dev_src, bytes)'
     _Interface_:   'subroutine acc_memcpy_from_device_async(data_host_dest,
                    &'
                    'data_dev_src, bytes, async_arg)'
                    'type(*), dimension(*) :: data_host_dest'
                    'type(c_ptr), value :: data_dev_src'
                    'integer(c_size_t), value :: bytes'
                    'integer(acc_handle_kind), value :: async_arg'
d3148 1
a3148 2
     3.2.32.  OpenACC specification v3.3 (https://www.openacc.org),
     section 3.2.27.
d3161 2
a3162 2
     _Prototype_:   'void acc_attach(h_void **ptr_addr);'
     _Prototype_:   'void acc_attach_async(h_void **ptr_addr, int async);'
d3179 4
a3182 5
     _Prototype_:   'void acc_detach(h_void **ptr_addr);'
     _Prototype_:   'void acc_detach_async(h_void **ptr_addr, int async);'
     _Prototype_:   'void acc_detach_finalize(h_void **ptr_addr);'
     _Prototype_:   'void acc_detach_finalize_async(h_void **ptr_addr, int
                    async);'
d3346 2
a3347 1
version 2.6.
d3354 1
a3361 9
_Description_:
     Control the default device type to use when executing compute
     regions.  If unset, the code can be run on any device type,
     favoring a non-host device type.

     Supported values in GCC (if compiled in) are
        * 'host'
        * 'nvidia'
        * 'radeon'
a3370 4
_Description_:
     Control which device, identified by device number, is the default
     device.  The value must be a nonnegative integer less than the
     number of devices.  If unset, device number zero is used.
d3375 1
a3375 1
File: libgomp.info,  Node: ACC_PROFLIB,  Prev: ACC_DEVICE_NUM,  Up: OpenACC Environment Variables
a3379 6
_Description_:
     Semicolon-separated list of dynamic libraries that are loaded as
     profiling libraries.  Each library must provide at least the
     'acc_register_library' routine.  Each library file is found as
     described by the documentation of 'dlopen' of your operating
     system.
d3387 9
d3425 7
a3431 7
the CUDA stream is maintained for the lifetime of the program.  However,
this association can be changed through the use of the library function
'acc_set_cuda_stream'.  When the function 'acc_set_cuda_stream' is
called, the CUDA stream that was originally associated with the 'async'
clause is destroyed.  Caution should be taken when changing the
association as subsequent references to the 'async-argument' refer to a
different CUDA stream.
d3479 2
a3480 2
'cublasCreate()'.  In other words, both libraries share the same
context.
d3508 1
a3508 1
specifically, the function 'acc_set_device_num()'.
d3517 1
a3517 1
environment variables and these is discussed in the next section.
d3526 2
a3527 2
since the device has already been allocated, 'cublasCreate()' only
initializes the CUBLAS library and allocates the appropriate hardware
d3603 1
a3603 1
File: libgomp.info,  Node: OpenACC Profiling Interface,  Next: OpenMP-Implementation Specifics,  Prev: OpenACC Library Interoperability,  Up: Top
d3621 4
a3624 3
performance is impacted to some degree once the Profiling Interface is
enabled: for example, because of the _runtime_ (libgomp) calling into a
third-party _library_ for every event that has been registered.
d3640 1
a3640 1
'acc_prof_lookup' always returns 'NULL'.
d3655 1
a3655 1
     this implementation, the value generally corresponds to the
d3661 3
a3663 3
          'if' clause with _false_ argument, this still refers to the
          offloading device type.  It's not clear if that's the expected
          behavior.
d3679 3
a3681 2
          execution/'acc_device_host' it always is 'acc_async_sync'.  It
          is unclear if that is the expected behavior.
d3684 1
a3684 1
          it will always be 'acc_async_sync'.  It is unclear if that is
d3689 1
a3689 1
     This always has the same value as 'acc_prof_info.async'.
d3855 1
a3855 312
File: libgomp.info,  Node: OpenMP-Implementation Specifics,  Next: Offload-Target Specifics,  Prev: OpenACC Profiling Interface,  Up: Top

11 OpenMP-Implementation Specifics
**********************************

* Menu:

* Implementation-defined ICV Initialization::
* OpenMP Context Selectors::
* Memory allocation::


File: libgomp.info,  Node: Implementation-defined ICV Initialization,  Next: OpenMP Context Selectors,  Up: OpenMP-Implementation Specifics

11.1 Implementation-defined ICV Initialization
==============================================

AFFINITY-FORMAT-VAR    See *note OMP_AFFINITY_FORMAT::.
DEF-ALLOCATOR-VAR      See *note OMP_ALLOCATOR::.
MAX-ACTIVE-LEVELS-VAR  See *note OMP_MAX_ACTIVE_LEVELS::.
DYN-VAR                See *note OMP_DYNAMIC::.
NTHREADS-VAR           See *note OMP_NUM_THREADS::.
NUM-DEVICES-VAR        Number of non-host devices found by GCC's
                       run-time library
NUM-PROCS-VAR          The number of CPU cores on the initial device,
                       except that affinity settings might lead to a
                       smaller number.  On non-host devices, the value
                       of the NTHREADS-VAR ICV.
PLACE-PARTITION-VAR    See *note OMP_PLACES::.
RUN-SCHED-VAR          See *note OMP_SCHEDULE::.
STACKSIZE-VAR          See *note OMP_STACKSIZE::.
THREAD-LIMIT-VAR       See *note OMP_TEAMS_THREAD_LIMIT::
WAIT-POLICY-VAR        See *note OMP_WAIT_POLICY:: and
                       *note GOMP_SPINCOUNT::


File: libgomp.info,  Node: OpenMP Context Selectors,  Next: Memory allocation,  Prev: Implementation-defined ICV Initialization,  Up: OpenMP-Implementation Specifics

11.2 OpenMP Context Selectors
=============================

'vendor' is always 'gnu'.  References are to the GCC manual.

   For the host compiler, 'kind' always matches 'host'; for the
offloading architectures AMD GCN and Nvidia PTX, 'kind' always matches
'gpu'.  For the x86 family of computers, AMD GCN and Nvidia PTX the
following traits are supported in addition; while OpenMP is supported on
more architectures, GCC currently does not match any 'arch' or 'isa'
traits for those.

'arch'                                          'isa'
-----------------------------------------------------------------------
'x86', 'x86_64', 'i386', 'i486', 'i586',        See '-m...' flags in
'i686', 'ia32'                                  "x86 Options"
                                                (without '-m')
'amdgcn', 'gcn'                                 See '-march=' in
                                                "AMD GCN Options"(1)
'nvptx', 'nvptx64'                              See '-march=' in
                                                "Nvidia PTX Options"

   ---------- Footnotes ----------

   (1) Additionally, 'gfx803' is supported as an alias for 'fiji'.


File: libgomp.info,  Node: Memory allocation,  Prev: OpenMP Context Selectors,  Up: OpenMP-Implementation Specifics

11.3 Memory allocation
======================

The description below applies to:

   * Explicit use of the OpenMP API routines, see *note Memory
     Management Routines::.
   * The 'allocate' clause, except when the 'allocator' modifier is a
     constant expression with value 'omp_default_mem_alloc' and no
     'align' modifier has been specified.  (In that case, the normal
     'malloc' allocation is used.)
   * Using the 'allocate' directive for automatic/stack variables,
     except when the 'allocator' clause is a constant expression with
     value 'omp_default_mem_alloc' and no 'align' clause has been
     specified.  (In that case, the normal allocation is used: stack
     allocation and, sometimes for Fortran, also 'malloc' [depending on
     flags such as '-fstack-arrays'].)
   * Using the 'allocate' directive for variable in static memory is
     currently not supported (compile time error).
   * In Fortran, the 'allocators' directive and the executable
     'allocate' directive for Fortran pointers and allocatables is
     supported, but requires that files containing those directives has
     to be compiled with '-fopenmp-allocators'.  Additionally, all files
     that might explicitly or implicitly deallocate memory allocated
     that way must also be compiled with that option.

   For the available predefined allocators and, as applicable, their
associated predefined memory spaces and for the available traits and
their default values, see *note OMP_ALLOCATOR::.  Predefined allocators
without an associated memory space use the 'omp_default_mem_space'
memory space.

   For the memory spaces, the following applies:
   * 'omp_default_mem_space' is supported
   * 'omp_const_mem_space' maps to 'omp_default_mem_space'
   * 'omp_low_lat_mem_space' is only available on supported devices, and
     maps to 'omp_default_mem_space' otherwise.
   * 'omp_large_cap_mem_space' maps to 'omp_default_mem_space', unless
     the memkind library is available
   * 'omp_high_bw_mem_space' maps to 'omp_default_mem_space', unless the
     memkind library is available

   On Linux systems, where the memkind library
(https://github.com/memkind/memkind) ('libmemkind.so.0') is available at
runtime, it is used when creating memory allocators requesting

   * the memory space 'omp_high_bw_mem_space'
   * the memory space 'omp_large_cap_mem_space'
   * the 'partition' trait 'interleaved'; note that for
     'omp_large_cap_mem_space' the allocation will not be interleaved

   On Linux systems, where the numa library
(https://github.com/numactl/numactl) ('libnuma.so.1') is available at
runtime, it used when creating memory allocators requesting

   * the 'partition' trait 'nearest', except when both the libmemkind
     library is available and the memory space is either
     'omp_large_cap_mem_space' or 'omp_high_bw_mem_space'

   Note that the numa library will round up the allocation size to a
multiple of the system page size; therefore, consider using it only with
large data or by sharing allocations via the 'pool_size' trait.
Furthermore, the Linux kernel does not guarantee that an allocation will
always be on the nearest NUMA node nor that after reallocation the same
node will be used.  Note additionally that, on Linux, the default
setting of the memory placement policy is to use the current node;
therefore, unless the memory placement policy has been overridden, the
'partition' trait 'environment' (the default) will be effectively a
'nearest' allocation.

   Additional notes regarding the traits:
   * The 'pinned' trait is supported on Linux hosts, but is subject to
     the OS 'ulimit'/'rlimit' locked memory settings.
   * The default for the 'pool_size' trait is no pool and for every
     (re)allocation the associated library routine is called, which
     might internally use a memory pool.
   * For the 'partition' trait, the partition part size will be the same
     as the requested size (i.e.  'interleaved' or 'blocked' has no
     effect), except for 'interleaved' when the memkind library is
     available.  Furthermore, for 'nearest' and unless the numa library
     is available, the memory might not be on the same NUMA node as
     thread that allocated the memory; on Linux, this is in particular
     the case when the memory placement policy is set to preferred.
   * The 'access' trait has no effect such that memory is always
     accessible by all threads.
   * The 'sync_hint' trait has no effect.

   See also: *note Offload-Target Specifics::


File: libgomp.info,  Node: Offload-Target Specifics,  Next: The libgomp ABI,  Prev: OpenMP-Implementation Specifics,  Up: Top

12 Offload-Target Specifics
***************************

The following sections present notes on the offload-target specifics

* Menu:

* AMD Radeon::
* nvptx::


File: libgomp.info,  Node: AMD Radeon,  Next: nvptx,  Up: Offload-Target Specifics

12.1 AMD Radeon (GCN)
=====================

On the hardware side, there is the hierarchy (fine to coarse):
   * work item (thread)
   * wavefront
   * work group
   * compute unit (CU)

   All OpenMP and OpenACC levels are used, i.e.
   * OpenMP's simd and OpenACC's vector map to work items (thread)
   * OpenMP's threads ("parallel") and OpenACC's workers map to
     wavefronts
   * OpenMP's teams and OpenACC's gang use a threadpool with the size of
     the number of teams or gangs, respectively.

   The used sizes are
   * Number of teams is the specified 'num_teams' (OpenMP) or
     'num_gangs' (OpenACC) or otherwise the number of CU. It is limited
     by two times the number of CU.
   * Number of wavefronts is 4 for gfx900 and 16 otherwise;
     'num_threads' (OpenMP) and 'num_workers' (OpenACC) overrides this
     if smaller.
   * The wavefront has 102 scalars and 64 vectors
   * Number of workitems is always 64
   * The hardware permits maximally 40 workgroups/CU and 16
     wavefronts/workgroup up to a limit of 40 wavefronts in total per
     CU.
   * 80 scalars registers and 24 vector registers in non-kernel
     functions (the chosen procedure-calling API).
   * For the kernel itself: as many as register pressure demands (number
     of teams and number of threads, scaled down if registers are
     exhausted)

   The implementation remark:
   * I/O within OpenMP target regions and OpenACC parallel/kernels is
     supported using the C library 'printf' functions and the Fortran
     'print'/'write' statements.
   * Reverse offload regions (i.e.  'target' regions with
     'device(ancestor:1)') are processed serially per 'target' region
     such that the next reverse offload region is only executed after
     the previous one returned.
   * OpenMP code that has a 'requires' directive with
     'unified_shared_memory' will remove any GCN device from the list of
     available devices ("host fallback").
   * The available stack size can be changed using the 'GCN_STACK_SIZE'
     environment variable; the default is 32 kiB per thread.
   * Low-latency memory ('omp_low_lat_mem_space') is supported when the
     the 'access' trait is set to 'cgroup'.  The default pool size is
     automatically scaled to share the 64 kiB LDS memory between the
     number of teams configured to run on each compute-unit, but may be
     adjusted at runtime by setting environment variable
     'GOMP_GCN_LOWLAT_POOL=BYTES'.
   * 'omp_low_lat_mem_alloc' cannot be used with true low-latency memory
     because the definition implies the 'omp_atv_all' trait; main
     graphics memory is used instead.
   * 'omp_cgroup_mem_alloc', 'omp_pteam_mem_alloc', and
     'omp_thread_mem_alloc', all use low-latency memory as first
     preference, and fall back to main graphics memory when the
     low-latency pool is exhausted.


File: libgomp.info,  Node: nvptx,  Prev: AMD Radeon,  Up: Offload-Target Specifics

12.2 nvptx
==========

On the hardware side, there is the hierarchy (fine to coarse):
   * thread
   * warp
   * thread block
   * streaming multiprocessor

   All OpenMP and OpenACC levels are used, i.e.
   * OpenMP's simd and OpenACC's vector map to threads
   * OpenMP's threads ("parallel") and OpenACC's workers map to warps
   * OpenMP's teams and OpenACC's gang use a threadpool with the size of
     the number of teams or gangs, respectively.

   The used sizes are
   * The 'warp_size' is always 32
   * CUDA kernel launched: 'dim={#teams,1,1},
     blocks={#threads,warp_size,1}'.
   * The number of teams is limited by the number of blocks the device
     can host simultaneously.

   Additional information can be obtained by setting the environment
variable to 'GOMP_DEBUG=1' (very verbose; grep for 'kernel.*launch' for
launch parameters).

   GCC generates generic PTX ISA code, which is just-in-time compiled by
CUDA, which caches the JIT in the user's directory (see CUDA
documentation; can be tuned by the environment variables
'CUDA_CACHE_{DISABLE,MAXSIZE,PATH}'.

   Note: While PTX ISA is generic, the '-mptx=' and '-march='
commandline options still affect the used PTX ISA code and, thus, the
requirements on CUDA version and hardware.

   The implementation remark:
   * I/O within OpenMP target regions and OpenACC parallel/kernels is
     supported using the C library 'printf' functions.  Note that the
     Fortran 'print'/'write' statements are not supported, yet.
   * Compilation OpenMP code that contains 'requires reverse_offload'
     requires at least '-march=sm_35', compiling for '-march=sm_30' is
     not supported.
   * For code containing reverse offload (i.e.  'target' regions with
     'device(ancestor:1)'), there is a slight performance penalty for
     _all_ target regions, consisting mostly of shutdown delay Per
     device, reverse offload regions are processed serially such that
     the next reverse offload region is only executed after the previous
     one returned.
   * OpenMP code that has a 'requires' directive with
     'unified_shared_memory' will remove any nvptx device from the list
     of available devices ("host fallback").
   * The default per-warp stack size is 128 kiB; see also '-msoft-stack'
     in the GCC manual.
   * The OpenMP routines 'omp_target_memcpy_rect' and
     'omp_target_memcpy_rect_async' and the 'target update' directive
     for non-contiguous list items will use the 2D and 3D memory-copy
     functions of the CUDA library.  Higher dimensions will call those
     functions in a loop and are therefore supported.
   * Low-latency memory ('omp_low_lat_mem_space') is supported when the
     the 'access' trait is set to 'cgroup', the ISA is at least 'sm_53',
     and the PTX version is at least 4.1.  The default pool size is 8
     kiB per team, but may be adjusted at runtime by setting environment
     variable 'GOMP_NVPTX_LOWLAT_POOL=BYTES'.  The maximum value is
     limited by the available hardware, and care should be taken that
     the selected pool size does not unduly limit the number of teams
     that can run simultaneously.
   * 'omp_low_lat_mem_alloc' cannot be used with true low-latency memory
     because the definition implies the 'omp_atv_all' trait; main
     graphics memory is used instead.
   * 'omp_cgroup_mem_alloc', 'omp_pteam_mem_alloc', and
     'omp_thread_mem_alloc', all use low-latency memory as first
     preference, and fall back to main graphics memory when the
     low-latency pool is exhausted.


File: libgomp.info,  Node: The libgomp ABI,  Next: Reporting Bugs,  Prev: Offload-Target Specifics,  Up: Top
d3857 1
a3857 1
13 The libgomp ABI
d3884 1
a3884 1
13.1 Implementing MASTER construct
d3897 1
a3897 1
13.2 Implementing CRITICAL construct
d3919 1
a3919 1
13.3 Implementing ATOMIC construct
d3935 1
a3935 1
13.4 Implementing FLUSH construct
d3943 1
a3943 1
13.5 Implementing BARRIER construct
d3951 1
a3951 1
13.6 Implementing THREADPRIVATE construct
d3966 1
a3966 1
13.7 Implementing PRIVATE clause
d3980 1
a3980 1
13.8 Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses
d4018 1
a4018 1
13.9 Implementing REDUCTION clause
d4030 1
a4030 1
13.10 Implementing PARALLEL construct
d4074 1
a4074 1
13.11 Implementing FOR construct
d4136 1
a4136 1
13.12 Implementing ORDERED construct
d4145 1
a4145 1
13.13 Implementing SECTIONS construct
d4180 1
a4180 1
13.14 Implementing SINGLE construct
d4217 1
a4217 1
13.15 Implementing OpenACC's PARALLEL construct
d4225 1
a4225 1
14 Reporting Bugs
d4241 1
a4241 1
     Copyright (C) 2007 Free Software Foundation, Inc. <https://www.fsf.org>
d4958 1
a4958 1
     <https://www.fsf.org>
d5492 15
a5506 18
* Environment Variable:                  OMP_ALLOCATOR.         (line 6)
* Environment Variable <1>:              OMP_AFFINITY_FORMAT.   (line 6)
* Environment Variable <2>:              OMP_CANCELLATION.      (line 6)
* Environment Variable <3>:              OMP_DISPLAY_AFFINITY.  (line 6)
* Environment Variable <4>:              OMP_DISPLAY_ENV.       (line 6)
* Environment Variable <5>:              OMP_DEFAULT_DEVICE.    (line 6)
* Environment Variable <6>:              OMP_DYNAMIC.           (line 6)
* Environment Variable <7>:              OMP_MAX_ACTIVE_LEVELS. (line 6)
* Environment Variable <8>:              OMP_MAX_TASK_PRIORITY. (line 6)
* Environment Variable <9>:              OMP_NESTED.            (line 6)
* Environment Variable <10>:             OMP_NUM_TEAMS.         (line 6)
* Environment Variable <11>:             OMP_NUM_THREADS.       (line 6)
* Environment Variable <12>:             OMP_PROC_BIND.         (line 6)
* Environment Variable <13>:             OMP_PLACES.            (line 6)
* Environment Variable <14>:             OMP_STACKSIZE.         (line 6)
* Environment Variable <15>:             OMP_SCHEDULE.          (line 6)
* Environment Variable <16>:             OMP_TARGET_OFFLOAD.    (line 6)
* Environment Variable <17>:             OMP_TEAMS_THREAD_LIMIT.
d5508 7
a5514 7
* Environment Variable <18>:             OMP_THREAD_LIMIT.      (line 6)
* Environment Variable <19>:             OMP_WAIT_POLICY.       (line 6)
* Environment Variable <20>:             GOMP_CPU_AFFINITY.     (line 6)
* Environment Variable <21>:             GOMP_DEBUG.            (line 6)
* Environment Variable <22>:             GOMP_STACKSIZE.        (line 6)
* Environment Variable <23>:             GOMP_SPINCOUNT.        (line 6)
* Environment Variable <24>:             GOMP_RTEMS_THREAD_POOLS.
a5525 2
* Implementation specific setting <7>:   Implementation-defined ICV Initialization.
                                                                (line 6)
d5532 154
a5685 204
Node: Enabling OpenMP4900
Node: OpenMP Implementation Status6081
Node: OpenMP 4.56777
Node: OpenMP 5.06953
Node: OpenMP 5.112374
Node: OpenMP 5.216686
Ref: OpenMP 5.2-Footnote-119831
Node: OpenMP Technical Report 1220232
Node: Runtime Library Routines24759
Node: Thread Team Routines25392
Node: omp_set_num_threads26979
Node: omp_get_num_threads27825
Node: omp_get_max_threads28916
Node: omp_get_thread_num29671
Node: omp_in_parallel30540
Node: omp_set_dynamic31190
Node: omp_get_dynamic32057
Node: omp_get_cancellation32932
Node: omp_set_nested33726
Node: omp_get_nested35045
Node: omp_set_schedule36787
Node: omp_get_schedule37866
Node: omp_get_teams_thread_limit38814
Node: omp_get_supported_active_levels39582
Node: omp_set_max_active_levels40387
Node: omp_get_max_active_levels41336
Node: omp_get_level42059
Node: omp_get_ancestor_thread_num42693
Node: omp_get_team_size43615
Node: omp_get_active_level44586
Node: Thread Affinity Routines45278
Node: omp_get_proc_bind45678
Node: Teams Region Routines46650
Node: omp_get_num_teams47358
Node: omp_get_team_num47844
Node: omp_set_num_teams48343
Node: omp_get_max_teams49215
Node: omp_set_teams_thread_limit49907
Node: omp_get_thread_limit50912
Node: Tasking Routines51512
Node: omp_get_max_task_priority52023
Node: omp_in_explicit_task52606
Node: omp_in_final53496
Node: Resource Relinquishing Routines54139
Node: omp_pause_resource54611
Node: omp_pause_resource_all55704
Node: Device Information Routines56691
Node: omp_get_num_procs57509
Node: omp_set_default_device58030
Node: omp_get_default_device58829
Node: omp_get_num_devices59518
Node: omp_get_device_num60053
Node: omp_is_initial_device60868
Node: omp_get_initial_device61572
Node: Device Memory Routines62307
Node: omp_target_alloc63347
Node: omp_target_free64922
Node: omp_target_is_present66110
Node: omp_target_is_accessible67782
Node: omp_target_memcpy69596
Node: omp_target_memcpy_async71410
Node: omp_target_memcpy_rect73789
Node: omp_target_memcpy_rect_async76993
Node: omp_target_associate_ptr80765
Node: omp_target_disassociate_ptr83730
Node: omp_get_mapped_ptr85483
Node: Lock Routines87026
Node: omp_init_lock87874
Node: omp_init_nest_lock88499
Node: omp_destroy_lock89221
Node: omp_destroy_nest_lock89896
Node: omp_set_lock90634
Node: omp_set_nest_lock91492
Node: omp_unset_lock92388
Node: omp_unset_nest_lock93317
Node: omp_test_lock94311
Node: omp_test_nest_lock95289
Node: Timing Routines96277
Node: omp_get_wtick96654
Node: omp_get_wtime97209
Node: Event Routine97978
Node: omp_fulfill_event98311
Node: Memory Management Routines99303
Node: omp_init_allocator100219
Node: omp_destroy_allocator101848
Node: omp_set_default_allocator102832
Node: omp_get_default_allocator103866
Node: omp_alloc104807
Node: omp_aligned_alloc106910
Node: omp_free109440
Node: omp_calloc111095
Node: omp_aligned_calloc113314
Node: omp_realloc115866
Node: Environment Display Routine119252
Node: omp_display_env119628
Node: Environment Variables122462
Node: OMP_ALLOCATOR125243
Node: OMP_AFFINITY_FORMAT129053
Node: OMP_CANCELLATION131661
Node: OMP_DISPLAY_AFFINITY132261
Node: OMP_DISPLAY_ENV132956
Node: OMP_DEFAULT_DEVICE133806
Node: OMP_DYNAMIC134814
Node: OMP_MAX_ACTIVE_LEVELS135441
Node: OMP_MAX_TASK_PRIORITY136466
Node: OMP_NESTED137169
Node: OMP_NUM_TEAMS138418
Node: OMP_NUM_THREADS139127
Node: OMP_PROC_BIND140143
Node: OMP_PLACES141664
Node: OMP_STACKSIZE144400
Node: OMP_SCHEDULE145302
Node: OMP_TARGET_OFFLOAD146049
Node: OMP_TEAMS_THREAD_LIMIT147536
Node: OMP_THREAD_LIMIT148389
Node: OMP_WAIT_POLICY149049
Node: GOMP_CPU_AFFINITY149741
Node: GOMP_DEBUG151459
Node: GOMP_STACKSIZE151961
Node: GOMP_SPINCOUNT152792
Node: GOMP_RTEMS_THREAD_POOLS153996
Node: Enabling OpenACC156171
Node: OpenACC Runtime Library Routines156993
Node: acc_get_num_devices161274
Node: acc_set_device_type162000
Node: acc_get_device_type162764
Node: acc_set_device_num163777
Node: acc_get_device_num164594
Node: acc_get_property165393
Node: acc_async_test167605
Node: acc_async_test_all168576
Node: acc_wait169459
Node: acc_wait_all170322
Node: acc_wait_all_async171083
Node: acc_wait_async171835
Node: acc_init172543
Node: acc_shutdown173188
Node: acc_on_device173855
Node: acc_malloc174844
Node: acc_free175552
Node: acc_copyin176196
Node: acc_present_or_copyin177783
Node: acc_create179551
Node: acc_present_or_create181183
Node: acc_copyout182959
Node: acc_delete185263
Node: acc_update_device187510
Node: acc_update_self189084
Node: acc_map_data190674
Node: acc_unmap_data191746
Node: acc_deviceptr192488
Node: acc_hostptr193283
Node: acc_is_present194067
Node: acc_memcpy_to_device195594
Node: acc_memcpy_from_device197029
Node: acc_attach198514
Node: acc_detach199181
Node: acc_get_current_cuda_device200020
Node: acc_get_current_cuda_context200605
Node: acc_get_cuda_stream201205
Node: acc_set_cuda_stream201796
Node: acc_prof_register202467
Node: acc_prof_unregister203026
Node: acc_prof_lookup203593
Node: acc_register_library204114
Node: OpenACC Environment Variables204680
Node: ACC_DEVICE_TYPE205169
Node: ACC_DEVICE_NUM205696
Node: ACC_PROFLIB206167
Node: CUDA Streams Usage206773
Ref: CUDA Streams Usage-Footnote-1208665
Node: OpenACC Library Interoperability208774
Ref: OpenACC Library Interoperability-Footnote-1215123
Ref: OpenACC Library Interoperability-Footnote-2215375
Node: OpenACC Profiling Interface215583
Node: OpenMP-Implementation Specifics225581
Node: Implementation-defined ICV Initialization225900
Node: OpenMP Context Selectors227071
Ref: OpenMP Context Selectors-Footnote-1228352
Node: Memory allocation228420
Node: Offload-Target Specifics233065
Node: AMD Radeon233356
Node: nvptx236294
Node: The libgomp ABI239921
Node: Implementing MASTER construct240771
Node: Implementing CRITICAL construct241188
Node: Implementing ATOMIC construct241929
Node: Implementing FLUSH construct242412
Node: Implementing BARRIER construct242685
Node: Implementing THREADPRIVATE construct242956
Node: Implementing PRIVATE clause243611
Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses244194
Node: Implementing REDUCTION clause245520
Node: Implementing PARALLEL construct246080
Node: Implementing FOR construct247339
Node: Implementing ORDERED construct249339
Node: Implementing SECTIONS construct249647
Node: Implementing SINGLE construct250415
Node: Implementing OpenACC's PARALLEL construct251129
Node: Reporting Bugs251389
Node: Copying251752
Node: GNU Free Documentation License289304
Node: Funding314432
Node: Library Index316958
@


