Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pyopencl-like GenericScanKernel #188

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Minor cleanup in pycuda.tools
  • Loading branch information
adityapb committed Sep 8, 2018
commit 7724c992886344b9a8e1b95913a32417fea810cb
2 changes: 0 additions & 2 deletions pycuda/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@


Derived from code within the Thrust project, https://github.com/thrust/thrust/


"""

import numpy as np
Expand Down
8 changes: 5 additions & 3 deletions pycuda/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,16 +437,18 @@ def get_arg_list_scalar_arg_dtypes(arg_types):

# }}}

def _process_code_for_macro(code):
# FIXME: Replace this with something else ?
#code = code.replace("//CL//", "\n")

# {{{ code generation/templating helper

def _process_code_for_macro(code):
if "//" in code:
raise RuntimeError("end-of-line comments ('//') may not be used in "
"code snippets")

return code.replace("\n", " \\\n")

# }}}


# {{{ context-dep memoization

Expand Down