org.lwjgl.cuda.CUasyncCallbackI Maven / Gradle / Ivy
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.cuda;
import org.lwjgl.system.*;
import org.lwjgl.system.libffi.*;
import static org.lwjgl.system.APIUtil.*;
import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.libffi.LibFFI.*;
/**
* Type
*
*
* void (*{@link #invoke}) (
* CUasyncNotificationInfo *info,
* void *userData,
* CUasyncCallbackHandle callback
* )
*/
@FunctionalInterface
@NativeType("void (*) (CUasyncNotificationInfo *, void *, CUasyncCallbackHandle)")
public interface CUasyncCallbackI extends CallbackI {
FFICIF CIF = apiCreateCIF(
apiStdcall(),
ffi_type_void,
ffi_type_pointer, ffi_type_pointer, ffi_type_pointer
);
@Override
default FFICIF getCallInterface() { return CIF; }
@Override
default void callback(long ret, long args) {
invoke(
memGetAddress(memGetAddress(args)),
memGetAddress(memGetAddress(args + POINTER_SIZE)),
memGetAddress(memGetAddress(args + 2 * POINTER_SIZE))
);
}
void invoke(@NativeType("CUasyncNotificationInfo *") long info, @NativeType("void *") long userData, @NativeType("CUasyncCallbackHandle") long callback);
}