For simplicity, this will just go over the unsigned case
Written for someone, such as myself, who isn't as quick to put together the same logical steps
Given
Find
To motivate what we'll be doing, lets start by considering:
$$ \begin{align*}
For simplicity, this will just go over the unsigned case
Written for someone, such as myself, who isn't as quick to put together the same logical steps
Given
Find
To motivate what we'll be doing, lets start by considering:
$$ \begin{align*}
/// 256 length bit-vector | |
struct CharClass{ | |
u64 b[4]; | |
bool lo_empty(){ return (b[0] | b[1]) == 0; } | |
bool hi_empty(){ return (b[2] | b[3]) == 0; } | |
u64 lo_count(){ return PopCnt(b[0]) + PopCnt(b[1]); } | |
u64 hi_count(){ return PopCnt(b[2]) + PopCnt(b[3]); } | |
bool empty(){ return (b[0] | b[1] | b[2] | b[3]) == 0; } |
/// There might be some functionality you need to write for when the App closes | |
/// If so, I never bothered to implement it so... it's left as an exercise to the reader :) | |
#pragma pack(push, 8) | |
// Get Discord game SDK from https://discord.com/developers/docs/game-sdk/sdk-starter-guide | |
// Just use the C api, it's single-file and infinitely easier to implement | |
#include "path/to/discord_game_sdk.h" | |
#pragma pack(pop) | |
// Make sure the contents of the /lib/x86_64 is placed next to 4ed.exe |