Add exactDict cstride,dstride
@@ -382,6 +382,8 @@ def problemSizeParams(solution, problem):
else:
bstrides[index.b] = sc[1]
+
+ cstrides = dstrides = None
if len(problem.sizes) == numIndices:
None
elif len(problem.sizes) == numIndices + 4:
@@ -399,8 +401,8 @@ def problemSizeParams(solution, problem):
raise RuntimeError("problem-specified ldb(%u) conflicts with setConstStrideB(%u)" % \
(bstrides[1], problem.sizes[numIndices+3]))
- rv.append(('d-strides', "-1," + str(problem.sizes[numIndices+1])))
- rv.append(('c-strides', "-1," + str(problem.sizes[numIndices+0])))
+ cstrides = "-1," + str(problem.sizes[numIndices+1])
+ dstrides = "-1," + str(problem.sizes[numIndices+0])
else:
raise RuntimeError(
"Invalid number of problem type indices: {0} - Indices: {1}, problemSize: {2}".format(len(problem.sizes), numIndices,
@@ -411,6 +413,10 @@ def problemSizeParams(solution, problem):
rv.append(('a-strides', ",".join(map(str, astrides))))
rv.append(('b-strides', ",".join(map(str, bstrides))))
+ if cstrides:
+ rv.append(('c-strides', ",".join(map(str, cstrides))))
+ if dstrides:
+ rv.append(('d-strides', ",".join(map(str, dstrides))))
if problem.zeroPadA:
rv.append(('a-zero-pads', '; '.join([','.join(map(str,zp)) for zp in problem.zeroPadA])))
