Skip to content

Commit c639342

Browse files
committed
Move zero declaration to loopy code base to be more robust in naming the variable.
1 parent a6a7ee6 commit c639342

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

pyop2/sequential.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838

3939
import ctypes
4040
import loopy
41-
import numpy
4241

4342
from pyop2.datatypes import IntType, as_ctypes
4443
from pyop2 import base
@@ -60,8 +59,6 @@
6059
from pyop2.profiling import timed_region
6160
from pyop2.utils import cached_property, get_petsc_dir
6261
from pyop2.configuration import configuration
63-
from pyop2.codegen.rep2loopy import _PreambleGen
64-
from pyop2.datatypes import ScalarType
6562

6663

6764
def vectorise(wrapper, iname, batch_size):
@@ -76,12 +73,6 @@ def vectorise(wrapper, iname, batch_size):
7673
# create constant zero vectors
7774
wrapper = wrapper.copy(target=loopy.CVecTarget(batch_size))
7875
kernel = wrapper.root_kernel
79-
zeros = loopy.TemporaryVariable("_zeros", shape=loopy.auto, dtype=ScalarType, read_only=True,
80-
initializer=numpy.array(0.0, dtype=ScalarType),
81-
address_space=loopy.AddressSpace.GLOBAL, zero_size=batch_size)
82-
tmps = kernel.temporary_variables.copy()
83-
tmps["_zeros"] = zeros
84-
kernel = kernel.copy(temporary_variables=tmps)
8576

8677
# split iname and vectorize the inner loop
8778
slabs = (1, 1)

0 commit comments

Comments
 (0)