From 750cc1e7fd43bb4559d88829e2f02643d6beb56f Mon Sep 17 00:00:00 2001 From: Francesco Lannutti Date: Sun, 15 Apr 2018 23:47:21 +0200 Subject: [PATCH] Fix the CUDA flag for ISRC model --- src/spicelib/devices/isrc/isrcsetup.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/spicelib/devices/isrc/isrcsetup.c b/src/spicelib/devices/isrc/isrcsetup.c index 70abef374..e1a001d45 100644 --- a/src/spicelib/devices/isrc/isrcsetup.c +++ b/src/spicelib/devices/isrc/isrcsetup.c @@ -17,7 +17,7 @@ ISRCsetup (SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) ISRCmodel *model = (ISRCmodel *)inModel ; ISRCinstance *here ; - int i, j, k, status ; + int i, j, status ; NG_IGNORE(matrix) ; NG_IGNORE(ckt) ; @@ -35,6 +35,9 @@ ISRCsetup (SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) /* How many instances we have */ model->n_instances = i ; + + /* This model supports CUDA */ + model->gen.has_cuda = 1 ; } /* loop through all the current source models */ @@ -42,23 +45,23 @@ ISRCsetup (SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) { model->offsetRHS = ckt->total_n_valuesRHS ; - k = 0 ; + j = 0 ; /* loop through all the instances of the model */ for (here = ISRCinstances(model); here != NULL ; here = ISRCnextInstance(here)) { /* For the RHS */ if (here->ISRCposNode != 0) - k++ ; + j++ ; if (here->ISRCnegNode != 0) - k++ ; + j++ ; } model->n_valuesRHS = model->n_instances; ckt->total_n_valuesRHS += model->n_valuesRHS ; - model->n_PtrRHS = k ; + model->n_PtrRHS = j ; ckt->total_n_PtrRHS += model->n_PtrRHS ;