added threadfence
Added option for repetitions
Merge branch 'master' into no_mask

Conflicts:
	detector.cu