Skip to content

Instantly share code, notes, and snippets.

View sebhtml's full-sized avatar

Sébastien Boisvert sebhtml

View GitHub Profile
uint64_t divide(uint64_t x) const {
/* instructions ending with a q are 64 bits instructions
add is 32 bits, addq is 64 bits
see http://www.cs.cmu.edu/~fp/courses/15213-s07/misc/asm64-handout.pdf
see http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html
__asm__("movq %0, %%rax"
: "=r" (x)
/*
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2008 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
#!/bin/bash
# how to use:
# first execute the on node1
# then run it on node2
# you have to change node1 and node2
firstPort=18515
lastPort=18525
iterations=1000000
#!/bin/bash
# how to use:
# first execute the on node1
# then run it on node2
# you have to change node1 and node2
firstPort=18515
lastPort=18525
iterations=1000000
bash: module: line 1: syntax error: unexpected end of file
bash: error importing function definition for `module'
error: commlib error: got select error (No route to host)
error: executing task of job 3031361 failed: failed sending task to execd@r104-n89: can't find connection
--------------------------------------------------------------------------
A daemon (pid 22600) died unexpectedly with status 1 while attempting
to launch so we are aborting.
There may be more information reported by the environment (see above).
while(running){
processInput();
updateGameState();
drawScreen();
}
while(running){
receiveMessagesInInbox();
readInboxMessages();
updateRankState();
sentOutboxMessages();
}