beehive-lab / TornadoVM

TornadoVM: A practical and efficient heterogeneous programming framework for managed languages
https://www.tornadovm.org
Apache License 2.0
1.18k stars 112 forks source link

[fix] MatrixVectorFloat4 set/get accesses fixed #325

Closed jjfumero closed 7 months ago

jjfumero commented 7 months ago

Description

This PR fixes memory accesses (get/set) for the Matrix2DFloat4 type.

Problem description

The problem was the the indexes were not correctly computed. In addition, no unit-tests was present to check this. This PR solves the issue and adds a test for checking the memory layout and the memory accesses of this type.

Backend/s tested

Mark the backends affected by this PR.

OS tested

Mark the OS where this PR is tested.

Did you check on FPGAs?

If it is applicable, check your changes on FPGAs.

How to test the new patch?

$ make 
$ make tests   ## pass all unit-tests
$ tornado-test --threadInfo --jvm="-Dgraph.mv.device=0:0" --printKernel -V --fast uk.ac.manchester.tornado.unittests.compute.ComputeTests#matrixVectorFloat4