Skip to content

Commit

Permalink
Fix rust patches
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhekhorn committed Aug 9, 2024
1 parent 837187b commit 7c1a1bd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/eko/evolution_operator/__init__.py.patch
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ index fe07ade9..0f58c9e5 100644
def initialize_op_members(self):
"""Init all operators with the identity or zeros."""
eye = OpMember(
@@ -858,10 +317,7 @@ class Operator(sv.ScaleVariationModeMixin):
@@ -858,10 +317,13 @@ class Operator(sv.ScaleVariationModeMixin):
else:
self.op_members[n] = zero.copy()

Expand All @@ -606,7 +606,7 @@ index fe07ade9..0f58c9e5 100644
"""Run the integration for each grid point.

Parameters
@@ -876,18 +332,56 @@ class Operator(sv.ScaleVariationModeMixin):
@@ -876,18 +332,54 @@ class Operator(sv.ScaleVariationModeMixin):
"""
column = []
k, logx = log_grid
Expand Down
21 changes: 10 additions & 11 deletions src/eko/evolution_operator/operator_matrix_element.py.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
diff --git a/src/eko/evolution_operator/operator_matrix_element.py b/src/eko/evolution_operator/operator_matrix_element.py
index 202fd18d..3e24870d 100644
index 022f8073..017ec73d 100644
--- a/src/eko/evolution_operator/operator_matrix_element.py
+++ b/src/eko/evolution_operator/operator_matrix_element.py
@@ -1,11 +1,13 @@
"""The |OME| for the non-trivial matching conditions in the |VFNS| evolution."""
@@ -2,11 +2,12 @@

import copy
import enum
-import functools
import logging
+import time

+import ekors
import numba as nb
Expand All @@ -17,7 +16,7 @@ index 202fd18d..3e24870d 100644

import ekore.operator_matrix_elements.polarized.space_like as ome_ps
import ekore.operator_matrix_elements.unpolarized.space_like as ome_us
@@ -15,7 +17,8 @@ from .. import basis_rotation as br
@@ -16,7 +17,8 @@ from .. import basis_rotation as br
from .. import scale_variations as sv
from ..io.types import InversionMethod
from ..matchings import Segment
Expand All @@ -27,16 +26,16 @@ index 202fd18d..3e24870d 100644

logger = logging.getLogger(__name__)

@@ -49,8 +52,6 @@ def build_ome(A, matching_order, a_s, backward_method):
@@ -77,8 +79,6 @@ def build_ome(A, matching_order, a_s, backward_method):
# Print;
# .end
ome = np.eye(len(A[0]), dtype=np.complex_)
- A = A[:, :, :]
- A = np.ascontiguousarray(A)
if backward_method is InversionMethod.EXPANDED:
if backward_method is MatchingMethods.BACKWARD_EXPANDED:
# expended inverse
if matching_order[0] >= 1:
@@ -73,106 +74,6 @@ def build_ome(A, matching_order, a_s, backward_method):
@@ -101,106 +101,6 @@ def build_ome(A, matching_order, a_s, backward_method):
return ome


Expand Down Expand Up @@ -143,8 +142,8 @@ index 202fd18d..3e24870d 100644
class OperatorMatrixElement(Operator):
r"""
Internal representation of a single |OME|.
@@ -267,41 +168,14 @@ class OperatorMatrixElement(Operator):
)
@@ -291,41 +191,14 @@ class OperatorMatrixElement(Operator):
)
return labels

- def quad_ker(self, label, logx, areas):
Expand Down Expand Up @@ -188,7 +187,7 @@ index 202fd18d..3e24870d 100644
+ cfg.py = ekors.ffi.cast("void *", cb_quad_ker_ome.address)
+ cfg.L = self.L
+ cfg.as1 = self.a_s
+ cfg.as0 = 0.
+ cfg.as0 = 0.0
+ cfg.Lsv = np.log(self.xif2)

@property
Expand Down

0 comments on commit 7c1a1bd

Please sign in to comment.