Commit 66f6947e authored by Artem Pulkin's avatar Artem Pulkin

cython: remove bounds checking for openmp

parent 8173caae
Pipeline #44245 passed with stage
in 2 minutes and 31 seconds
......@@ -7,6 +7,7 @@ from cython.parallel import prange
# Template potential-2.pyx
# A two-point potential: depends on the distance between pairs of atoms
def kernel_general_2(
int[::1] r_indptr,
int[::1] r_indices,
......@@ -50,6 +51,7 @@ def kernel_general_2(
# Template potential-2-g.pyx
# A two-point potential: depends on the distance between pairs of atoms
def kernel_g_general_2(
int[::1] r_indptr,
int[::1] r_indices,
......@@ -103,6 +105,7 @@ def kernel_g_general_2(
# Template potential-3.pyx
# A three-point potential: depends on the distance between two pairs of atoms
# sharing the same atom at origin and the cosine of the angle formed
def kernel_general_3(
int[::1] r_indptr,
int[::1] r_indices,
......@@ -167,6 +170,7 @@ def kernel_general_3(
# Template potential-3-g.pyx
# A three-point potential: depends on the distance between two pairs of atoms
# sharing the same atom at origin and the cosine of the angle formed
def kernel_g_general_3(
int[::1] r_indptr,
int[::1] r_indices,
......@@ -259,6 +263,7 @@ def kernel_g_general_3(
# Template potential-2.pyx
# A two-point potential: depends on the distance between pairs of atoms
def kernel_harmonic_repulsion(
int[::1] r_indptr,
int[::1] r_indices,
......@@ -302,6 +307,7 @@ def kernel_harmonic_repulsion(
# Template potential-2-g.pyx
# A two-point potential: depends on the distance between pairs of atoms
def kernel_g_harmonic_repulsion(
int[::1] r_indptr,
int[::1] r_indices,
......@@ -354,6 +360,7 @@ def kernel_g_harmonic_repulsion(
# Template potential-2.pyx
# A two-point potential: depends on the distance between pairs of atoms
def kernel_lj(
int[::1] r_indptr,
int[::1] r_indices,
......@@ -397,6 +404,7 @@ def kernel_lj(
# Template potential-2-g.pyx
# A two-point potential: depends on the distance between pairs of atoms
def kernel_g_lj(
int[::1] r_indptr,
int[::1] r_indices,
......@@ -449,6 +457,7 @@ def kernel_g_lj(
# Template potential-2.pyx
# A two-point potential: depends on the distance between pairs of atoms
def kernel_sw_phi2(
int[::1] r_indptr,
int[::1] r_indices,
......@@ -492,6 +501,7 @@ def kernel_sw_phi2(
# Template potential-2-g.pyx
# A two-point potential: depends on the distance between pairs of atoms
def kernel_g_sw_phi2(
int[::1] r_indptr,
int[::1] r_indices,
......@@ -545,6 +555,7 @@ def kernel_g_sw_phi2(
# Template potential-3.pyx
# A three-point potential: depends on the distance between two pairs of atoms
# sharing the same atom at origin and the cosine of the angle formed
def kernel_sw_phi3(
int[::1] r_indptr,
int[::1] r_indices,
......@@ -609,6 +620,7 @@ def kernel_sw_phi3(
# Template potential-3-g.pyx
# A three-point potential: depends on the distance between two pairs of atoms
# sharing the same atom at origin and the cosine of the angle formed
def kernel_g_sw_phi3(
int[::1] r_indptr,
int[::1] r_indices,
......@@ -701,6 +713,7 @@ def kernel_g_sw_phi3(
# Template potential-2.pyx
# A two-point potential: depends on the distance between pairs of atoms
def kernel_mlsf_g2(
int[::1] r_indptr,
int[::1] r_indices,
......@@ -744,6 +757,7 @@ def kernel_mlsf_g2(
# Template potential-2-g.pyx
# A two-point potential: depends on the distance between pairs of atoms
def kernel_g_mlsf_g2(
int[::1] r_indptr,
int[::1] r_indices,
......@@ -797,6 +811,7 @@ def kernel_g_mlsf_g2(
# Template potential-3.pyx
# A three-point potential: depends on the distance between two pairs of atoms
# sharing the same atom at origin and the cosine of the angle formed
def kernel_mlsf_g5(
int[::1] r_indptr,
int[::1] r_indices,
......@@ -865,6 +880,7 @@ def kernel_mlsf_g5(
# Template potential-3-g.pyx
# A three-point potential: depends on the distance between two pairs of atoms
# sharing the same atom at origin and the cosine of the angle formed
def kernel_g_mlsf_g5(
int[::1] r_indptr,
int[::1] r_indices,
......@@ -963,6 +979,7 @@ def kernel_g_mlsf_g5(
# Template potential-3.pyx
# A three-point potential: depends on the distance between two pairs of atoms
# sharing the same atom at origin and the cosine of the angle formed
def kernel_mlsf_g4(
int[::1] r_indptr,
int[::1] r_indices,
......@@ -1034,6 +1051,7 @@ def kernel_mlsf_g4(
# Template potential-3-g.pyx
# A three-point potential: depends on the distance between two pairs of atoms
# sharing the same atom at origin and the cosine of the angle formed
def kernel_g_mlsf_g4(
int[::1] r_indptr,
int[::1] r_indices,
......@@ -1142,6 +1160,7 @@ def kernel_g_mlsf_g4(
# Template potential-2.pyx
# A two-point potential: depends on the distance between pairs of atoms
def kernel_sigmoid(
int[::1] r_indptr,
int[::1] r_indices,
......@@ -1185,6 +1204,7 @@ def kernel_sigmoid(
# Template potential-2-g.pyx
# A two-point potential: depends on the distance between pairs of atoms
def kernel_g_sigmoid(
int[::1] r_indptr,
int[::1] r_indices,
......
......@@ -87,9 +87,11 @@ class BuildPotentials(Command):
if p["openmp"]:
p["range"] = "prange"
p["range_args"] = "nogil=True"
p["decorators"] = "@cython.boundscheck(False)\n@cython.wraparound(False)"
else:
p["range"] = "range"
p["range_args"] = ""
p["decorators"] = ""
del p["openmp"]
template_kind = p["type"]
if len(p["parameters"]) > 0:
......
# Template potential-2-g.pyx
# A two-point potential: depends on the distance between pairs of atoms
$decorators
def kernel_g_$name(
int[::1] r_indptr,
int[::1] r_indices,
......
# Template potential-2.pyx
# A two-point potential: depends on the distance between pairs of atoms
$decorators
def kernel_$name(
int[::1] r_indptr,
int[::1] r_indices,
......
# Template potential-3-g.pyx
# A three-point potential: depends on the distance between two pairs of atoms
# sharing the same atom at origin and the cosine of the angle formed
$decorators
def kernel_g_$name(
int[::1] r_indptr,
int[::1] r_indices,
......
# Template potential-3.pyx
# A three-point potential: depends on the distance between two pairs of atoms
# sharing the same atom at origin and the cosine of the angle formed
$decorators
def kernel_$name(
int[::1] r_indptr,
int[::1] r_indices,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment