Skip to content

Instantly share code, notes, and snippets.

$ git status
# On branch master
# Changes not staged for commit:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# deleted: Makefile
#
no changes added to commit (use "git add" and/or "git commit -a")
commit f3b22299a6ca831f1534ceb6660e0c737dac4d46
suspicious merge in files:
modified in both, took ^1 .travis.yml
modified in both, took ^1 README.md
modified in both, took ^1 src/main/scala/com/romix/akka/serialization/kryo/NoneSerializer.scala
modified in both, took ^1 src/main/scala/com/signalcollect/DataFlowVertex.scala
modified in both, took ^1 src/main/scala/com/signalcollect/DataGraphVertex.scala
modified in both, took ^1 src/main/scala/com/signalcollect/ExecutionConfiguration.scala
modified in both, took ^1 src/main/scala/com/signalcollect/ExecutionInformation.scala
modified in both, took ^1 src/main/scala/com/signalcollect/Graph.scala
thomas@linux-k42r:~/g(next u+36)$ touch README
thomas@linux-k42r:~/g(next u+36)$ find -type f -exec stat -c '%Y %n' {} \; | sort -n | tail -1
1370613170 ./README
thomas@linux-k42r:~/g(next u+36)$ git reset --hard
HEAD is now at 674552a Merge remote-tracking branch 'refs/remotes/origin/next' into next
thomas@linux-k42r:~/g(next u+36)$ find -type f -exec stat -c '%Y %n' {} \; | sort -n | tail -1
1370613217 ./.git/index
git-filter-branch.sh | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git i/git-filter-branch.sh w/git-filter-branch.sh
index ac2a005..086807c 100755
--- i/git-filter-branch.sh
+++ w/git-filter-branch.sh
@@ -137,7 +137,12 @@ do
# all switches take one argument
#include <stdio.h>
#include <float.h>
#include <assert.h>
#include <fenv.h>
#include <math.h>
/*
* We use GCC vector extensions (the vector_size attribute) to keep
* the code as generic as possible. The only exception here is the
* sqrt function; as of this writing there does not seem to be a way
#ifndef __AVX__
#error "You need to compile this with -mavx"
#endif
typedef float v32float __attribute__((vector_size(32)));
v32float sqrt_right(v32float x) {
v32float r;
__asm__ __volatile__ ("vsqrtps %1, %0"
: "=x"(r) : "xm"(x));
typedef float v32float __attribute__((vector_size(32)));
v32float sqrt_v32float(v32float x) {
v32float r;
#ifdef __AVX__
__asm__ __volatile__ ("VSQRTPS %0, %1" : "=x"(r) : "xm"(x));
#else
int i;
for (i = 0; i < 8; i++)
r[i] = sqrtf(x[i]);
#endif
@trast
trast / gist:5598179
Last active December 17, 2015 10:58
#include <stdio.h>
#include <float.h>
#include <assert.h>
#include <fenv.h>
#include <math.h>
/*
* Yay C template programming!
*
* The problem here is that the C++ support for the vector types is
$ ghc -threaded --make -i -ilib -fforce-recomp xmonad.hs -o xmonad-$(uname -m)-$(uname | tr A-Z a-z)
xmonad.hs:40:8:
Could not find module `Data.List.Utils'
Use -v to see a list of the files searched for
{- # OPTIONS_GHC -fglasgow-exts #-} -- For deriving Data/Typeable
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, PatternGuards,TypeSynonymInstances, DeriveDataTypeable, ViewPatterns #-}
import System.IO
import Control.Monad
import Control.OldException(catchDyn,try)
import XMonad.Util.Run
import Control.Concurrent
import Control.Arrow (second)
-- import DBus