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 <immintrin.h> | |
#include <emmintrin.h> | |
#include <cstdint> | |
#include <cmath> | |
#include <chrono> | |
#include <random> | |
typedef int8_t s8; | |
typedef int16_t s16; | |
typedef int32_t s32; |
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 <assert.h> | |
#include <stdint.h> | |
#include <wmmintrin.h> | |
#ifdef BUILD_EXPORTS | |
#define DLL_EXPORT __declspec(dllexport) | |
#else | |
#define DLL_EXPORT | |
#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 <stdint.h> | |
#define ROTL(a,b) (((a)<<(b)) | ((a)>>(32-(b)))) | |
#define QR(a,b,c,d) (\ | |
a += b, d ^= a, d = ROTL(d,16),\ | |
c += d, b ^= c, b = ROTL(b,12),\ | |
a += b, d ^= a, d = ROTL(d, 8),\ | |
c += d, b ^= c, b = ROTL(b, 7)) | |
#ifdef __cplusplus |
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 <random> | |
#include <iostream> | |
class mt_random | |
{ | |
public: | |
static constexpr uint32_t N = 624; | |
static constexpr uint32_t M = 397; | |
static constexpr uint32_t MATRIX_A = 0x9908B0DFUL; | |
static constexpr uint32_t UPPER_MASK = 0x80000000UL; |
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 <cstdint> | |
#include <cstring> | |
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
using s8 = int8_t; | |
using s16 = int16_t; | |
using s32 = int32_t; | |
using s64 = int64_t; |
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
cmake_minimum_required(VERSION 3.2) | |
set(CMAKE_CONFIGURATION_TYPES "Debug" "Release") | |
set(PROJECT_NAME Lua) | |
project(${PROJECT_NAME}) | |
set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) | |
######################################################################## |
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
@PACKAGE_INIT@ | |
set_and_check(Lua_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") | |
set_and_check(Lua_LIBRARY_DIR "@PACKAGE_LIBRARY_INSTALL_DIR@") | |
include("${CMAKE_CURRENT_LIST_DIR}/LuaTargets.cmake") |
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
void Mul(uniform float R[3], uniform const float V[3], uniform const float X) | |
{ | |
R[0] = V[0] * X; | |
R[1] = V[1] * X; | |
R[2] = V[2] * X; | |
} | |
float Dot(float X0, float Y0, float Z0, float X1, float Y1, float Z1) | |
{ |
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 "crater.h" | |
#include <cassert> | |
#ifdef _WIN32 | |
# include <Windows.h> | |
#endif | |
#define LAVA_VK_EXPORTED_FUNCTION(NAME) PFN_##NAME NAME; |
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 <stdint.h> | |
#include <stdio.h> | |
#if defined(__GNUC__) || defined(__clang__) | |
void mul(uint64_t* high, uint64_t* low, uint64_t x0, uint64_t x1) | |
{ | |
unsigned __int128 r = (unsigned __int128)x0 * (unsigned __int128)x1; | |
*high = r>>64; | |
*low = (uint64_t)r; | |
} |
OlderNewer