Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
694df71
fixed storage bit_array container
PeterCDMcLean Feb 25, 2025
0791450
Add LLM generated test cases
PeterCDMcLean Feb 27, 2025
022db7c
Add span container. Remove use of std::byte
PeterCDMcLean Mar 1, 2025
9e4467e
Elaborate on subspan. Add first, and last
PeterCDMcLean Mar 1, 2025
1b278bd
Cmake improvements
PeterCDMcLean Mar 1, 2025
a6c81ad
clang-format-19 file
PeterCDMcLean Mar 2, 2025
7136c9d
partially dynamic bit-array type
PeterCDMcLean Mar 3, 2025
4e89ddc
fsadf
PeterCDMcLean Mar 5, 2025
cc850da
default to dynamic extent
PeterCDMcLean Mar 5, 2025
4af3c5c
Change bitsof to use concepts
PeterCDMcLean Mar 5, 2025
d48445f
Add basic tests and clean up constructors
PeterCDMcLean Mar 5, 2025
4622fba
Add ctad for bit span
PeterCDMcLean Mar 8, 2025
bc148be
Drafting concepts to help compatibility between different bit iterators?
PeterCDMcLean Mar 14, 2025
01126b9
Consolidate concepts
PeterCDMcLean Mar 23, 2025
32db049
Begin templating for concepts
PeterCDMcLean Mar 23, 2025
9ad0e0c
from_range constructor for vector
PeterCDMcLean Mar 24, 2025
afeb0fb
consistent naming in array
PeterCDMcLean Mar 24, 2025
bc28d8a
Extend array to allow alignment
PeterCDMcLean Mar 24, 2025
39adffe
Alignment as template type instead of type
PeterCDMcLean Mar 24, 2025
cf87918
Simple backup copy for differing words
PeterCDMcLean Mar 26, 2025
7dbb7df
Order template types like std::array to allow for nested dynamic array<>
PeterCDMcLean Mar 28, 2025
b6314a7
tighten up the dynamic extent class. Add UDL
PeterCDMcLean Mar 29, 2025
27434f3
Hex or bin user defined literal
PeterCDMcLean Mar 29, 2025
3010eeb
User Defined Literals more restrictive than expected. Using quote as …
PeterCDMcLean Mar 30, 2025
c252e53
Unintuitive, but bit_reference methods can all be const, as the point…
PeterCDMcLean Apr 2, 2025
4cfb3ac
Working range based copy
PeterCDMcLean Apr 2, 2025
c50569d
Add half-open subscript operator to containers
PeterCDMcLean Apr 3, 2025
ad59cb2
Basic working slices
PeterCDMcLean Apr 4, 2025
42a6d3c
Add mdspan test. Change slice operator to ()
PeterCDMcLean Apr 10, 2025
b48a260
Use a true reference for bit_reference
PeterCDMcLean Apr 10, 2025
916b29c
const some members that should never change after construction
PeterCDMcLean Apr 11, 2025
c80456a
bit_pointer now holds pointer member
PeterCDMcLean Apr 11, 2025
1c6a879
Remove unneeded member functions from reference
PeterCDMcLean Apr 11, 2025
ba46b84
mask is not const for pointer
PeterCDMcLean Apr 11, 2025
e1bf56e
Set default WordType, fix mask/pos for dereference
PeterCDMcLean Apr 11, 2025
7266b73
Use iterator_type nested type
PeterCDMcLean Apr 12, 2025
26b63cf
Use template deduction
PeterCDMcLean Apr 12, 2025
732f4fa
Remove unneedded using
PeterCDMcLean Apr 12, 2025
f52c8b6
Replace bit_pointer with bit_iterator<word*>
PeterCDMcLean Apr 12, 2025
810c724
Add sources to CMake
PeterCDMcLean Apr 12, 2025
0bdc925
cleanup
PeterCDMcLean Apr 12, 2025
79699ea
Warnings and Tidying
PeterCDMcLean Apr 13, 2025
13cb512
casting integrals to/from bit_array
Peter-McLean-Altera Apr 14, 2025
5ca5148
Changes to support clang19
PeterCDMcLean Apr 25, 2025
1b4a6f7
cmake-multi-platform.yml
PeterCDMcLean Apr 25, 2025
6866b27
Fetch dependencies automatically if not package found
PeterCDMcLean Apr 25, 2025
8989a9c
Remove old actions
PeterCDMcLean Apr 25, 2025
21a83b5
Merge remote-tracking branch 'origin/array_casting' into bit_pointer_…
PeterCDMcLean Apr 25, 2025
841597a
Merge remote-tracking branch 'origin/master' into bit_pointer_is_iter…
PeterCDMcLean Apr 25, 2025
d641739
Enable test for workflow
PeterCDMcLean Apr 25, 2025
fefdc8f
Fix from_range and install clang-19
PeterCDMcLean Apr 25, 2025
8fbb7e1
yaml syntax
PeterCDMcLean Apr 25, 2025
dc8f841
Use libc++ for clang-19
PeterCDMcLean Apr 25, 2025
9c82f46
Removed windows action target
PeterCDMcLean Apr 26, 2025
6ee39fd
Add back coverage action
PeterCDMcLean Apr 26, 2025
ee3313b
Do not resolve mdspan dependency if it was previously add_subdirectory
Peter-McLean-Altera May 2, 2025
fdea67c
Presets and fix sanitize (#1)
PeterCDMcLean May 3, 2025
d0bfc09
Add codecov yml to filter libpopcnt.h
PeterCDMcLean May 3, 2025
9662806
Break up bitlib_utils. Seed tests from the test case name to prevent …
PeterCDMcLean May 4, 2025
0a31272
Fix Wdeprecated-copy implicitly declared ... is deprecated (#4)
Peter-McLean-Altera May 5, 2025
701068a
Make github action for benchmark (#3)
PeterCDMcLean May 7, 2025
a837637
compiler problem matchers (#6)
PeterCDMcLean May 8, 2025
152edeb
Common bit array base (#8)
PeterCDMcLean May 11, 2025
09dd4e6
Generate baseline coverage before running tests (#9)
PeterCDMcLean May 11, 2025
9126838
Add github workflow targets for warnings (#7)
PeterCDMcLean May 13, 2025
bbc929d
Remove unused linear_overload class
PeterCDMcLean May 20, 2025
d45f839
Add directly compatible copy constructor and assignment (#13)
Peter-McLean-Altera May 23, 2025
b5df9fb
Add support for signed word types. (#14)
PeterCDMcLean May 24, 2025
a32e9ae
Bitwise operators in bit_array_base (#11)
PeterCDMcLean May 25, 2025
0f0b787
Small buffer optimization (#16)
PeterCDMcLean Jun 13, 2025
e50fa03
Truncation policy (#17)
PeterCDMcLean Jun 17, 2025
d917039
Make bit::bit_array an alias of bit::array (#19)
PeterCDMcLean Jun 25, 2025
f46007d
Pipecleaning policy and casting issues (#20)
Peter-McLean-Altera Jul 6, 2025
b95418e
Update readme add doc (#21)
PeterCDMcLean Jul 6, 2025
212f3b7
Rearrange TOC and fix links
PeterCDMcLean Jul 7, 2025
47ad8d7
Add include to example
PeterCDMcLean Jul 7, 2025
53f3aac
Remove unused functions from bit_details. Replace some with stl <bit>…
PeterCDMcLean Jul 11, 2025
02a1d27
Necessary changes to work with clang cl cross compile toolchain (#23)
Peter-McLean-Altera Jul 12, 2025
079daa1
windows build and test with clang and msvc (#25)
PeterCDMcLean Jul 25, 2025
fd1dcf4
From string (#18)
PeterCDMcLean Aug 2, 2025
7290529
Remove unused transform_compare (can be implemented with accumulate w…
PeterCDMcLean Aug 2, 2025
6c9d776
Add clang-format workflow (#26)
PeterCDMcLean Aug 3, 2025
61746a6
Remove unused / empty debug_utils
PeterCDMcLean Aug 4, 2025
3fead7b
Use upload / download action instead of cache (#28)
PeterCDMcLean Aug 6, 2025
4adca69
Minor tweaks and improvements (#27)
PeterCDMcLean Aug 6, 2025
65d3132
Fix string conversion and many warnings (#29)
PeterCDMcLean Aug 8, 2025
464acce
Add additional from_string variants (#30)
PeterCDMcLean Aug 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
308 changes: 308 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,308 @@
---
Language: Cpp
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
AlignConsecutiveAssignments:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: true
AlignConsecutiveBitFields:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveDeclarations:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveMacros:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveShortCaseStatements:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCaseArrows: false
AlignCaseColons: false
AlignConsecutiveTableGenBreakingDAGArgColons:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveTableGenCondOperatorColons:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveTableGenDefinitionColons:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments:
Kind: Always
OverEmptyLines: 0
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowBreakBeforeNoexceptSpecifier: Never
AllowShortBlocksOnASingleLine: Never
AllowShortCaseExpressionOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: true
AllowShortCompoundRequirementOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AttributeMacros:
- __capability
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterExternBlock: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakAdjacentStringLiterals: true
BreakAfterAttributes: Leave
BreakAfterJavaFieldAnnotations: false
BreakAfterReturnType: None
BreakArrays: true
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: Always
BreakBeforeBraces: Attach
BreakBeforeInlineASMColon: OnlyMultiline
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakFunctionDefinitionParameters: false
BreakInheritanceList: BeforeColon
BreakStringLiterals: true
BreakTemplateDeclarations: Yes
ColumnLimit: 0
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: true
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<ext/.*\.h>'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^<.*\.h>'
Priority: 1
SortPriority: 0
CaseSensitive: false
- Regex: '^<.*'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 3
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '([-_](test|unittest))?$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: true
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
IndentRequiresClause: true
IndentWidth: 2
IndentWrappedFunctionNames: false
InsertBraces: true
InsertNewlineAtEOF: false
InsertTrailingCommas: None
IntegerLiteralSeparator:
Binary: 0
BinaryMinDigits: 0
Decimal: 0
DecimalMinDigits: 0
Hex: 0
HexMinDigits: 0
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLines:
AtEndOfFile: false
AtStartOfBlock: false
AtStartOfFile: true
LambdaBodyIndentation: Signature
LineEnding: DeriveLF
MacroBlockBegin: ''
MacroBlockEnd: ''
MainIncludeChar: Quote
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Never
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: NextLine
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakScopeResolution: 500
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
PPIndentWidth: -1
QualifierAlignment: Leave
RawStringFormats:
- Language: Cpp
Delimiters:
- cc
- CC
- cpp
- Cpp
- CPP
- 'c++'
- 'C++'
CanonicalDelimiter: ''
BasedOnStyle: google
- Language: TextProto
Delimiters:
- pb
- PB
- proto
- PROTO
EnclosingFunctions:
- EqualsProto
- EquivToProto
- PARSE_PARTIAL_TEXT_PROTO
- PARSE_TEST_PROTO
- PARSE_TEXT_PROTO
- ParseTextOrDie
- ParseTextProtoOrDie
- ParseTestProto
- ParsePartialTestProto
CanonicalDelimiter: pb
BasedOnStyle: google
ReferenceAlignment: Pointer
ReflowComments: false
RemoveBracesLLVM: false
RemoveParentheses: Leave
RemoveSemicolon: false
RequiresClausePosition: OwnLine
RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SkipMacroDefinitionBody: false
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: LexicographicNumeric
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeJsonColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDefinitionName: false
AfterFunctionDeclarationName: false
AfterIfMacros: true
AfterOverloadedOperator: false
AfterPlacementOperator: true
AfterRequiresInClause: false
AfterRequiresInExpression: false
BeforeNonEmptyParentheses: false
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: Never
SpacesInContainerLiterals: true
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParens: Never
SpacesInParensOptions:
ExceptDoubleParentheses: false
InCStyleCasts: false
InConditionalStatements: false
InEmptyParentheses: false
Other: false
SpacesInSquareBrackets: false
Standard: Auto
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TableGenBreakInsideDAGArg: DontBreak
TabWidth: 2
UseTab: Never
VerilogBreakBetweenInstancePorts: true
WhitespaceSensitiveMacros:
- BOOST_PP_STRINGIZE
- CF_SWIFT_NAME
- NS_SWIFT_NAME
- PP_STRINGIZE
- STRINGIZE
...

5 changes: 5 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ignore:
- "**/libpopcnt.h"
- "test/**"
- "benchmark/**"
- "example/**"
79 changes: 79 additions & 0 deletions .github/actions/benchmark_epilogue/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: "Benchmark Epilogue"
description: "Processes coverage information with lcov and uploads it to coveralls/codecov"
inputs:
workspace:
required: True
description: "Source code / workspace"
compiler:
required: True
description: 'Compiler used to build benchmark'
os:
required: True
description: 'OS used to build benchmark'
stdlib:
required: True
description: 'C++ standard library used to build benchmark'
build-output-dir:
required: true
description: 'Build output directory'
base_ref:
required: true
description: 'Base ref for PR/comparison'
cpp_compiler:
required: true
description: 'Cpp compiler to use'
c_compiler:
required: true
description: 'C compiler to use'
build_type:
required: true
description: 'Build type (release/debug)'

runs:
using: "composite"
steps:
- name: Checkout target branch (BASE)
uses: actions/checkout@v4
with:
ref: ${{ inputs.base_ref }}

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install benchmark compare.py requirements
shell: bash
run: |
pip install --upgrade setuptools
pip install -r ${{ inputs.build-output-dir}}/_deps/benchmark-src/tools/requirements.txt

- name: Benchmark Workflow
shell: bash
run: |
mv ${{ inputs.build-output-dir }}/benchmark/benchmark_result.json ${{ inputs.build-output-dir }}/benchmark/benchmark_result_new.json
cmake -B ${{ inputs.build-output-dir}} -S ${{ inputs.workspace }} \
--preset benchmark_${{ inputs.os }}_${{ inputs.compiler }}_${{ inputs.stdlib }} \
-DCMAKE_CXX_COMPILER=${{ inputs.cpp_compiler }} \
-DCMAKE_C_COMPILER=${{ inputs.c_compiler }} \
-DCMAKE_BUILD_TYPE=${{ inputs.build_type }}
cmake --build ${{ inputs.build-output-dir}} --target benchmark --config ${{ inputs.build_type }} --parallel
ctest --test-dir ${{ inputs.build-output-dir}} --build-config ${{ inputs.build_type }} --output-on-failure --parallel
mv ${{ inputs.build-output-dir }}/benchmark/benchmark_result.json ${{ inputs.build-output-dir }}/benchmark/benchmark_result_ref.json

- name: Compare Benchmarks
shell: bash
run: |
python3 ${{ inputs.build-output-dir}}/_deps/benchmark-src/tools/compare.py benchmarks \
${{ inputs.build-output-dir }}/benchmark/benchmark_result_ref.json \
${{ inputs.build-output-dir }}/benchmark/benchmark_result_new.json \
| tee ${{ inputs.build-output-dir }}/benchmark/comparison.txt

- name: Archive benchmark results
uses: actions/upload-artifact@v4
with:
name: benchmark_${{ inputs.os }}_${{ inputs.compiler }}_${{ inputs.stdlib }}_json
path: |
${{ inputs.build-output-dir }}/benchmark/benchmark_result_ref.json
${{ inputs.build-output-dir }}/benchmark/benchmark_result_new.json
${{ inputs.build-output-dir }}/benchmark/comparison.txt
Loading