Skip to content

Commit

Permalink
avoid Rcpp conversion to size_t
Browse files Browse the repository at this point in the history
  • Loading branch information
paulstaab committed Jun 22, 2015
1 parent 743d751 commit 66edde2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/RcppExports.cpp
Expand Up @@ -122,14 +122,14 @@ BEGIN_RCPP
END_RCPP
}
// unphase_segsites
List unphase_segsites(const List seg_sites, const size_t ploidy, const size_t samples_per_ind);
List unphase_segsites(const List seg_sites, const long unsigned int ploidy, const long unsigned int samples_per_ind);
RcppExport SEXP coala_unphase_segsites(SEXP seg_sitesSEXP, SEXP ploidySEXP, SEXP samples_per_indSEXP) {
BEGIN_RCPP
Rcpp::RObject __result;
Rcpp::RNGScope __rngScope;
Rcpp::traits::input_parameter< const List >::type seg_sites(seg_sitesSEXP);
Rcpp::traits::input_parameter< const size_t >::type ploidy(ploidySEXP);
Rcpp::traits::input_parameter< const size_t >::type samples_per_ind(samples_per_indSEXP);
Rcpp::traits::input_parameter< const long unsigned int >::type ploidy(ploidySEXP);
Rcpp::traits::input_parameter< const long unsigned int >::type samples_per_ind(samples_per_indSEXP);
__result = Rcpp::wrap(unphase_segsites(seg_sites, ploidy, samples_per_ind));
return __result;
END_RCPP
Expand Down
4 changes: 2 additions & 2 deletions src/parse_seqgen_output.cpp
Expand Up @@ -6,8 +6,8 @@
using namespace Rcpp;

NumericMatrix read_sequence(std::ifstream &output,
const size_t individuals,
const size_t locus_length) {
const long unsigned int individuals,
const long unsigned int locus_length) {

NumericMatrix seq(individuals, locus_length);
std::string tmp;
Expand Down
4 changes: 2 additions & 2 deletions src/unphased_segsites.cpp
Expand Up @@ -6,8 +6,8 @@ using namespace Rcpp;
// [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::export]]
List unphase_segsites(const List seg_sites,
const size_t ploidy,
const size_t samples_per_ind) {
const long unsigned int ploidy,
const long unsigned int samples_per_ind) {

NumericMatrix target, source = as<NumericMatrix>(seg_sites[0]);
size_t individuals = source.nrow() / ploidy;
Expand Down

0 comments on commit 66edde2

Please sign in to comment.