Skip to content

Commit c9af2a2

Browse files
authored
Merge pull request #138 from galexv/master
Allow constructing RMatrix from a non-const buffer
2 parents e5da96c + d8fc414 commit c9af2a2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

inst/include/RcppParallel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ inline void parallelFor(std::size_t begin,
3434
std::size_t grainSize = 1,
3535
int numThreads = -1)
3636
{
37-
grainSize = resolveValue("RCPP_PARALLEL_GRAIN_SIZE", grainSize, 1);
37+
grainSize = resolveValue("RCPP_PARALLEL_GRAIN_SIZE", grainSize, 1u);
3838
numThreads = resolveValue("RCPP_PARALLEL_NUM_THREADS", numThreads, -1);
3939

4040
#if RCPP_PARALLEL_USE_TBB

inst/include/RcppParallel/RMatrix.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class RMatrix {
204204
{
205205
}
206206

207-
inline RMatrix(const T* data, std::size_t nrow, std::size_t ncol)
207+
inline RMatrix(T* data, std::size_t nrow, std::size_t ncol)
208208
: data_(data), nrow_(nrow), ncol_(ncol)
209209
{
210210
}

0 commit comments

Comments
 (0)