From: Luke Kenneth Casson Leighton Date: Wed, 11 Oct 2023 11:19:32 +0000 (+0100) Subject: simplify matmult test code X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4a5c66bf51be171ef07a37b65d490ed1e8fb0b0e;p=openpower-isa.git simplify matmult test code --- diff --git a/src/openpower/decoder/isa/test_caller_svp64_matrix.py b/src/openpower/decoder/isa/test_caller_svp64_matrix.py index bfd404a3..31518f44 100644 --- a/src/openpower/decoder/isa/test_caller_svp64_matrix.py +++ b/src/openpower/decoder/isa/test_caller_svp64_matrix.py @@ -15,9 +15,7 @@ from openpower.insndb.asm import SVP64Asm # x = [[1,2,3],[4,5,6],[7,8,9],[10,11,12]] # y = [[1,2],[1,2],[3,4]] def matmult(a, b): - zip_b = zip(*b) - # uncomment next line if python 3 : - zip_b = list(zip_b) + zip_b = list(zip(*b)) # transpose b matrix return [[sum(ele_a*ele_b for ele_a, ele_b in zip(row_a, col_b)) for col_b in zip_b] for row_a in a]