Skip to content
Browse files

Again, signed/unsigned mismatch

MS Visual Studio only supports OpenMP v2.5, and that requires signed
index types in parallel for loops
  • Loading branch information...
1 parent 8094db5 commit f9d93fb0fbfb1f4bac01a4012db742a96100baad @ddemidov committed Jan 11, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 vexcl/spmat.hpp
View
6 vexcl/spmat.hpp
@@ -412,7 +412,7 @@ SpMat<real,column_t,idx_t>::SpMat(
// Each device get it's own strip of the matrix.
#pragma omp parallel for schedule(static,1)
- for(int d = 0; d < queue.size(); d++) {
+ for(int d = 0; d < static_cast<int>(queue.size()); d++) {
if (part[d + 1] > part[d]) {
cl::Device device = qdev(queue[d]);
@@ -501,7 +501,7 @@ std::vector<std::set<column_t>> SpMat<real,column_t,idx_t>::setup_exchange(
// Build sets of ghost points.
#pragma omp parallel for schedule(static,1)
- for(int d = 0; d < queue.size(); d++) {
+ for(int d = 0; d < static_cast<int>(queue.size()); d++) {
for(size_t i = part[d]; i < part[d + 1]; i++) {
for(idx_t j = row[i]; j < row[i + 1]; j++) {
if (col[j] < static_cast<column_t>(xpart[d]) || col[j] >= static_cast<column_t>(xpart[d + 1])) {
@@ -524,7 +524,7 @@ std::vector<std::set<column_t>> SpMat<real,column_t,idx_t>::setup_exchange(
// Build local structures to facilitate exchange.
if (cols_to_send.size()) {
#pragma omp parallel for schedule(static,1)
- for(int d = 0; d < queue.size(); d++) {
+ for(int d = 0; d < static_cast<int>(queue.size()); d++) {
if (size_t rcols = remote_cols[d].size()) {
exc[d].cols_to_recv.resize(rcols);
exc[d].vals_to_recv.resize(rcols);

0 comments on commit f9d93fb

Please sign in to comment.
Something went wrong with that request. Please try again.