示例#1
0
文件: NvmlAPI.cs 项目: m4rs-mt/ILGPU
        /// <summary>
        /// Provides access to <see cref="DeviceGetMemoryAffinity_Interop"/>
        /// without using raw pointers.
        /// </summary>
        public unsafe NvmlReturn DeviceGetMemoryAffinity(
            IntPtr device,
            uint nodeSetSize,
            out ulong[] nodeSet,
            NvmlAffinityScope scope)
        {
            NvmlReturn Interop(uint len, ulong *ptr) =>
            DeviceGetMemoryAffinity_Interop(device, len, ptr, scope);

            return(FillNvmlArray(Interop, nodeSetSize, out nodeSet));
        }
示例#2
0
文件: NvmlAPI.cs 项目: m4rs-mt/ILGPU
        /// <summary>
        /// Provides access to <see cref="DeviceGetCpuAffinityWithinScope_Interop"/>
        /// without using raw pointers.
        /// </summary>
        public unsafe NvmlReturn DeviceGetCpuAffinityWithinScope(
            IntPtr device,
            uint cpuSetSize,
            out ulong[] cpuSet,
            NvmlAffinityScope scope)
        {
            NvmlReturn Interop(uint len, ulong *ptr) =>
            DeviceGetCpuAffinityWithinScope_Interop(device, len, ptr, scope);

            return(FillNvmlArray(Interop, cpuSetSize, out cpuSet));
        }