Skip to content

Commit

Permalink
python: Reduce diff
Browse files Browse the repository at this point in the history
  • Loading branch information
jngrad committed May 11, 2023
1 parent b7b9006 commit c0d6d38
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/python/espressomd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ target_compile_options(
$<$<CXX_COMPILER_ID:GNU>:-Wno-cpp>
$<$<CXX_COMPILER_ID:GNU>:-Wno-strict-aliasing>
$<$<CXX_COMPILER_ID:GNU>:-Wno-maybe-uninitialized>
$<$<CXX_COMPILER_ID:GNU>:-Wno-volatile>
$<$<CXX_COMPILER_ID:Clang,AppleClang,IntelLLVM>:-Wno-sometimes-uninitialized>
$<$<CXX_COMPILER_ID:Clang,AppleClang,IntelLLVM>:-Wno-\#warnings>
-Wno-unused-variable)
Expand Down
4 changes: 4 additions & 0 deletions src/python/espressomd/utils.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,13 @@ cdef extern from "utils/Vector.hpp" namespace "Utils":
Vector9d operator * (double i)
Vector9d operator / (double i)

cppclass Vector19d:
double & operator[](int i)
double * data()

cdef make_array_locked(Vector3d)
cdef Vector3d make_Vector3d(a)
cdef Vector3i make_Vector3i(a)

cdef extern from "utils/Factory.hpp" namespace "Utils":
cdef cppclass Factory[T]:
Expand Down
7 changes: 7 additions & 0 deletions src/python/espressomd/utils.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,13 @@ cdef Vector3d make_Vector3d(a):
return v


cdef Vector3i make_Vector3i(a):
cdef Vector3i v
for i, ai in enumerate(a):
v[i] = ai
return v


cpdef handle_errors(msg):
"""
Gathers runtime errors.
Expand Down

0 comments on commit c0d6d38

Please sign in to comment.