added test cases for cuda and host matrices