Run the following command using powershell
without as Administrator
:
notepad "$env:USERPROFILE/.wslconfig"
Put the following lines if you want to limit your WSL2 to 4GB of RAM and 2 CPUs:
[wsl2]
static const float3x3 lrgb2cone = { | |
0.412165612, 0.211859107, 0.0883097947, | |
0.536275208, 0.6807189584, 0.2818474174, | |
0.0514575653, 0.107406579, 0.6302613616, | |
}; | |
static const float3x3 cone2lab = { | |
+0.2104542553, +1.9779984951, +0.0259040371, | |
+0.7936177850, -2.4285922050, +0.7827717662, | |
+0.0040720468, +0.4505937099, -0.8086757660, |
TL;DR: to get accurate/useful numbers for MotionMark in Firefox you must set these flags in about:config and restart your browser:
layers.offmainthreadcomposition.frame-rate = 0 (defaults to -1)
privacy.reduceTimerPrecision = false (defaults to true)
The first enables "ASAP mode" which tells the browser to paint frames as much as possible, and the second disables an important Spectre security mitigation that reduces the precision.
https://$domain:$port { | |
gzip | |
log /var/log/caddy.log | |
tls $email | |
forwardproxy { | |
basicauth $user $passwd | |
} | |
} |
why doesn't radfft support AVX on PC?
So there's two separate issues here: using instructions added in AVX and using 256-bit wide vectors. The former turns out to be much easier than the latter for our use case.
Problem number 1 was that you positively need to put AVX code in a separate file with different compiler settings (/arch:AVX for VC++, -mavx for GCC/Clang) that make all SSE code emitted also use VEX encoding, and at the time radfft was written there was no way in CDep to set compiler flags for just one file, just for the overall build.
[There's the GCC "target" annotations on individual funcs, which in principle fix this, but I ran into nasty problems with this for several compiler versions, and VC++ has no equivalent, so we're not currently using that and just sticking with different compilation units.]
The other issue is to do with CPU power management.
This guide will provide you with a workaround for using XNA in Visual Studio 2017. This will solve problems with the target files and Microsoft.Build.Framework.dll such as:
Error loading pipeline assembly "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Microsoft.Build.Framework.dll"
<Installation />
tag in extension.vsixmanifest with this: <Installation InstalledByMsi="false">
<InstallationTarget Version="[12.0,16.0)" Id="Microsoft.VisualStudio.VSWinDesktopExpress" />
<InstallationTarget Version="[12.0,16.0)" Id="Microsoft.VisualStudio.Pro" />
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### |
The C standard only specifies minimum limits for the values of character types and standard integer types. This makes it possible to generate efficient code on diverse architectures, but can pose problematic if your code expects the limits to match your development platform, or if you have to do low-level things.
Before C99, the usual way to solve this was to use typedef to declare synonyms
#include <cstdio> | |
namespace detail { | |
template<unsigned count, template<unsigned...> class meta_functor, unsigned... indices> | |
struct apply_range { | |
typedef typename apply_range<count - 1, meta_functor, count - 1, indices...>::result result; | |
}; | |
template<template<unsigned...> class meta_functor, unsigned... indices> | |
struct apply_range<0, meta_functor, indices...> { |
/* SpriteBatch Stress Test | |
* Written by Ethan "flibitijibibo" Lee | |
* http://www.flibitijibibo.com/ | |
* | |
* Released under public domain. | |
* No warranty implied; use at your own risk. | |
*/ | |
using System; | |
using System.Diagnostics; |