Skip to content

Commit

Permalink
opencl refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomif committed Sep 30, 2021
1 parent 1cba422 commit 7228310
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions fc-solve/source/board_gen/find-freecell-deal-index-julia-opencl.py
Expand Up @@ -81,8 +81,7 @@ def _tt3_r(s):
"""docstring for _tt3_r"""
return s.replace("PyTT3", _tt3_pkg)

def _tt3_myformat(template, extra_fields={}):
nonlocal _tt3_pkg
def _calc_fields(extra_fields):
fields = {
'apply_limit': '0',
'bufsize': 300000,
Expand All @@ -94,6 +93,10 @@ def _tt3_myformat(template, extra_fields={}):
'num_ints_in_first': num_ints_in_first,
**extra_fields,
}
return fields

def _tt3_myformat(template, extra_fields={}):
fields = _calc_fields(extra_fields)
import re

def repl(m):
Expand All @@ -108,6 +111,11 @@ def repl(m):
flags=re.M | re.S,
repl=repl,
string=template, count=0)

# based on pyperl: not needed for now
def _old_tt3_myformat(template, extra_fields={}):
nonlocal _tt3_pkg
fields = _calc_fields(extra_fields)
import perl

# _tt3_pkg += "t"
Expand Down

0 comments on commit 7228310

Please sign in to comment.