Skip to content

Instantly share code, notes, and snippets.

@ocxtal
ocxtal / ed.h
Last active January 7, 2022 18:57
Myers bit-parallel edit-distance algorithm
/**
* @file ed.h
*
* @brief the bit-parallel dynamic programming algorithm
*
* @detail
* References:
* Myers, G. (1999). A fast bit-vector algorithm for approximate string
* matching based on dynamic programming. Journal of the ACM 46(3),
@ocxtal
ocxtal / bitcnt.h
Created December 5, 2016 13:15
popcnt / tzcnt / lzcnt wrapper for x86_64 gcc / clang environments
#ifndef _BITCNT_H
#define _BITCNT_H
#include <x86intrin.h>
#include <stdint.h>
/**
* misc bit operations (popcnt, tzcnt, and lzcnt)
*/