This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // float->half variants. | |
| // by Fabian "ryg" Giesen. | |
| // | |
| // I hereby place this code in the public domain, as per the terms of the | |
| // CC0 license: | |
| // | |
| // https://creativecommons.org/publicdomain/zero/1.0/ | |
| // | |
| // float_to_half_full: This is basically the ISPC stdlib code, except | |
| // I preserve the sign of NaNs (any good reason not to?) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #define STR2(x) #x | |
| #define STR(x) STR2(x) | |
| #ifdef _WIN32 | |
| #define INCBIN_SECTION ".rdata, \"dr\"" | |
| #else | |
| #define INCBIN_SECTION ".rodata" | |
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <windows.h> | |
| #include <stdio.h> | |
| #include <assert.h> // for potential error handling, change to real errors in your code | |
| int main() | |
| { | |
| HANDLE pipe = CreateNamedPipeW( | |
| L"\\\\.\\pipe\\lolcat", | |
| PIPE_ACCESS_INBOUND | FILE_FLAG_FIRST_PIPE_INSTANCE | FILE_FLAG_OVERLAPPED, | |
| PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT | PIPE_REJECT_REMOTE_CLIENTS, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| setlocal EnableDelayedExpansion | |
| set BUILD_CACHE=%~dp0\_build_cache.cmd | |
| if exist "!BUILD_CACHE!" ( | |
| rem cache file exists, so call it to set env variables very fast | |
| call "!BUILD_CACHE!" | |
| ) else ( | |
| if not exist "%VS2019INSTALLDIR%\VC\Auxiliary\Build\vcvarsall.bat" ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright 2017 Josef N Patoprsty | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: | |
| # | |
| # The above copyright notice and this permission notice shall be included in all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // compile this to hook.dll | |
| // for example, with MSVC: cl.exe /LD /MT /O2 hook.c /Fehook.dll | |
| #include <windows.h> | |
| // get this from https://github.com/kubo/plthook | |
| #include "plthook_win32.c" | |
| static plthook_t* hook; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // Author: Jonathan Blow | |
| // Version: 1 | |
| // Date: 31 August, 2018 | |
| // | |
| // This code is released under the MIT license, which you can find at | |
| // | |
| // https://opensource.org/licenses/MIT | |
| // | |
| // |
Minimal D3D11 reference implementation: An uncluttered Direct3D 11 setup + basic rendering primer and API familiarizer. Complete, runnable Windows application contained in a single function and laid out in a linear, step-by-step fashion that should be easy to follow from the code alone. ~200 LOC. No modern C++ / OOP or (other) obscuring cruft. View on YouTube
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma once | |
| #define MEOW_HASH_VERSION 5 | |
| #define MEOW_HASH_VERSION_NAME "0.5/calico" | |
| // Meow hash v0.5 in C without dependency on special CPU instructions | |
| // Ported from https://github.com/cmuratori/meow_hash | |
| // Performance on Ryzen 9 3950X | |
| // AESNI code = ~16 bytes/cycle |
OlderNewer
