Skip to content

Instantly share code, notes, and snippets.

@arsenm
arsenm / test script
Created July 6, 2011 22:19
test script
#!/usr/bin/env bash
dir="../../bin"
bin=${dir}/milkyway_separation
gpu="--device 0"
function runTest11()
{
gdb --args ${bin} ${gpu} -s stars/stars-11.txt -a astronomy_parameters-11-small.txt -np 20 -p 0.571713 12.312119 -3.305187 148.010257 22.453902 0.42035 -0.468858 0.760579 -1.361644 177.884238 23.882892 1.210639 -1.611974 8.534378 -1.361644 177.884238 10.882892 1.210639 -1.611974 8.534378
@arsenm
arsenm / LOL Functions
Created March 13, 2011 07:45
I made some kind of mess
-- Lua implementation of the curry function
-- Developed by tinylittlelife.org
-- released under the WTFPL (http://sam.zoy.org/wtfpl/)
-- curry(func, num_args) : take a function requiring a tuple for num_args arguments
-- and turn it into a series of 1-argument functions
-- e.g.: you have a function dosomething(a, b, c)
-- curried_dosomething = curry(dosomething, 3) -- we want to curry 3 arguments
-- curried_dosomething (a1) (b1) (c1) -- returns the result of dosomething(a1, b1, c1)
-- partial_dosomething1 = curried_dosomething (a_value) -- returns a function
@arsenm
arsenm / Xorg.0.log
Created January 28, 2011 15:41
My failing xorg.conf for Nvidia and Catalyst at the same time
[ 1068.681]
X.Org X Server 1.9.2
Release Date: 2010-10-30
[ 1068.681] X Protocol Version 11, Revision 0
[ 1068.681] Build Operating System: Linux 2.6.35-ARCH x86_64
[ 1068.681] Current Operating System: Linux stacy 2.6.37-stacy2 #6 SMP PREEMPT Fri Jan 21 09:51:58 EST 2011 x86_64
[ 1068.681] Kernel command line: BOOT_IMAGE=/vmlinuz26-stacy root=/dev/sda2 ro noagp noexec=on nomodeset
[ 1068.681] Build Date: 01 November 2010 10:29:19PM
[ 1068.681]
[ 1068.681] Current version of pixman: 0.20.2
$ ./lol.sh
bin = ../../bin/Release/milkyway_separation.exe
Time = 46.658166643268487
<background_integral> 0.00034440467776670287 </background_integral>
<stream_integrals> 34.16259801227084800000 667.25896879728009000000 336.16783412736845000000 </stream_integrals>
<background_only_likelihood> -3.30823499270256560000 </background_only_likelihood>
<stream_only_likelihood> -160.79815144357599000000 -4.18580676656694270000 -4.11982130330399520000 </stream_only_likelihood>
<search_likelihood> -3.12509788380323220000 </search_likelihood>
real 0m51.246s
void boinc_getcwd(char* path) {
#ifdef _WIN32
getcwd(path, 256);
#else
char* p
#ifdef __GNUC__
__attribute__ ((unused))
#endif
= getcwd(path, 256);
#endif
53049411636730049364977183833592720783945446837098506886765690646586252032562905344211659148061496676057316084032703594719903001839120462451732823564817360798951751576217114249315407137667818457137152.00000000000000000000
@arsenm
arsenm / gist:650659
Created October 28, 2010 04:52
Windows MSVC separation results attempt 2
20:41:56 (2540): Can't set up shared mem: -1. Will run in standalone mode.
<search_application> milkywayathome separation 0.44 Windows x86 double </search_application>
<background_integral> 0.00034440467776670287 </background_integral>
<stream_integrals> 34.16259801227085500000 667.25896879728009000000 336.16783412736845000000 </stream_integrals>
<background_only_likelihood> -3.30823499270256560000 </background_only_likelihood>
<stream_only_likelihood> -84.30633002421788500000 -4.18235635055069200000 -4.11982130330399520000 </stream_only_likelihood>
<search_likelihood> -3.12509788380323220000 </search_likelihood>
20:42:53 (2540): called boinc_finish