Skip to content

Commit

Permalink
Addresses some signed vs. unsigned integer warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrijthe committed Nov 1, 2018
1 parent 41bc897 commit 99e19e2
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 89 deletions.
4 changes: 2 additions & 2 deletions src/sptree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ double SPTree<NDims>::computeNonEdgeForces(unsigned int point_index, double thet

// Computes edge forces
template<int NDims>
void SPTree<NDims>::computeEdgeForces(unsigned int* row_P, unsigned int* col_P, double* val_P, int N, double* pos_f, int num_threads) const
void SPTree<NDims>::computeEdgeForces(unsigned int* row_P, unsigned int* col_P, double* val_P, unsigned int N, double* pos_f, int num_threads) const
{

// Loop over all edges in the graph
Expand Down Expand Up @@ -436,7 +436,7 @@ void SPTree<NDims>::print()

if(is_leaf) {
Rprintf("Leaf node; data = [");
for(int i = 0; i < size; i++) {
for(unsigned int i = 0; i < size; i++) {
double* point = data + index[i] * NDims;
for(int d = 0; d < NDims; d++) Rprintf("%f, ", point[d]);
Rprintf(" (index = %d)", index[i]);
Expand Down
2 changes: 1 addition & 1 deletion src/sptree.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class SPTree
void getAllIndices(unsigned int* indices);
unsigned int getDepth();
double computeNonEdgeForces(unsigned int point_index, double theta, double neg_f[]) const;
void computeEdgeForces(unsigned int* row_P, unsigned int* col_P, double* val_P, int N, double* pos_f, int num_threads) const;
void computeEdgeForces(unsigned int* row_P, unsigned int* col_P, double* val_P, unsigned int N, double* pos_f, int num_threads) const;
void print();

private:
Expand Down
Loading

0 comments on commit 99e19e2

Please sign in to comment.