You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,4 +13,9 @@ In SumNumpyArray I have implemented a function to sum an array of double precisi
13
13
| Python sum() | 7.326408 |
14
14
| numpy np.sum() | 0.038284 |
15
15
| C++ sum | 0.108173 |
16
-
| C++ sum with OpenMP | 0.042143 |
16
+
| C++ sum with OpenMP | 0.042143 |
17
+
18
+
In ClassCythonCPP I have implemented a simple class in C++ and wrapped it in cython such that you may create an instance in python of this class.
19
+
20
+
In ClassCythoncppWithMemberFunctions I have extended this simple class to take a numpy array in the constructor and convert it to a C array stored in the object. I have then added a member function to the class which sums the elements in this list and returns a double containing this sum total. The returned number may be accessed from Python.
0 commit comments