Skip to content

Commit 2d78610

Browse files
committed
More doc tweaks
1 parent 8acfd57 commit 2d78610

File tree

2 files changed

+32
-35
lines changed

2 files changed

+32
-35
lines changed

R/openmp.R

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@
88
#' the OpenMP runtime library based on the installed Xcode version. These functions
99
#' mirror the logic described on the [macOS R Project OpenMP page](https://mac.r-project.org/openmp/)
1010
#' and should be used by advanced users who wish to compile R packages
11-
#' that use OpenMP for parallel processing. They are not required for most users.#'
11+
#' that use OpenMP for parallel processing. They are not required for most users.
1212
#'
1313
#' OpenMP runtime is downloaded from the R-project repository for macOS and installed to:
1414
#'
1515
#' - Library: `/usr/local/lib/libomp.dylib`
1616
#' - Headers:
1717
#' - `/usr/local/include/omp.h`;
18-
#' - `/usr/local/include/ompt.h`; and,
19-
#' - `/usr/local/include/omp-tools.h`
18+
#' - `/usr/local/include/ompt.h`;
19+
#' - `/usr/local/include/omp-tools.h`; and,
20+
#' - `/usr/local/include/ompx.h` (added in LLVM 19.1.0).
2021
#'
2122
#' **Note:** Apple has explicitly disabled OpenMP support in Xcode compilers, but the
2223
#' runtime library can be installed separately and used with `-Xclang -fopenmp`
@@ -70,31 +71,29 @@ openmp_version <- function() {
7071
#' downloads the corresponding OpenMP runtime from the R-project repository:
7172
#'
7273
#' ```sh
74+
#' VERSION="19.1.0"
75+
#'
7376
#' # Download the appropriate version
74-
#' curl -O https://mac.r-project.org/openmp/openmp-VERSION-darwin20-Release.tar.gz
77+
#' curl -O https://mac.r-project.org/openmp/openmp-${VERSION}-darwin20-Release.tar.gz
7578
#'
7679
#' # Install to system directories
77-
#' sudo tar fvxz openmp-VERSION-darwin20-Release.tar.gz -C /
80+
#' sudo tar fvxz openmp-${VERSION}-darwin20-Release.tar.gz -C /
7881
#' ```
7982
#'
80-
#' The installation includes:
81-
#'
82-
#' - `/usr/local/lib/libomp.dylib` - Main OpenMP runtime library
83-
#' - `/usr/local/include/omp.h` - OpenMP API header
84-
#' - `/usr/local/include/ompt.h` - OpenMP Tools interface header
85-
#' - `/usr/local/include/omp-tools.h` - OpenMP Tools header
86-
#'
8783
#' ### Using OpenMP in R Packages
8884
#'
89-
#' After installation, you can enable OpenMP support in R packages by adding
90-
#' the following to your `~/.R/Makevars` file:
85+
#' During installation, we will automatically configure your `~/.R/Makevars`
86+
#' file to include the necessary compiler flags for OpenMP support.
9187
#'
9288
#' ```sh
89+
#' # macrtools - OpenMP: start
9390
#' CPPFLAGS += -Xclang -fopenmp
9491
#' LDFLAGS += -lomp
92+
#' # macrtools - OpenMP: end
9593
#' ```
9694
#'
97-
#' Or install packages with:
95+
#' Alternatively, you can manually add the lines to your `~/.R/Makevars` file.
96+
#' Or, install packages from command line with:
9897
#'
9998
#' ```sh
10099
#' PKG_CPPFLAGS='-Xclang -fopenmp' PKG_LIBS=-lomp R CMD INSTALL myPackage
@@ -225,7 +224,7 @@ openmp_install <- function(password = base::getOption("macrtools.password"), ver
225224
#' sudo rm -f /usr/local/include/ompx.h
226225
#' ```
227226
#'
228-
#' Note that `ompx.h` was included in LLVM 19.1.0 and
227+
#' **Note:** `ompx.h` was included in LLVM 19.1.0 and
229228
#' may not exist in older OpenMP versions.
230229
#'
231230
#' @export

man/openmp.Rd

Lines changed: 17 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)