Skip to content
This repository has been archived by the owner on Dec 22, 2021. It is now read-only.

Commit

Permalink
OpenMP for gravmag.polyprism
Browse files Browse the repository at this point in the history
Benchmarks are very good! Sometimes more than 2x speedup over numpy
version.
Moved the vertices loop out of kernels to avoid segfaults.
Had to change the way PolygonalPrism makes .x and .y attributes so that
they are C contiguous arrays.
  • Loading branch information
leouieda committed Jul 3, 2014
1 parent a9913de commit 5db1796
Show file tree
Hide file tree
Showing 5 changed files with 8,338 additions and 5,690 deletions.
26 changes: 9 additions & 17 deletions benchmarks/gravmag_polyprism.ipynb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"metadata": {
"name": "",
"signature": "sha256:35610cfe33d9fa8c60169f57cdf6a0a0eee501fc57a6a40ca8247020de5b93d1"
"signature": "sha256:1d07d7eba0f3040aaf4f3caad22fa3ef3411fcef439131fa90860f23caef4c7c"
},
"nbformat": 3,
"nbformat_minor": 0,
Expand Down Expand Up @@ -52,7 +52,7 @@
"output_type": "stream",
"stream": "stdout",
"text": [
"1 loops, best of 3: 1.6 s per loop\n"
"1 loops, best of 3: 1.59 s per loop\n"
]
}
],
Expand All @@ -71,7 +71,7 @@
"output_type": "stream",
"stream": "stdout",
"text": [
"1 loops, best of 3: 1.51 s per loop\n"
"1 loops, best of 3: 693 ms per loop\n"
]
}
],
Expand All @@ -90,7 +90,7 @@
"output_type": "stream",
"stream": "stdout",
"text": [
"1 loops, best of 3: 837 ms per loop\n"
"1 loops, best of 3: 846 ms per loop\n"
]
}
],
Expand All @@ -109,7 +109,7 @@
"output_type": "stream",
"stream": "stdout",
"text": [
"1 loops, best of 3: 613 ms per loop\n"
"1 loops, best of 3: 301 ms per loop\n"
]
}
],
Expand All @@ -128,11 +128,11 @@
"output_type": "stream",
"stream": "stdout",
"text": [
"1 loops, best of 3: 7.98 s per loop\n"
"1 loops, best of 3: 8.24 s per loop\n"
]
}
],
"prompt_number": 4
"prompt_number": 7
},
{
"cell_type": "code",
Expand All @@ -147,19 +147,11 @@
"output_type": "stream",
"stream": "stdout",
"text": [
"1 loops, best of 3: 6.25 s per loop\n"
"1 loops, best of 3: 2.64 s per loop\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
"prompt_number": 8
}
],
"metadata": {}
Expand Down
Loading

0 comments on commit 5db1796

Please sign in to comment.