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
#include <ctime> | |
#include <iostream> | |
#include <SFML/Graphics.hpp> | |
#include <noise/noise.h> | |
class Game; | |
struct Entity | |
{ | |
enum Type |
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
Parents: | |
Genome A: | |
Name: test0 | |
Value: C | |
Crossover: false | |
Name: test1 | |
Value: B | |
Crossover: false | |
Name: test2 | |
Value: A |
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
#include <iostream> | |
#include <SFML/Window.hpp> | |
int main() | |
{ | |
sf::Window window(sf::VideoMode(800, 600), "test"); | |
const sf::Vector2i desired_position(200, 200); | |
while(window.isOpen()) |
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
string* addEntry(string* dynamicArray, int& size, string newEntry) | |
{ | |
string* newArray = new string[size+1]; | |
memcpy(newArray, dynamicArray, size*sizeof(string)); | |
newArray[size]=newEntry; | |
delete[] dynamicArray; | |
return newArray; | |
} |
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
#include <chrono> | |
#include <iostream> | |
#include <fea/util/noise.hpp> | |
int main() | |
{ | |
fea::Noise noise; | |
uint64_t min(-1), max(0), avg(0); | |
int steps = 10; |
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
asm_raw_noise_3d: | |
%line 80+1 ../src/util/asmnoise.asm | |
unpcklps xmm0,xmm1 | |
addss xmm1,xmm0 | |
addss xmm1,xmm2 | |
movlhps xmm0,xmm2 | |
mulss xmm1,[F3] |
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
#include <chrono> | |
#include <iostream> | |
#include <fea/util/noise.hpp> | |
int main() | |
{ | |
fea::Noise noise; | |
uint64_t min(-1), max(0), avg(0); | |
int steps = 10; |
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
/* | |
g++ | |
std::pow: Times (min, max, avg): 27635604us, 28006757us, 27696884us | |
expanded: Times (min, max, avg): 1318329us, 1409901us, 1335821us | |
jplatte's... thing: Times (min, max, avg): 7105522us, 7219386us, 7135305us | |
g++ -O3 | |
std::pow: Times (min, max, avg): 25542284us, 26192220us, 25633656us | |
expanded: Times (min, max, avg): 0us, 0us, 0us |
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
Program received signal SIGSEGV, Segmentation fault. | |
0x000000000041dab8 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x8c630000000008, __in_chrg=<optimized out>) | |
at /usr/include/c++/4.9.1/bits/shared_ptr_base.h:665 | |
665 if (_M_pi != nullptr) | |
(gdb) bt | |
#0 0x000000000041dab8 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x8c630000000008, __in_chrg=<optimized out>) | |
at /usr/include/c++/4.9.1/bits/shared_ptr_base.h:665 | |
#1 0x000000000041d57a in std::__shared_ptr<wind::Entity, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x8c630000000000, __in_chrg=<optimized out>) | |
at /usr/include/c++/4.9.1/bits/shared_ptr_base.h:914 | |
#2 0x000000000041d594 in std::shared_ptr<wind::Entity>::~shared_ptr (this=0x8c630000000000, __in_chrg=<optimized out>) |
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
char*c="code",*z="input",d['u0']={0}; | |
main(r,i,k){char*p=d;int s['~']={k=r=0},*l=s;while(i=c[r++])k?i==91?++k:i==93?k?--k:--k:0:(i==93?*p?r=*l:l--:i==91?*p?*++l=r:++k:0,p+=i==62,p-=i==60,i==46?putchar(*p):0,*p-=i==45,i==44?*p=*z++:0,*p+=i==43);} |