Skip to content

An implementation of BDGL bucketing using GCC intrinsics

Notifications You must be signed in to change notification settings

joerowell/gcc-bucketer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gcc-bucketer

What's this?

This repository contains a slightly modified implementation of the AVX2 Bucketer that uses GCC's vector intrinsics as opposed to Intel's vector intrinsics. This allows the bucketer to be used on platforms that do not support AVX2.

This repository belongs to a much larger research project into lattice sieving across multiple platforms.

Acknowledgements

The code in this repository was initially taken from AVX2 Bucketer, and all of the really good ideas from this work come from that repository (i.e the use of the Hadamard transform for BDGL bucketing, the actual algorithms and all of the good insights). We are deeply grateful to the authors of that project for sharing their code with us at an early stage.

How to use:

We refer the reader to the excellent readme at AVX2 Bucketer for a description of the interface to the bucketer itself. Here we simply describe the added interface as part of this project.

The main namespace for this project is known as Simd. This namespace contains a variety of both low-level intrinsic functions for operations on vectors and for higher-level manipulations on these vectors.

As GCC is likely to generate poor object code (compared to hand-written intrinsics) we provide the ability to switch between using AVX2 instructions and the GCC vector code. To use AVX2 natively, define HAVE_AVX2 using the C preprocessor.

How to test:

This repository contains a series of test suites. Note that in order to run these tests you will need both CMAKE and googleTest.

Building tests:

mkdir build
cd build
cmake ../
make

This will produce a series of files that can be used for running tests.

  • Unit tests are provided in src/simd.t.cpp.
  • If you want to test the GCC vectors, run SimdGCCTests. If you want to use AVX2, run SimdIntelTests.
  • Minimal microbenchmarks are provided in src/simd.b.cpp. Running these requires the use of google benchmark. Assuming you have google benchmark you can run the code by executing the SimdBench program.
  • You can also use the test_lsh files for various statistics and dimensions. Again, the original code comes from the AVX2 Bucketer.

About

An implementation of BDGL bucketing using GCC intrinsics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published