org.lwjgl.cuda.CUhostFnI 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.*;
/**
* Instances of this interface may be passed to the {@link CU#cuLaunchHostFunc LaunchHostFunc} method.
*
* Type
*
*
* void (*{@link #invoke}) (
* void *userData
* )
*/
@FunctionalInterface
@NativeType("void (*) (void *)")
public interface CUhostFnI extends CallbackI {
FFICIF CIF = apiCreateCIF(
apiStdcall(),
ffi_type_void,
ffi_type_pointer
);
@Override
default FFICIF getCallInterface() { return CIF; }
@Override
default void callback(long ret, long args) {
invoke(
memGetAddress(memGetAddress(args))
);
}
/**
* CUDA host function.
*
* @param userData argument value passed to the function
*/
void invoke(@NativeType("void *") long userData);
}