aboutsummaryrefslogtreecommitdiff
path: root/src/gensvm_sparse.c
diff options
context:
space:
mode:
authorGertjan van den Burg <burg@ese.eur.nl>2016-12-07 12:42:49 +0100
committerGertjan van den Burg <burg@ese.eur.nl>2016-12-07 12:42:49 +0100
commit845631ad78415e022295373d8b0c9517ae17403e (patch)
tree896e8e293fdce2df98b104755b5995c132dae0d6 /src/gensvm_sparse.c
parentdocument undocumented elements (diff)
downloadgensvm-845631ad78415e022295373d8b0c9517ae17403e.tar.gz
gensvm-845631ad78415e022295373d8b0c9517ae17403e.zip
switch some integer variables to long for cross platform size guarantees
Diffstat (limited to 'src/gensvm_sparse.c')
-rw-r--r--src/gensvm_sparse.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gensvm_sparse.c b/src/gensvm_sparse.c
index 84312f9..ce99b3b 100644
--- a/src/gensvm_sparse.c
+++ b/src/gensvm_sparse.c
@@ -135,7 +135,7 @@ bool gensvm_could_sparse(double *A, long rows, long cols)
struct GenSparse *gensvm_dense_to_sparse(double *A, long rows, long cols)
{
double value;
- int row_cnt;
+ long row_cnt;
long i, j, cnt, nnz = 0;
struct GenSparse *spA = NULL;
@@ -147,8 +147,8 @@ struct GenSparse *gensvm_dense_to_sparse(double *A, long rows, long cols)
spA->n_row = rows;
spA->n_col = cols;
spA->values = Calloc(double, nnz);
- spA->ia = Calloc(int, rows+1);
- spA->ja = Calloc(int, nnz);
+ spA->ia = Calloc(long, rows+1);
+ spA->ja = Calloc(long, nnz);
cnt = 0;
spA->ia[0] = 0;