ai.djl.mxnet.jna.MXCallbackList Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mxnet-engine Show documentation
Show all versions of mxnet-engine Show documentation
Deep Java Library (DJL) Engine Adapter for Apache MXNet
package ai.djl.mxnet.jna;
import com.sun.jna.Callback;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import com.sun.jna.ptr.PointerByReference;
import java.util.Arrays;
import java.util.List;
public class MXCallbackList extends Structure {
public int num_callbacks;
public CallbacksCallback callbacks;
public PointerByReference contexts;
public MXCallbackList() {
}
public MXCallbackList(Pointer peer) {
super(peer);
}
@Override
protected List getFieldOrder() {
return Arrays.asList("num_callbacks", "callbacks", "contexts");
}
public void setNumCallbacks(int num_callbacks) {
this.num_callbacks = num_callbacks;
}
public int getNumCallbacks() {
return num_callbacks;
}
public void setCallbacksCallback(CallbacksCallback callbacks) {
this.callbacks = callbacks;
}
public CallbacksCallback getCallbacksCallback() {
return callbacks;
}
public void setContexts(PointerByReference contexts) {
this.contexts = contexts;
}
public PointerByReference getContexts() {
return contexts;
}
public static final class ByReference extends MXCallbackList implements Structure.ByReference {}
public static final class ByValue extends MXCallbackList implements Structure.ByValue {}
public interface CallbacksCallback extends Callback {
int apply();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy