% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{get_cpu_cores}
\alias{get_cpu_cores}
\title{Get number of CPU cores}
\usage{
get_cpu_cores()
}
\value{
Integer with number of CPU cores
}
\description{
Returns the number of logical CPU cores (processors) available.
}
\details{
This function returns the number of logical processors, which includes
cores from hyperthreading/SMT. Useful for configuring parallel processing.

\strong{Typical values:}
\itemize{
\item 4-core CPU without hyperthreading: 4
\item 4-core CPU with hyperthreading: 8
\item 8-core CPU with hyperthreading: 16
}

\strong{Usage for parallelization:}
Don't blindly use all cores. A common practice is to use 80-90 percent of
available cores to leave room for the OS and other processes.
}
\note{
\itemize{
\item Returns logical cores (with hyperthreading), not physical cores
\item On systems with CPU pinning, may return fewer cores
\item Value reflects cores available to the process
}
}
\examples{
\donttest{
# Get CPU cores
cores <- get_cpu_cores()
cat("System has", cores, "CPU cores\n")

# Configure parallel processing (use 80 percent of cores)
threads <- max(1, floor(cores * 0.8))
options(BigDataStatMeth.threads = threads)
}

}
\seealso{
\code{\link{get_total_ram}}
}
