Skip to contents

Computes the multiplication of 2 by passing the data into a C routine that is parallelized

Usage

multiply_by_two(x, n)

Arguments

x

A vector of numeric values to multiple.

n

The number of cores to use.

Examples


# Data
x = 1:5

# Number of Cores to use in Parallelization
ncores = 2

# Call the routine
multiply_by_two(x, n = ncores)