-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
249 changed files
with
31,677 additions
and
11,119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
# See all possible options and defaults with: | ||
# clang-format --style=llvm --dump-config | ||
BasedOnStyle: LLVM | ||
AccessModifierOffset: -4 | ||
AllowShortLambdasOnASingleLine: true | ||
AlwaysBreakTemplateDeclarations: Yes | ||
BinPackArguments: false | ||
BinPackParameters: false | ||
BreakBeforeBinaryOperators: All | ||
BreakConstructorInitializers: BeforeColon | ||
ColumnLimit: 99 | ||
CommentPragmas: 'NOLINT:.*|^ IWYU pragma:' | ||
IncludeBlocks: Regroup | ||
IndentCaseLabels: true | ||
IndentPPDirectives: AfterHash | ||
IndentWidth: 4 | ||
Language: Cpp | ||
SpaceAfterCStyleCast: true | ||
Standard: Cpp11 | ||
StatementMacros: ['PyObject_HEAD'] | ||
TabWidth: 4 | ||
IncludeCategories: | ||
- Regex: '<pybind11/.*' | ||
Priority: -1 | ||
- Regex: 'pybind11.h"$' | ||
Priority: 1 | ||
- Regex: '^".*/?detail/' | ||
Priority: 1 | ||
SortPriority: 2 | ||
- Regex: '^"' | ||
Priority: 1 | ||
SortPriority: 3 | ||
- Regex: '<[[:alnum:]._]+>' | ||
Priority: 4 | ||
- Regex: '.*' | ||
Priority: 5 | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,77 @@ | ||
FormatStyle: file | ||
|
||
Checks: ' | ||
llvm-namespace-comment, | ||
modernize-use-override, | ||
readability-container-size-empty, | ||
modernize-use-using, | ||
modernize-use-equals-default, | ||
modernize-use-auto, | ||
modernize-use-emplace, | ||
' | ||
Checks: | | ||
*bugprone*, | ||
*performance*, | ||
clang-analyzer-optin.cplusplus.VirtualCall, | ||
clang-analyzer-optin.performance.Padding, | ||
cppcoreguidelines-init-variables, | ||
cppcoreguidelines-prefer-member-initializer, | ||
cppcoreguidelines-pro-type-static-cast-downcast, | ||
cppcoreguidelines-slicing, | ||
google-explicit-constructor, | ||
llvm-namespace-comment, | ||
misc-definitions-in-headers, | ||
misc-misplaced-const, | ||
misc-non-copyable-objects, | ||
misc-static-assert, | ||
misc-throw-by-value-catch-by-reference, | ||
misc-uniqueptr-reset-release, | ||
misc-unused-parameters, | ||
modernize-avoid-bind, | ||
modernize-loop-convert, | ||
modernize-make-shared, | ||
modernize-redundant-void-arg, | ||
modernize-replace-auto-ptr, | ||
modernize-replace-disallow-copy-and-assign-macro, | ||
modernize-replace-random-shuffle, | ||
modernize-shrink-to-fit, | ||
modernize-use-auto, | ||
modernize-use-bool-literals, | ||
modernize-use-default-member-init, | ||
modernize-use-emplace, | ||
modernize-use-equals-default, | ||
modernize-use-equals-delete, | ||
modernize-use-noexcept, | ||
modernize-use-nullptr, | ||
modernize-use-override, | ||
modernize-use-using, | ||
readability-avoid-const-params-in-decls, | ||
readability-braces-around-statements, | ||
readability-const-return-type, | ||
readability-container-size-empty, | ||
readability-delete-null-pointer, | ||
readability-else-after-return, | ||
readability-implicit-bool-conversion, | ||
readability-inconsistent-declaration-parameter-name, | ||
readability-make-member-function-const, | ||
readability-misplaced-array-index, | ||
readability-non-const-parameter, | ||
readability-qualified-auto, | ||
readability-redundant-function-ptr-dereference, | ||
readability-redundant-smartptr-get, | ||
readability-redundant-string-cstr, | ||
readability-simplify-subscript-expr, | ||
readability-static-accessed-through-instance, | ||
readability-static-definition-in-anonymous-namespace, | ||
readability-string-compare, | ||
readability-suspicious-call-argument, | ||
readability-uniqueptr-delete-release, | ||
-bugprone-easily-swappable-parameters, | ||
-bugprone-exception-escape, | ||
-bugprone-reserved-identifier, | ||
-bugprone-unused-raii, | ||
CheckOptions: | ||
- key: modernize-use-equals-default.IgnoreMacros | ||
value: false | ||
- key: performance-for-range-copy.WarnOnAllAutoCopies | ||
value: true | ||
- key: performance-inefficient-string-concatenation.StrictMode | ||
value: true | ||
- key: performance-unnecessary-value-param.AllowedTypes | ||
value: 'exception_ptr$;' | ||
- key: readability-implicit-bool-conversion.AllowPointerConditions | ||
value: true | ||
|
||
HeaderFilterRegex: 'pybind11/.*h' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
template <op_id id, op_type ot, typename L = undefined_t, typename R = undefined_t> | ||
template <typename ThisT> | ||
auto &this_ = static_cast<ThisT &>(*this); | ||
if (load_impl<ThisT>(temp, false)) { | ||
ssize_t nd = 0; | ||
auto trivial = broadcast(buffers, nd, shape); | ||
auto ndim = (size_t) nd; | ||
int nd; | ||
ssize_t ndim() const { return detail::array_proxy(m_ptr)->nd; } | ||
using op = op_impl<id, ot, Base, L_type, R_type>; | ||
template <op_id id, op_type ot, typename L, typename R> | ||
template <detail::op_id id, detail::op_type ot, typename L, typename R, typename... Extra> | ||
class_ &def(const detail::op_<id, ot, L, R> &op, const Extra &...extra) { | ||
class_ &def_cast(const detail::op_<id, ot, L, R> &op, const Extra &...extra) { | ||
@pytest.mark.parametrize("access", ["ro", "rw", "static_ro", "static_rw"]) | ||
struct IntStruct { | ||
explicit IntStruct(int v) : value(v){}; | ||
~IntStruct() { value = -value; } | ||
IntStruct(const IntStruct &) = default; | ||
IntStruct &operator=(const IntStruct &) = default; | ||
py::class_<IntStruct>(m, "IntStruct").def(py::init([](const int i) { return IntStruct(i); })); | ||
py::implicitly_convertible<int, IntStruct>(); | ||
m.def("test", [](int expected, const IntStruct &in) { | ||
[](int expected, const IntStruct &in) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docs/*.svg binary |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
*.cmake @henryiii | ||
CMakeLists.txt @henryiii | ||
*.yml @henryiii | ||
*.yaml @henryiii | ||
/tools/ @henryiii | ||
/pybind11/ @henryiii | ||
noxfile.py @henryiii | ||
.clang-format @henryiii | ||
.clang-tidy @henryiii |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.