Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some of the #defines call the abi #773

Merged
merged 2 commits into from
Aug 21, 2024
Merged

Some of the #defines call the abi #773

merged 2 commits into from
Aug 21, 2024

Conversation

mattfidler
Copy link
Member

Which need to be changed to an api call so that these will be not be linked by abi

@mattfidler
Copy link
Member Author

#define getAdvan(idx) ind->solve + (op->neq + op->nlin)*(idx) + op->neq
#define getSolve(idx) ind->solve + (op->neq + op->nlin)*(idx)

@mattfidler
Copy link
Member Author

Also:

#define getEvid(ind, idx) (idx >= 0 ? ind->evid[idx] : ind->extraDoseEvid[-1-idx])
#define getEvidP1(ind, idx) (idx >= 0 ? ind->evid[idx+1] : ind->extraDoseEvid[-idx])
#define getEvidM1(ind, idx) (idx >= 0 ? ind->evid[idx-1] : ind->extraDoseEvid[-2-idx])
#define getDose(ind, idx) (idx >= 0 ? ind->dose[idx] : ind->extraDoseDose[-1-idx])
#define getDoseP1(ind, idx) (idx >= 0 ? ind->dose[idx+1] : ind->extraDoseDose[-idx])
#define getDoseM1(ind, idx) (idx >= 0 ? ind->dose[idx-1] : ind->extraDoseDose[-2-idx])
#define setDoseP1(ind, idx, val) if (idx >= 0){ind->dose[idx+1] = val;} else {ind->extraDoseDose[-idx] = val;}
#define getIi(ind, idx) (idx >= 0 ? ind->ii[idx] : 0.0)
#define getIiP1(ind, idx) (idx >= 0 ? ind->ii[idx+1] : 0.0)
#define getIiM1(ind, idx) (ind >= 0 ? ind->ii[idx-1] : 0.0)
#define getDoseM1(ind, idx) (idx >= 0 ? ind->dose[idx-1] : ind->extraDoseDose[-2-idx])
#define getAllTimes(ind, idx) (idx >= 0 ? ind->all_times[idx] : ind->extraDoseTime[-1-idx])
#define getAllTimesP1(ind, idx) (idx >= 0 ? ind->all_times[idx+1] : ind->extraDoseTime[-idx])
#define getAllTimesM1(ind, idx) (idx >= 0 ? ind->all_times[idx-1] : ind->extraDoseTime[-2-idx])
#define setAllTimesP1(ind, idx, val) if (idx>= 0) {ind->all_times[idx+1] = val;} else {ind->extraDoseTime[-idx] = val;}

@mattfidler
Copy link
Member Author

mattfidler commented Aug 21, 2024

The following are used in nlmixr2est:

  • getSolve()

Should black out these defines when using the ptr interface

@mattfidler mattfidler merged commit 6812c3b into main Aug 21, 2024
6 of 7 checks passed
@mattfidler mattfidler deleted the 733-no-abi-defs branch August 21, 2024 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant