All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.lwjgl.cuda.CU60 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 java.nio.*;

import org.lwjgl.*;

import org.lwjgl.system.*;

import static org.lwjgl.system.APIUtil.*;
import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
import static org.lwjgl.system.MemoryUtil.*;

import static org.lwjgl.cuda.CUDA.*;

/** Contains bindings to CUDA Driver API. */
public class CU60 extends CU55 {

    /**
     * CUDA Mem Attach Flags. ({@code CUmemAttach_flags})
     * 
     * 
Enum values:
* *
    *
  • {@link #CU_MEM_ATTACH_GLOBAL MEM_ATTACH_GLOBAL} - Memory can be accessed by any stream on any device
  • *
  • {@link #CU_MEM_ATTACH_HOST MEM_ATTACH_HOST} - Memory cannot be accessed by any stream on any device
  • *
  • {@link #CU_MEM_ATTACH_SINGLE MEM_ATTACH_SINGLE} - Memory can only be accessed by a single stream on the associated device
  • *
*/ public static final int CU_MEM_ATTACH_GLOBAL = 0x1, CU_MEM_ATTACH_HOST = 0x2, CU_MEM_ATTACH_SINGLE = 0x4; protected CU60() { throw new UnsupportedOperationException(); } /** Contains the function pointers loaded from {@code CU.getLibrary()}. */ public static final class Functions { private Functions() {} /** Function address. */ public static final long MemAllocManaged = apiGetFunctionAddress(CU.getLibrary(), "cuMemAllocManaged"), PointerSetAttribute = apiGetFunctionAddress(CU.getLibrary(), "cuPointerSetAttribute"), StreamAttachMemAsync = apiGetFunctionAddress(CU.getLibrary(), __CUDA_API_PTSZ("cuStreamAttachMemAsync")); } // --- [ cuMemAllocManaged ] --- public static int ncuMemAllocManaged(long dptr, long bytesize, int flags) { long __functionAddress = Functions.MemAllocManaged; return callPPI(__functionAddress, dptr, bytesize, flags); } @NativeType("CUresult") public static int cuMemAllocManaged(@NativeType("CUdeviceptr *") PointerBuffer dptr, @NativeType("size_t") long bytesize, @NativeType("unsigned int") int flags) { if (CHECKS) { check(dptr, 1); } return ncuMemAllocManaged(memAddress(dptr), bytesize, flags); } // --- [ cuPointerSetAttribute ] --- public static int ncuPointerSetAttribute(long value, int attribute, long ptr) { long __functionAddress = Functions.PointerSetAttribute; if (CHECKS) { check(ptr); } return callPPI(__functionAddress, value, attribute, ptr); } @NativeType("CUresult") public static int cuPointerSetAttribute(@NativeType("void const *") ByteBuffer value, @NativeType("CUpointer_attribute") int attribute, @NativeType("CUdeviceptr") long ptr) { return ncuPointerSetAttribute(memAddress(value), attribute, ptr); } // --- [ cuStreamAttachMemAsync ] --- @NativeType("CUresult") public static int cuStreamAttachMemAsync(@NativeType("CUstream") long hStream, @NativeType("CUdeviceptr") long dptr, @NativeType("size_t") long length, @NativeType("unsigned int") int flags) { long __functionAddress = Functions.StreamAttachMemAsync; if (CHECKS) { check(dptr); } return callPPPI(__functionAddress, hStream, dptr, length, flags); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy