예제 #1
0
 public unsafe partial int EnqueueGenerateMipmap([Flow(FlowDirection.In)] nint command_queue, [Flow(FlowDirection.In)] nint src_image, [Flow(FlowDirection.In)] nint dst_image, [Flow(FlowDirection.In)] IMG mipmap_filter_mode, [Flow(FlowDirection.In)] nuint *array_region, [Flow(FlowDirection.In)] nuint *mip_region, [Flow(FlowDirection.In)] uint num_events_in_wait_list, [Flow(FlowDirection.In)] in nint event_wait_list, [Flow(FlowDirection.Out)] nint * @event);
예제 #2
0
 public static extern int CoGetContextToken([NativeTypeName("ULONG_PTR *")] nuint *pToken);
예제 #3
0
 public unsafe partial int GetKernelSubGroupInfo <T0>([Flow(FlowDirection.In)] nint in_kernel, [Flow(FlowDirection.In)] nint in_device, [Flow(FlowDirection.In)] uint param_name, [Flow(FlowDirection.In)] nuint input_value_size, [Flow(FlowDirection.In)] void *input_value, [Flow(FlowDirection.In)] nuint param_value_size, [Flow(FlowDirection.Out)] out T0 param_value, [Flow(FlowDirection.Out)] nuint *param_value_size_ret) where T0 : unmanaged;
예제 #4
0
 public static extern HRESULT RegisterScaleChangeEvent(HANDLE hEvent, [NativeTypeName("DWORD_PTR *")] nuint *pdwCookie);
예제 #5
0
 public int get_hPal([NativeTypeName("HHANDLE *")] nuint *phPal)
 {
     return(((delegate * unmanaged <IPicture2 *, nuint *, int>)(lpVtbl[4]))((IPicture2 *)Unsafe.AsPointer(ref this), phPal));
 }
예제 #6
0
 public HRESULT AdviseTime([NativeTypeName("REFERENCE_TIME")] long baseTime, [NativeTypeName("REFERENCE_TIME")] long streamTime, HEVENT hEvent, [NativeTypeName("DWORD_PTR *")] nuint *pdwAdviseCookie)
 {
     return(((delegate * unmanaged <IReferenceClock2 *, long, long, HEVENT, nuint *, int>)(lpVtbl[4]))((IReferenceClock2 *)Unsafe.AsPointer(ref this), baseTime, streamTime, hEvent, pdwAdviseCookie));
 }
 public int OpenUnbufferedFileHandle(IUnbufferedFileHandleOplockCallback *oplockBreakCallback, [NativeTypeName("DWORD_PTR *")] nuint *fileHandle)
 {
     return(((delegate * unmanaged <IUnbufferedFileHandleProvider *, IUnbufferedFileHandleOplockCallback *, nuint *, int>)(lpVtbl[3]))((IUnbufferedFileHandleProvider *)Unsafe.AsPointer(ref this), oplockBreakCallback, fileHandle));
 }
예제 #8
0
        /*! ZDICT_trainFromBuffer():
         *  Train a dictionary from an array of samples.
         *  Redirect towards ZDICT_optimizeTrainFromBuffer_fastCover() single-threaded, with d=8, steps=4,
         *  f=20, and accel=1.
         *  Samples must be stored concatenated in a single flat buffer `samplesBuffer`,
         *  supplied with an array of sizes `samplesSizes`, providing the size of each sample, in order.
         *  The resulting dictionary will be saved into `dictBuffer`.
         * @return: size of dictionary stored into `dictBuffer` (<= `dictBufferCapacity`)
         *          or an error code, which can be tested with ZDICT_isError().
         *  Note:  Dictionary training will fail if there are not enough samples to construct a
         *         dictionary, or if most of the samples are too small (< 8 bytes being the lower limit).
         *         If dictionary training fails, you should use zstd without a dictionary, as the dictionary
         *         would've been ineffective anyways. If you believe your samples would benefit from a dictionary
         *         please open an issue with details, and we can look into it.
         *  Note: ZDICT_trainFromBuffer()'s memory usage is about 6 MB.
         *  Tips: In general, a reasonable dictionary has a size of ~ 100 KB.
         *        It's possible to select smaller or larger size, just by specifying `dictBufferCapacity`.
         *        In general, it's recommended to provide a few thousands samples, though this can vary a lot.
         *        It's recommended that total size of all samples be about ~x100 times the target size of dictionary.
         */
        public static nuint ZDICT_trainFromBuffer(void *dictBuffer, nuint dictBufferCapacity, void *samplesBuffer, nuint *samplesSizes, uint nbSamples)
        {
            ZDICT_fastCover_params_t @params;

            memset((void *)&@params, 0, (nuint)(sizeof(ZDICT_fastCover_params_t)));
            @params.d     = 8;
            @params.steps = 4;
            @params.zParams.compressionLevel = 3;
            return(ZDICT_optimizeTrainFromBuffer_fastCover(dictBuffer, dictBufferCapacity, samplesBuffer, samplesSizes, nbSamples, &@params));
        }
예제 #9
0
        public static nuint ZDICT_addEntropyTablesFromBuffer(void *dictBuffer, nuint dictContentSize, nuint dictBufferCapacity, void *samplesBuffer, nuint *samplesSizes, uint nbSamples)
        {
            ZDICT_params_t @params;

            memset((void *)&@params, 0, (nuint)(sizeof(ZDICT_params_t)));
            return(ZDICT_addEntropyTablesFromBuffer_advanced(dictBuffer, dictContentSize, dictBufferCapacity, samplesBuffer, samplesSizes, nbSamples, @params));
        }
예제 #10
0
        /*! ZDICT_finalizeDictionary():
         * Given a custom content as a basis for dictionary, and a set of samples,
         * finalize dictionary by adding headers and statistics according to the zstd
         * dictionary format.
         *
         * Samples must be stored concatenated in a flat buffer `samplesBuffer`,
         * supplied with an array of sizes `samplesSizes`, providing the size of each
         * sample in order. The samples are used to construct the statistics, so they
         * should be representative of what you will compress with this dictionary.
         *
         * The compression level can be set in `parameters`. You should pass the
         * compression level you expect to use in production. The statistics for each
         * compression level differ, so tuning the dictionary for the compression level
         * can help quite a bit.
         *
         * You can set an explicit dictionary ID in `parameters`, or allow us to pick
         * a random dictionary ID for you, but we can't guarantee no collisions.
         *
         * The dstDictBuffer and the dictContent may overlap, and the content will be
         * appended to the end of the header. If the header + the content doesn't fit in
         * maxDictSize the beginning of the content is truncated to make room, since it
         * is presumed that the most profitable content is at the end of the dictionary,
         * since that is the cheapest to reference.
         *
         * `dictContentSize` must be >= ZDICT_CONTENTSIZE_MIN bytes.
         * `maxDictSize` must be >= max(dictContentSize, ZSTD_DICTSIZE_MIN).
         *
         * @return: size of dictionary stored into `dstDictBuffer` (<= `maxDictSize`),
         *          or an error code, which can be tested by ZDICT_isError().
         * Note: ZDICT_finalizeDictionary() will push notifications into stderr if
         *       instructed to, using notificationLevel>0.
         * NOTE: This function currently may fail in several edge cases including:
         *         * Not enough samples
         *         * Samples are uncompressible
         *         * Samples are all exactly the same
         */
        public static nuint ZDICT_finalizeDictionary(void *dictBuffer, nuint dictBufferCapacity, void *customDictContent, nuint dictContentSize, void *samplesBuffer, nuint *samplesSizes, uint nbSamples, ZDICT_params_t @params)
        {
            nuint hSize;
            byte *header            = stackalloc byte[256];
            int   compressionLevel  = (@params.compressionLevel == 0) ? 3 : @params.compressionLevel;
            uint  notificationLevel = @params.notificationLevel;

            if (dictBufferCapacity < dictContentSize)
            {
                return(unchecked ((nuint)(-(int)ZSTD_ErrorCode.ZSTD_error_dstSize_tooSmall)));
            }

            if (dictContentSize < 128)
            {
                return(unchecked ((nuint)(-(int)ZSTD_ErrorCode.ZSTD_error_srcSize_wrong)));
            }

            if (dictBufferCapacity < 256)
            {
                return(unchecked ((nuint)(-(int)ZSTD_ErrorCode.ZSTD_error_dstSize_tooSmall)));
            }

            MEM_writeLE32((void *)header, 0xEC30A437);

            {
                ulong randomID    = XXH64(customDictContent, dictContentSize, 0);
                uint  compliantID = (uint)((randomID % ((1U << 31) - 32768)) + 32768);
                uint  dictID      = @params.dictID != 0 ? @params.dictID : compliantID;

                MEM_writeLE32((void *)(header + 4), dictID);
            }

            hSize = 8;

            {
                nuint eSize = ZDICT_analyzeEntropy((void *)(header + hSize), 256 - hSize, compressionLevel, samplesBuffer, samplesSizes, nbSamples, customDictContent, dictContentSize, notificationLevel);

                if ((ZDICT_isError(eSize)) != 0)
                {
                    return(eSize);
                }

                hSize += eSize;
            }

            if (hSize + dictContentSize > dictBufferCapacity)
            {
                dictContentSize = dictBufferCapacity - hSize;
            }


            {
                nuint  dictSize = hSize + dictContentSize;
                sbyte *dictEnd  = (sbyte *)(dictBuffer) + dictSize;

                memmove((void *)(dictEnd - dictContentSize), customDictContent, dictContentSize);
                memcpy(dictBuffer, (void *)header, hSize);
                return(dictSize);
            }
        }
예제 #11
0
        private static nuint ZDICT_addEntropyTablesFromBuffer_advanced(void *dictBuffer, nuint dictContentSize, nuint dictBufferCapacity, void *samplesBuffer, nuint *samplesSizes, uint nbSamples, ZDICT_params_t @params)
        {
            int   compressionLevel  = (@params.compressionLevel == 0) ? 3 : @params.compressionLevel;
            uint  notificationLevel = @params.notificationLevel;
            nuint hSize             = 8;


            {
                nuint eSize = ZDICT_analyzeEntropy((void *)((sbyte *)(dictBuffer) + hSize), dictBufferCapacity - hSize, compressionLevel, samplesBuffer, samplesSizes, nbSamples, (void *)((sbyte *)(dictBuffer) + dictBufferCapacity - dictContentSize), dictContentSize, notificationLevel);

                if ((ZDICT_isError(eSize)) != 0)
                {
                    return(eSize);
                }

                hSize += eSize;
            }

            MEM_writeLE32(dictBuffer, 0xEC30A437);

            {
                ulong randomID    = XXH64((void *)((sbyte *)(dictBuffer) + dictBufferCapacity - dictContentSize), dictContentSize, 0);
                uint  compliantID = (uint)((randomID % ((1U << 31) - 32768)) + 32768);
                uint  dictID      = @params.dictID != 0 ? @params.dictID : compliantID;

                MEM_writeLE32((void *)((sbyte *)(dictBuffer) + 4), dictID);
            }

            if (hSize + dictContentSize < dictBufferCapacity)
            {
                memmove((void *)((sbyte *)(dictBuffer) + hSize), (void *)((sbyte *)(dictBuffer) + dictBufferCapacity - dictContentSize), dictContentSize);
            }

            return((dictBufferCapacity) < (hSize + dictContentSize) ? (dictBufferCapacity) : (hSize + dictContentSize));
        }
예제 #12
0
        private static nuint ZDICT_analyzeEntropy(void *dstBuffer, nuint maxDstSize, int compressionLevel, void *srcBuffer, nuint *fileSizes, uint nbFiles, void *dictBuffer, nuint dictBufferSize, uint notificationLevel)
        {
            uint *         countLit          = stackalloc uint[256];
            HUF_CElt_s *   hufTable          = stackalloc HUF_CElt_s[256];
            uint *         offcodeCount      = stackalloc uint[31];
            short *        offcodeNCount     = stackalloc short[31];
            uint           offcodeMax        = ZSTD_highbit32((uint)(dictBufferSize + (uint)(128 * (1 << 10))));
            uint *         matchLengthCount  = stackalloc uint[53];
            short *        matchLengthNCount = stackalloc short[53];
            uint *         litLengthCount    = stackalloc uint[36];
            short *        litLengthNCount   = stackalloc short[36];
            uint *         repOffset         = stackalloc uint[1024];
            offsetCount_t *bestRepOffset     = stackalloc offsetCount_t[4];
            EStats_ress_t  esr = new EStats_ress_t
            {
                dict      = null,
                zc        = null,
                workPlace = null,
            };
            ZSTD_parameters @params;
            uint            u, huffLog = 11, Offlog = 8, mlLog = 9, llLog = 9, total;
            nuint           pos = 0, errorCode;
            nuint           eSize             = 0;
            nuint           totalSrcSize      = ZDICT_totalSampleSize(fileSizes, nbFiles);
            nuint           averageSampleSize = totalSrcSize / (nbFiles + (uint)(nbFiles == 0 ? 1 : 0));
            byte *          dstPtr            = (byte *)(dstBuffer);

            if (offcodeMax > 30)
            {
                eSize = (unchecked ((nuint)(-(int)ZSTD_ErrorCode.ZSTD_error_dictionaryCreation_failed)));
                goto _cleanup;
            }

            for (u = 0; u < 256; u++)
            {
                countLit[u] = 1;
            }

            for (u = 0; u <= offcodeMax; u++)
            {
                offcodeCount[u] = 1;
            }

            for (u = 0; u <= 52; u++)
            {
                matchLengthCount[u] = 1;
            }

            for (u = 0; u <= 35; u++)
            {
                litLengthCount[u] = 1;
            }

            memset((void *)repOffset, 0, (nuint)(sizeof(uint) * 1024));
            repOffset[1] = repOffset[4] = repOffset[8] = 1;
            memset((void *)bestRepOffset, 0, (nuint)(sizeof(offsetCount_t) * 4));
            if (compressionLevel == 0)
            {
                compressionLevel = 3;
            }

            @params       = ZSTD_getParams(compressionLevel, (ulong)averageSampleSize, dictBufferSize);
            esr.dict      = ZSTD_createCDict_advanced(dictBuffer, dictBufferSize, ZSTD_dictLoadMethod_e.ZSTD_dlm_byRef, ZSTD_dictContentType_e.ZSTD_dct_rawContent, @params.cParams, ZSTD_defaultCMem);
            esr.zc        = ZSTD_createCCtx();
            esr.workPlace = malloc((nuint)((1 << 17)));
            if (esr.dict == null || esr.zc == null || esr.workPlace == null)
            {
                eSize = (unchecked ((nuint)(-(int)ZSTD_ErrorCode.ZSTD_error_memory_allocation)));
                goto _cleanup;
            }

            for (u = 0; u < nbFiles; u++)
            {
                ZDICT_countEStats(esr, &@params, (uint *)countLit, (uint *)offcodeCount, (uint *)matchLengthCount, (uint *)litLengthCount, (uint *)repOffset, (void *)((sbyte *)(srcBuffer) + pos), fileSizes[u], notificationLevel);
                pos += fileSizes[u];
            }


            {
                nuint maxNbBits = HUF_buildCTable((HUF_CElt_s *)hufTable, (uint *)countLit, 255, huffLog);

                if ((ERR_isError(maxNbBits)) != 0)
                {
                    eSize = maxNbBits;
                    goto _cleanup;
                }

                if (maxNbBits == 8)
                {
                    ZDICT_flatLit((uint *)countLit);
                    maxNbBits = HUF_buildCTable((HUF_CElt_s *)hufTable, (uint *)countLit, 255, huffLog);
                    assert(maxNbBits == 9);
                }

                huffLog = (uint)(maxNbBits);
            }


            {
                uint offset;

                for (offset = 1; offset < 1024; offset++)
                {
                    ZDICT_insertSortCount(bestRepOffset, offset, repOffset[offset]);
                }
            }

            total = 0;
            for (u = 0; u <= offcodeMax; u++)
            {
                total += offcodeCount[u];
            }

            errorCode = FSE_normalizeCount((short *)offcodeNCount, Offlog, (uint *)offcodeCount, total, offcodeMax, 1);
            if ((ERR_isError(errorCode)) != 0)
            {
                eSize = errorCode;
                goto _cleanup;
            }

            Offlog = (uint)(errorCode);
            total  = 0;
            for (u = 0; u <= 52; u++)
            {
                total += matchLengthCount[u];
            }

            errorCode = FSE_normalizeCount((short *)matchLengthNCount, mlLog, (uint *)matchLengthCount, total, 52, 1);
            if ((ERR_isError(errorCode)) != 0)
            {
                eSize = errorCode;
                goto _cleanup;
            }

            mlLog = (uint)(errorCode);
            total = 0;
            for (u = 0; u <= 35; u++)
            {
                total += litLengthCount[u];
            }

            errorCode = FSE_normalizeCount((short *)litLengthNCount, llLog, (uint *)litLengthCount, total, 35, 1);
            if ((ERR_isError(errorCode)) != 0)
            {
                eSize = errorCode;
                goto _cleanup;
            }

            llLog = (uint)(errorCode);

            {
                nuint hhSize = HUF_writeCTable((void *)dstPtr, maxDstSize, (HUF_CElt_s *)hufTable, 255, huffLog);

                if ((ERR_isError(hhSize)) != 0)
                {
                    eSize = hhSize;
                    goto _cleanup;
                }

                dstPtr     += hhSize;
                maxDstSize -= hhSize;
                eSize      += hhSize;
            }


            {
                nuint ohSize = FSE_writeNCount((void *)dstPtr, maxDstSize, (short *)offcodeNCount, 30, Offlog);

                if ((ERR_isError(ohSize)) != 0)
                {
                    eSize = ohSize;
                    goto _cleanup;
                }

                dstPtr     += ohSize;
                maxDstSize -= ohSize;
                eSize      += ohSize;
            }


            {
                nuint mhSize = FSE_writeNCount((void *)dstPtr, maxDstSize, (short *)matchLengthNCount, 52, mlLog);

                if ((ERR_isError(mhSize)) != 0)
                {
                    eSize = mhSize;
                    goto _cleanup;
                }

                dstPtr     += mhSize;
                maxDstSize -= mhSize;
                eSize      += mhSize;
            }


            {
                nuint lhSize = FSE_writeNCount((void *)dstPtr, maxDstSize, (short *)litLengthNCount, 35, llLog);

                if ((ERR_isError(lhSize)) != 0)
                {
                    eSize = lhSize;
                    goto _cleanup;
                }

                dstPtr     += lhSize;
                maxDstSize -= lhSize;
                eSize      += lhSize;
            }

            if (maxDstSize < 12)
            {
                eSize = (unchecked ((nuint)(-(int)ZSTD_ErrorCode.ZSTD_error_dstSize_tooSmall)));
                goto _cleanup;
            }

            MEM_writeLE32((void *)(dstPtr + 0), repStartValue[0]);
            MEM_writeLE32((void *)(dstPtr + 4), repStartValue[1]);
            MEM_writeLE32((void *)(dstPtr + 8), repStartValue[2]);
            eSize += 12;
_cleanup:
            ZSTD_freeCDict(esr.dict);
            ZSTD_freeCCtx(esr.zc);
            free(esr.workPlace);
            return(eSize);
        }
예제 #13
0
 public HRESULT ProgressAdvise(IDiscMasterProgressEvents *pEvents, [NativeTypeName("UINT_PTR *")] nuint *pvCookie)
 {
     return(((delegate * unmanaged <IDiscMaster *, IDiscMasterProgressEvents *, nuint *, int>)(lpVtbl[11]))((IDiscMaster *)Unsafe.AsPointer(ref this), pEvents, pvCookie));
 }
 public unsafe partial int GetKernelSuggestedLocalWorkSize([Flow(FlowDirection.In)] nint command_queue, [Flow(FlowDirection.In)] nint kernel, [Flow(FlowDirection.In)] uint work_dim, [Flow(FlowDirection.In)] nuint *global_work_offset, [Flow(FlowDirection.In)] in nuint global_work_size, [Flow(FlowDirection.Out)] nuint *suggested_local_work_size);
예제 #15
0
 // [Verify (PlatformInvoke)]
 static extern unsafe void *NewBase64Decode(sbyte *inputBuffer, nuint length, nuint *outputLength);
 public static unsafe int GetLayerInfo <T0>(this LoaderLayers thisApi, [Flow(FlowDirection.In)] nuint param_value_size, [Flow(FlowDirection.In)] uint param_name, [Flow(FlowDirection.Out)] Span <T0> param_value, [Flow(FlowDirection.Out)] nuint *param_value_size_ret) where T0 : unmanaged
 {
     // SpanOverloader
     return(thisApi.GetLayerInfo(param_value_size, param_name, out param_value.GetPinnableReference(), param_value_size_ret));
 }
예제 #17
0
 // [Verify (PlatformInvoke)]
 // [return: NullAllowed]
 static extern unsafe sbyte *NewBase64Encode(void *inputBuffer, nuint length, bool separateLines, nuint *outputLength);
예제 #18
0
        // Try to atomically claim a sequence of `count` bits in a single
        // field at `idx` in `bitmap`. Returns `true` on success.
        private static bool mi_bitmap_try_find_claim_field([NativeTypeName("mi_bitmap_t")] nuint *bitmap, [NativeTypeName("size_t")] nuint idx, [NativeTypeName("const size_t")] nuint count, [NativeTypeName("mi_bitmap_index_t*")] out nuint bitmap_idx)
        {
            nuint *field = &bitmap[idx];
            nuint  map   = mi_atomic_load_relaxed(ref *field);

            if (map == MI_BITMAP_FIELD_FULL)
            {
                // short cut
                bitmap_idx = 0;
                return(false);
            }

            // search for 0-bit sequence of length count

            nuint mask       = mi_bitmap_mask_(count, 0);
            nuint bitidx_max = MI_BITMAP_FIELD_BITS - count;

            // quickly find the first zero bit if possible
            nuint bitidx = mi_bsf(~map);

            // invariant: m == mask shifted by bitidx
            nuint m = mask << (int)bitidx;

            // scan linearly for a free range of zero bits
            while (bitidx <= bitidx_max)
            {
                if ((map & m) == 0)
                {
                    // are the mask bits free at bitidx?

                    // no overflow?
                    mi_assert_internal((MI_DEBUG > 1) && ((m >> (int)bitidx) == mask));

                    nuint newmap = map | m;
                    mi_assert_internal((MI_DEBUG > 1) && (((newmap ^ map) >> (int)bitidx) == mask));

                    if (!mi_atomic_cas_weak_acq_rel(ref *field, ref map, newmap))
                    {
                        // TODO: use strong cas here?
                        // no success, another thread claimed concurrently.. keep going (with updated `map`)
                        continue;
                    }
                    else
                    {
                        // success, we claimed the bits!
                        bitmap_idx = mi_bitmap_index_create(idx, bitidx);
                        return(true);
                    }
                }
                else
                {
                    // on to the next bit range

                    nuint shift = (count == 1) ? 1 : (mi_bsr(map & m) - bitidx + 1);
                    mi_assert_internal((MI_DEBUG > 1) && (shift > 0) && (shift <= count));

                    bitidx += shift;
                    m     <<= (int)shift;
                }
            }

            // no bits found
            bitmap_idx = 0;
            return(false);
        }
예제 #19
0
 public HRESULT AdvisePeriodic([NativeTypeName("REFERENCE_TIME")] long startTime, [NativeTypeName("REFERENCE_TIME")] long periodTime, HSEMAPHORE hSemaphore, [NativeTypeName("DWORD_PTR *")] nuint *pdwAdviseCookie)
 {
     return(((delegate * unmanaged <IReferenceClock2 *, long, long, HSEMAPHORE, nuint *, int>)(lpVtbl[5]))((IReferenceClock2 *)Unsafe.AsPointer(ref this), startTime, periodTime, hSemaphore, pdwAdviseCookie));
 }
예제 #20
0
 private static bool mi_bitmap_is_claimed([NativeTypeName("mi_bitmap_t")] nuint *bitmap, [NativeTypeName("size_t")] nuint bitmap_fields, [NativeTypeName("size_t")] nuint count, [NativeTypeName("mi_bitmap_index_t")] nuint bitmap_idx)
 => mi_bitmap_is_claimedx(bitmap, bitmap_fields, count, bitmap_idx, out _);
예제 #21
0
 public void GetTypeName([NativeTypeName("LPSTR")] sbyte *pTypeName, [NativeTypeName("SIZE_T *")] nuint *pBufferLength)
 {
     ((delegate * stdcall <ID3D11ClassInstance *, sbyte *, nuint *, void>)(lpVtbl[10]))((ID3D11ClassInstance *)Unsafe.AsPointer(ref this), pTypeName, pBufferLength);
 }
예제 #22
0
 private static bool mi_bitmap_is_any_claimed([NativeTypeName("mi_bitmap_t")] nuint *bitmap, [NativeTypeName("size_t")] nuint bitmap_fields, [NativeTypeName("size_t")] nuint count, [NativeTypeName("mi_bitmap_index_t")] nuint bitmap_idx)
 {
     _ = mi_bitmap_is_claimedx(bitmap, bitmap_fields, count, bitmap_idx, out bool any_ones);
     return(any_ones);
 }
예제 #23
0
 /// <summary>To be documented.</summary>
 public static unsafe Result GetValidationCacheData <T0>(this ExtValidationCache thisApi, [Count(Count = 0)] Device device, [Count(Count = 0)] ValidationCacheEXT validationCache, [Count(Count = 0)] nuint *pDataSize, [Count(Parameter = "pDataSize")] Span <T0> pData) where T0 : unmanaged
 {
     // SpanOverloader
     return(thisApi.GetValidationCacheData(device, validationCache, pDataSize, ref pData.GetPinnableReference()));
 }
예제 #24
0
 public unsafe partial int GetLayerInfo([Flow(FlowDirection.In)] nuint param_value_size, [Flow(FlowDirection.In)] uint param_name, [Flow(FlowDirection.Out)] void *param_value, [Flow(FlowDirection.Out)] nuint *param_value_size_ret);
예제 #25
0
 public int SelectPicture([NativeTypeName("HDC")] IntPtr hDCIn, [NativeTypeName("HDC *")] IntPtr *phDCOut, [NativeTypeName("HHANDLE *")] nuint *phBmpOut)
 {
     return(((delegate * unmanaged <IPicture2 *, IntPtr, IntPtr *, nuint *, int>)(lpVtbl[11]))((IPicture2 *)Unsafe.AsPointer(ref this), hDCIn, phDCOut, phBmpOut));
 }
예제 #26
0
 public unsafe partial int GetLayerInfo <T0>([Flow(FlowDirection.In)] nuint param_value_size, [Flow(FlowDirection.In)] uint param_name, [Flow(FlowDirection.Out)] out T0 param_value, [Flow(FlowDirection.Out)] nuint *param_value_size_ret) where T0 : unmanaged;
예제 #27
0
 public unsafe partial int GetKernelSubGroupInfo([Flow(FlowDirection.In)] nint in_kernel, [Flow(FlowDirection.In)] nint in_device, [Flow(FlowDirection.In)] uint param_name, [Flow(FlowDirection.In)] nuint input_value_size, [Flow(FlowDirection.In)] void *input_value, [Flow(FlowDirection.In)] nuint param_value_size, [Flow(FlowDirection.Out)] void *param_value, [Flow(FlowDirection.Out)] nuint *param_value_size_ret);
예제 #28
0
 public int Query([NativeTypeName("IUnknown *")] IUnknown *pPrx, RPCOPT_PROPERTIES dwProperty, [NativeTypeName("ULONG_PTR *")] nuint *pdwValue)
 {
     return(((delegate * unmanaged <IRpcOptions *, IUnknown *, RPCOPT_PROPERTIES, nuint *, int>)(lpVtbl[4]))((IRpcOptions *)Unsafe.AsPointer(ref this), pPrx, dwProperty, pdwValue));
 }
예제 #29
0
 public static unsafe void BindBuffersRange(this ArbMultiBind thisApi, [Flow(FlowDirection.In)] BufferTargetARB target, [Flow(FlowDirection.In)] uint first, [Flow(FlowDirection.In)] uint count, [Count(Parameter = "count"), Flow(FlowDirection.In)] ReadOnlySpan <uint> buffers, [Count(Parameter = "count"), Flow(FlowDirection.In)] nint *offsets, [Count(Parameter = "count"), Flow(FlowDirection.In)] nuint *sizes)
 {
     // SpanOverloader
     thisApi.BindBuffersRange(target, first, count, in buffers.GetPinnableReference(), offsets, sizes);
 }
예제 #30
0
 public static partial void mi_process_info([NativeTypeName("size_t*")] nuint *elapsed_msecs, [NativeTypeName("size_t*")] nuint *user_msecs, [NativeTypeName("size_t*")] nuint *system_msecs, [NativeTypeName("size_t*")] nuint *current_rss, [NativeTypeName("size_t*")] nuint *peak_rss, [NativeTypeName("size_t*")] nuint *current_commit, [NativeTypeName("size_t*")] nuint *peak_commit, [NativeTypeName("size_t*")] nuint *page_faults);