This file contains 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
# Entering scope (function_definiton) | |
# Exiting scope (function_definition) | |
# Entering scope (function_definiton) | |
# Exiting scope (function_definition) | |
# Entering scope (function_definiton) | |
# Exiting scope (function_definition) | |
# Entering scope (function_definiton) | |
# Exiting scope (function_definition) | |
# Entering scope (function_definiton) |
This file contains 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
extern int external; | |
int global; | |
int init_global = 42; | |
short other(); | |
int main(int argc, char **argv) | |
{ | |
int x = 4; | |
int y; | |
y = argc * x; | |
return y; |
This file contains 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
uint32_t indexof_mipmap(int level) | |
{ | |
int mask = ~((level - 1) >> 31); | |
uint32_t lvl0sz = texture->iw * texture->ih; | |
int kept = 2 * (level - 1) & mask; | |
uint32_t mul = (0x55555555 >> ((32 - kept) - 2)) & mask; | |
return (lvl0sz * mul) >> (kept & mask); | |
} |
This file contains 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
#define __restrict __restrict__ | |
__kernel void genann_run_input_to_hidden( | |
genann_cfg const __constant *__restrict ann, | |
genann_real __global *__restrict data) | |
{ | |
// One work item per hidden neuron | |
size_t global_index = get_global_index(); | |
if (global_index >= ann->hidden) |
This file contains 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
int self_test(tokenizer_map const& tok) | |
{ | |
// Expect tok.size() to be 102495 | |
std::cerr << "Testing with " << tok.size() << " tokens\n"; | |
size_t input_size = tok.size() * context_size; | |
size_t output_size = tok.size(); | |
genann_real learning_rate = 0.3; | |
std::vector<genann_real> inputs(input_size); | |
std::vector<genann_real> outputs(output_size); |
This file contains 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
#!/bin/bash | |
ABS_SRCDIR="$( cd "$( dirname \ | |
"${BASH_SOURCE[0]}" )"&> /dev/null && pwd )" || exit | |
SRCDIR=$("${REALPATH:-realpath}" --relative-to="." "$ABS_SRCDIR") || \ | |
fail 'Unable to deduce relative path to source' | |
BUILDDIR=. | |
ABS_BUILDDIR=$(pwd) |
This file contains 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
#!/bin/bash | |
ABS_SRCDIR="$( cd "$( dirname \ | |
"${BASH_SOURCE[0]}" )"&> /dev/null && pwd )" || exit | |
SRCDIR=$("${REALPATH:-realpath}" --relative-to="." "$ABS_SRCDIR") || \ | |
fail 'Unable to deduce relative path to source' | |
BUILDDIR=. | |
ABS_BUILDDIR=$(pwd) |
This file contains 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
#define PIN_RESET 22 | |
#define PIN_MOSI 5 | |
#define PIN_MISO 19 | |
#define PIN_SCLK 21 | |
// Send the given byte and return the byte received (mode0) | |
byte spi_transfer(byte value = 0) | |
{ | |
// As we shift out outgoing bits out the top bits, | |
// we shift the incoming bits into the low bits |
This file contains 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
12 4 36 15 -3.31888371931660897118e+00 -1.04337192677125245588e+00 -3.79012892543003410140e-01 2.86632822110759223622e-02 4.14132155709385163522e-01 3.25695668774878765994e-01 3.27690851614163947136e-01 -3.20052122780711378880e+00 -1.11293770805292968618e+00 -1.48950839721825739614e-02 -9.99041465392087157937e-01 4.75569480097876140512e-01 4.18526715619733979956e-01 -4.12362291909578293492e-01 -4.63393354512348920604e-01 6.24375339304165222210e-01 3.91856805935784702211e-01 -3.00769805057327588305e-01 -1.93471698179205175983e+00 3.11506910581136498006e-01 3.85019834482236367190e-01 -2.71242438678600872315e-01 9.58505671571676320930e-01 3.29842984349095647012e-01 -5.25449446361040406472e-01 -4.11850474107172612181e-02 4.91172014171287252271e-01 1.17007634694636666883e-01 4.88890364233403706962e-01 1.08857060922103663358e+01 1.29565199704621464294e-01 2.67592915424762663179e-02 6.36369359867306094714e+00 -6.25974038031931190318e-02 -8.88303542570676729628e-02 6.81988870240996636340e+00 1.49439132870335750214e-0 |
This file contains 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
doug@doug-dt:~/code/tinymembench$ ./tinymembench | |
tinymembench v0.4.9 (simple benchmark for memory throughput and latency) | |
========================================================================== | |
== Memory bandwidth tests == | |
== == | |
== Note 1: 1MB = 1000000 bytes == | |
== Note 2: Results for 'copy' tests show how many bytes can be == | |
== copied per second (adding together read and writen == | |
== bytes would have provided twice higher numbers) == |
NewerOlder