Add fence reference implementation