From Numerical Cosmology to Efficient Bit Abstractions for the Standard Library - Vincent Reverdy - CppCon 2016 | Physical Cosmology | Supercomputer

Please download to get full document.

View again

of 86
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Information Report
Category:

Documents

Published:

Views: 10 | Pages: 86

Extension: PDF | Download: 0

Share
Related documents
Description
dddadad
Transcript
    Introduction Motivation   Current status   The Bit Library   Details   Illustration   Conclusions   From Numerical Cosmology toEfficient Bit Abstractions for the Standard Library Vincent Reverdy Department of AstronomyUniversity of Illinois at Urbana-Champaign (UIUC) September 21, 2016 Efficient Bit Abstractions - Vincent Reverdy - CPPCON 2016 1    Introduction Motivation   Current status   The Bit Library   Details   Illustration   Conclusions   Prologue Efficient Bit Abstractions - Vincent Reverdy - CPPCON 2016 2    Introduction Motivation   Current status   The Bit Library   Details   Illustration   Conclusions What is this talk about? Levels of parallelism from Bryce’s talk  Alternative titlesBit-level parallelism (manipulating bit sequences by chunks)Abstracting bitsOn bit manipulation algorithms for the standard libraryWhat’s wrong with you  std::vector<bool> ?Reinventing  std::bitset  and  std::vector<bool> Counting bits 100 ×  faster than with  std::vector<bool> Playing with 0 and 1 Efficient Bit Abstractions - Vincent Reverdy - CPPCON 2016 3    Introduction Motivation   Current status   The Bit Library   Details   Illustration   Conclusions Using bit utilities in less than 2 minutes (1/2) Step 1: Clone and downloadWith  git :  git clone https://github.com/vreverdy/bit.git Without  git : go on the page  https://github.com/vreverdy/bit , click on Clone or download → Download ZIP , download, and unzip it.Step 2: Run a minimal test case 1  #include <iostream > 2  #include  ./bit/cpp/bit.hpp  // Your path to bit.hpp 3  using namespace bit; 45  int main(int argc, char ∗  argv[]) { 6  using uint_t = unsigned int; 7  uint_t n = 42; 8  auto first = bit_iterator <uint_t ∗ >(&n); 9  auto last = bit_iterator <uint_t ∗ >(&n + 1); 10  for (; first != last; ++first) std::cout<< ∗ first; 11  std::cout<<std::endl; 12  return 0; 13  } 1415  // Compilation with GCC: g++  − std=c++14  − pedantic  − O3 main.cpp  − o main 16  // Output: 01010100000000000000000000000000 Compile it and run it, it should display the bits of   n  from the LSB to the MSB. Efficient Bit Abstractions - Vincent Reverdy - CPPCON 2016 4
Recommended
View more...
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks