Skip to content

Commit

Permalink
Finished stupid merging stupid stupidities
Browse files Browse the repository at this point in the history
  • Loading branch information
run4flat committed Feb 17, 2013
1 parent a6e1499 commit 9e85621
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 40 deletions.
44 changes: 8 additions & 36 deletions Build.PL
Original file line number Diff line number Diff line change
@@ -1,50 +1,22 @@
use strict;
use warnings;
use File::Spec;
use Module::Build;
<<<<<<< HEAD

# Get nvcc's path
use strict;
use warnings;
use ExtUtils::nvcc;

=======
>>>>>>> fix-mem-troubles
use Module::Build;
my $build = Module::Build->new(
module_name => 'CUDA::Minimal',
license => 'perl',
build_requires => {
'ExtUtils::CBuilder' => '0',
'ExtUtils::nvcc' => '0.03',
# 'ExtUtils::CBuilder' => '0',
},
requires => {
'perl' => '0',
},
dist_author => 'David Mertens <dcmertens.perl@gmail.com>',
include_dirs => ['.', get_cuda_dir('include')],
extra_linker_flags => [ '-L' . get_cuda_dir('lib'), '-lcudart'],
config => {ExtUtils::nvcc::MB},
include_dirs => '.',
);
<<<<<<< HEAD
$build->create_build_script;
my $base_cuda_path;
sub get_cuda_dir {
my $final_dir = shift;
# Find the location of nvcc, and one directori up
if (not defined $base_cuda_path) {
my ($nvcc_dir) = grep { -e $_ }
map { File::Spec->catfile($_,'nvcc') }
File::Spec->path;
die "Unable to find nvcc in your current path\n"
unless defined $nvcc_dir;
my ($volume, $directories) = File::Spec->splitpath($nvcc_dir);
$directories = File::Spec->catdir($directories, '..');
$base_cuda_path = File::Spec->catpath($volume, $directories, '');
}
return File::Spec->catdir($base_cuda_path, $final_dir);
}
=======
$build->create_build_script;
>>>>>>> fix-mem-troubles
4 changes: 0 additions & 4 deletions lib/CUDA/Minimal.xs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include "cuda_runtime_api.h"

#include "ppport.h"

Expand Down Expand Up @@ -146,10 +145,7 @@ PeekAtLastError()
RETVAL = newSVpv(cudaGetErrorString(err), 0);
OUTPUT:
RETVAL
<<<<<<< HEAD
=======

BOOT:
#undef PERL_VERSION
#define PERL_VERSION 0
>>>>>>> fix-mem-troubles

0 comments on commit 9e85621

Please sign in to comment.