library(supc) supc:::.set_num_threads(2) a <- structure( c(-0.626453810742332, 0.183643324222082, -0.835628612410047, 1.59528080213779, 0.329507771815361, -0.820468384118015, 0.487429052428485, 0.738324705129217, 0.575781351653492, -0.305388387156356, 1.51178116845085, 0.389843236411431, -0.621240580541804, -2.2146998871775, 1.12493091814311, -0.0449336090152309, -0.0161902630989461, 0.943836210685299, 0.821221195098089, 0.593901321217509, 0.918977371608218, 0.782136300731067, 0.0745649833651906, -1.98935169586337, 0.61982574789471 ), .Dim = c(5L, 5L) ) b <- structure( c(-0.0561287395290008, -0.155795506705329, -1.47075238389927, -0.47815005510862, 0.417941560199702, 1.35867955152904, -0.102787727342996, 0.387671611559369, -0.0538050405829051, -1.37705955682861, -0.41499456329968, -0.394289953710349, -0.0593133967111857, 1.10002537198388, 0.763175748457544, -0.164523596253587, -0.253361680136508, 0.696963375404737, 0.556663198673657, -0.68875569454952, -0.70749515696212, 0.36458196213683, 0.768532924515416, -0.112346212150228, 0.881107726454215 ), .Dim = c(5L, 5L) ) result <- matrix(0.0, 5, 5) supc:::.test.dgemm(a, b, result); reference <- structure( c(-1.65490456291861, -0.324981152807265, 0.425434643318325, 1.85393017938903, -1.6503345563012, -1.44381017760006, -0.725635289330779, -1.6055431324276, 3.94498579879813, 0.0296975774404726, 1.1457216240474, 0.287575470324317, 1.18766517202539, -1.37255710812689, 1.0432866662035, 0.70663400378626, -0.429716400558035, -0.00852266812721167, -0.124586047854389, 0.710892056732268, 2.12070484975624, 1.0383536928705, 0.342602585603025, -4.46589796824276, 0.999492889949811 ), .Dim = c(5L, 5L) ) stopifnot(isTRUE(all.equal(result, reference)))