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 <iostream> | |
#include <random> | |
#include <cmath> | |
uint8_t encode(float x) | |
{ | |
int32_t t = static_cast<int32_t>(x*256); | |
return t<256? static_cast<uint8_t>(t) : 255; | |
} |
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
import os | |
import numpy as np | |
import torch | |
from torch import nn | |
from torch.nn import functional as F | |
from torch.autograd import Variable | |
from torch.utils.data import DataLoader,Dataset | |
from torchvision import transforms | |
from torchvision.datasets import MNIST |
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
/** | |
@file SVD.cpp | |
@author t-sakai | |
@date 2017/06/02 create | |
*/ | |
#include "SVD.h" | |
#include <stdio.h> | |
#include <limits> | |
namespace mmath |
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
--- | |
Language: Cpp | |
BasedOnStyle: Chromium | |
AccessModifierOffset: -4 | |
AlignAfterOpenBracket: Align | |
AlignConsecutiveAssignments: false | |
#AlignConsecutiveBitFields: false | |
AlignConsecutiveDeclarations: false | |
AlignConsecutiveMacros: false | |
AlignEscapedNewlines: DontAlign |
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 | |
#ifndef INC_REGEX_H_ | |
# define INC_REGEX_H_ | |
# include <CoreMinimal.h> | |
# include <Misc/CString.h> | |
namespace sregex | |
{ | |
constexpr uint32 pow2(uint32 x, uint32 s) |
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
int64_t m1 = 4294967087; | |
int64_t m2 = 4294944443; | |
int64_t a12 = 1403580; | |
int64_t a13n = 810728; | |
int64_t a21 = 527612; | |
int64_t a23n = 1370589; | |
int64_t s10, s11, s12, s20, s21, s22; | |
uint32_t MRG32k32a() |
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
namespace | |
{ | |
public static class ProjectTypes | |
{ | |
public const string ASP_NET_5 = "{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}"; // ASP.NET 5 | |
public const string ASP_NET_MVC_1 = "{603C0E0B-DB56-11DC-BE95-000D561079B0}"; // ASP.NET MVC 1 | |
public const string ASP_NET_MVC_2 = "{F85E285D-A4E0-4152-9332-AB1D724D3325}"; // ASP.NET MVC 2 | |
public const string ASP_NET_MVC_3 = "{E53F8FEA-EAE0-44A6-8774-FFD645390401}"; // ASP.NET MVC 3 | |
public const string ASP_NET_MVC_4 = "{E3E379DF-F4C6-4180-9B81-6769533ABE47}"; // ASP.NET MVC 4 | |
public const string ASP_NET_MVC_5 = "{349C5851-65DF-11DA-9384-00065B846F21}"; // ASP.NET MVC 5 |
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 "tshash.h" | |
#ifdef _MSC_VER | |
#include <intrin.h> | |
#define TSHASH_RESTRICT(x) x __restrict | |
#else | |
#define TSHASH_RESTRICT(x) x __restrict__ | |
#endif | |
#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 <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; | |
} |
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; |
NewerOlder