| 1 | package OpenMP::Simple; | ||
| 2 | |||
| 3 | 32 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 32 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 32 | ▶ | use Alien::OpenMP; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 32 | our $VERSION = q{0.2.6}; | |
| 8 | |||
| 9 | # This module is a wrapper around a ".h" file that is injected into Alien::OpenMP | ||
| 10 | # via Inline:C's AUTO_INCLUDE feature. This header file constains C macros for reading | ||
| 11 | # OpenMP relavent environmental variables via %ENV (set by OpenMP::Environment perhaps) | ||
| 12 | # and using the standard OpenMP runtime functions to set them. | ||
| 13 | |||
| 14 | 32 | ▶ | use File::ShareDir 'dist_dir'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | 32 | my $share_dir = dist_dir('OpenMP-Simple'); | |
| 17 | |||
| 18 | sub Inline { | ||
| 19 | 31 | ▶ | my ($self, $lang) = @_; |
|
Subroutine
Inline: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 20 | 31 | my $config = Alien::OpenMP->Inline($lang); | |
| 21 | 31 | $config->{INC} = qq{-I$share_dir}; | |
| 22 | 31 | $config->{AUTO_INCLUDE} .= qq{\n#include "$share_dir/ppport.h"\n#include "$share_dir/openmp-simple.h"\n}; | |
| 23 | 31 | return $config; | |
| 24 | } | ||
| 25 | |||
| 26 | 32 | 1; | |
| 27 | |||
| 28 | __END__ | ||