This project has moved to https://github.com/jonhoo/drwmutex so it can be imported into Go applications.
// ---- Straightforward: | |
__m128i lo_int = _mm_and_si128(_mm_set1_epi32(0xffff), in); // low 16 bits of all vals | |
__m128i hi_int = _mm_srli_epi32(in, 16); // high 16 bits of all vals | |
__m128 lo_flt = _mm_cvtepi32_ps(lo_int); // exact (all 16 bit ints = machine numbers) | |
__m128 hi_flt = _mm_cvtepi32_ps(hi_int); // exact | |
__m128 hi_scl = _mm_mul_ps(hi_flt, _mm_set1_ps(65536.0f)); // exact (just exponent change) | |
__m128 result = _mm_add_ps(hi_scl, lo_flt); // this is the only step that rounds. | |
// same approach also works with FMA where available. |
So the general idea with FMA3 is that it's designed to have enough degrees of | |
freedom so you can just have a more general FMA4 op in the IR and pick the right | |
FMA3 op *very* late (ideally, after register allocation!). | |
The generalized FMA op looks like this: | |
dst = FMA ±src0, ±src1, ±src2 | |
where at most one of the src's can be a memory operand. This computes | |
(±src0 * ±src1) ± src2. The two signs for src0 and src1 combine |
Screen resolutions | |
------------------ | |
PICO-8 supports different undocumented videomodes that can be activated at runtime, | |
using poke(0x5F2C, X) where X is one of the following mode numbers: | |
0: 128x128, 0 pages | |
1: 64x128, 1 page | |
2: 128x64, 1 page | |
3: 64x64, 3 pages |
A list of simple tasks to perform when learning or evaluating a new language. Each of these should be able to be completed in a few hours, and will help to get the feel of the language and its standard libraries. A well-rounded set of evaluation tasks will help ensure all parts of the language are exercised. You might also write some tests to demonstrate implementation correctness.
- Hello world
- Read lines from a text file and output them in sorted order
- Read numbers from a text file and output the mean and standard deviation
- Given an amount of money and a list of coin denominations provided on the command line, output all the possible ways to make change
This information applies to the PICO-8 0.1.6
release.
This document is here to help folks with a proficiency in Lua understand the limitations and discrepencies between Lua and PICO-8's Lua.
You can always view the manual or yellowafterlife's extended 0.1.1
manual.
- anything written in uppercase the PICO-8 editor or .p8 is made lowercase by the editor. → editing the .p8 file directly can work
print(function() end)
outputs the stringfunction
instead of the stringfunction: 0x0000000
.
Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.
#pragma once | |
#include "IconsFontAwesome.h" // from https://github.com/juliettef/IconFontCppHeaders | |
namespace ImGui | |
{ | |
inline void SetupImGuiStyle( bool bStyleDark_, float alpha_ ) | |
{ |
enum { BMAX = 32, BMIN = BMAX / 2, BHEIGHT = 6 }; | |
struct BNode { | |
uint32_t length; | |
Key keys[BMAX]; | |
union { | |
BNode *children[BMAX]; | |
Value values[BMAX]; | |
}; | |
}; |