Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Dependencies._

ThisBuild / scalaVersion := "2.13.15"
ThisBuild / version := "0.0.12"
ThisBuild / version := "0.0.14"
ThisBuild / versionScheme := Some("early-semver")
ThisBuild / organization := "io.citrine"
ThisBuild / organizationName := "Citrine Informatics"
Expand Down
12 changes: 12 additions & 0 deletions src/native/NativeECOS.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,18 @@ JNIEXPORT jint JNICALL Java_io_citrine_ecos_NativeECOS_EcosSolve(JNIEnv *env, jo
ECOS_cleanup(wspace, 0);
}

/* JNI_ABORT: inputs are read-only, discard any copy without writing back. */
(*env)->ReleaseIntArrayElements(env, q, qPtr, JNI_ABORT);
(*env)->ReleaseDoubleArrayElements(env, Gpr, GprPtr, JNI_ABORT);
(*env)->ReleaseIntArrayElements(env, Gjc, GjcPtr, JNI_ABORT);
(*env)->ReleaseIntArrayElements(env, Gir, GirPtr, JNI_ABORT);
(*env)->ReleaseDoubleArrayElements(env, Apr, AprPtr, JNI_ABORT);
(*env)->ReleaseIntArrayElements(env, Ajc, AjcPtr, JNI_ABORT);
(*env)->ReleaseIntArrayElements(env, Air, AirPtr, JNI_ABORT);
(*env)->ReleaseDoubleArrayElements(env, c, cPtr, JNI_ABORT);
(*env)->ReleaseDoubleArrayElements(env, h, hPtr, JNI_ABORT);
(*env)->ReleaseDoubleArrayElements(env, b, bPtr, JNI_ABORT);

return exitflag;
}

Expand Down
Loading