Skip to content

Instantly share code, notes, and snippets.

@cjhanks
Created October 4, 2016 22:21
Show Gist options
  • Save cjhanks/32f0e2c1b18d0ade8d2760a91385f88c to your computer and use it in GitHub Desktop.
Save cjhanks/32f0e2c1b18d0ade8d2760a91385f88c to your computer and use it in GitHub Desktop.
Eigen3 OpenMP Declaraction
#pragma omp declare reduction( \
+: \
Matrix6d: \
omp_out= omp_out + omp_in) \
initializer(omp_priv=Matrix6d::Zero())
#pragma omp declare reduction( \
+: \
Vector6d: \
omp_out = omp_out + omp_in) \
initializer(omp_priv=Vector6d::Zero())
#pragma omp parallel for reduction(+: ATA) \
reduction(+: ATb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment