Flexible, portable, performant structures of bit fields in C++
Results 1 to 2 of 2

Thread: Flexible, portable, performant structures of bit fields in C++

  1. #1
    Registered User
    Join Date
    Jul 2016
    Location
    Raleigh, North Carolina, USA
    Posts
    1

    Post Flexible, portable, performant structures of bit fields in C++

    I've written a header file (bitfield.h) that provides structures of bit fields as a template/macro library:

    https://github.com/wkaras/C-plus-plu...ary-bit-fields.

    It is more portable and flexible, and has comparable performance to the bit field feature of the base language. At least, the code optimization looks good using gcc, I'm not able to check with VC++. For example, to xor 33 into a bitfield:

    BITF(My_descriptor, my_target, sub_struct.some_field) ^= 33;

    It's possible to directly access bit fields in device registers, including device registers accessed using inp/outp. This works even when device registers are accessed indirectly, via a register address and read/write buffer combo.

  2. #2
    Registered User
    Join Date
    May 2017
    Posts
    1
    Hi, thanks for your git. However, here is a point:
    "G++ uses more than 3GB of memory (I estimated 6, although I couldn't be sure as the memory monitor stopped working the moment thrashing started). CLang++ only uses up to 1.4 GB of memory although it can take 3-5 minutes too and use up one core fully (ensure you have proper cooling)."

Similar Threads

  1. Who likes XP Registry structures!?!?!
    By Niclo Iste in forum Windows XP
    Replies: 8
    Last Post: March 5th, 2008, 01:01 PM
  2. Strawberry Fields Forever!
    By TripleRLtd in forum Tech Lounge & Tales
    Replies: 4
    Last Post: December 9th, 2005, 12:07 PM
  3. Inconsistency in PC Bus Driver Structures
    By Laptop_problem in forum BIOS/Motherboard Drivers
    Replies: 3
    Last Post: January 17th, 2005, 01:35 AM
  4. Portable CD-RW
    By TrackMan in forum Tech-To-Tech
    Replies: 3
    Last Post: December 14th, 2001, 10:20 AM
  5. Replies: 5
    Last Post: February 22nd, 2001, 10:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •