September 2018
Intermediate to advanced
606 pages
14h 32m
English
For this recipe, we will use the same file naming and directory structure as in the previous simple Conda recipe:
.├── CMakeLists.txt├── conda-recipe│ └── meta.yaml└── example.cpp
The example source file (example.cpp) performs a matrix-matrix multiplication and compares the result returned by the MKL library against a "noddy" implementation:
#include "mkl.h"#include <cassert>#include <cmath>#include <iostream>#include <random>int main() { // generate a uniform distribution of real number between -1.0 and 1.0 std::random_device rd; std::mt19937 mt(rd()); std::uniform_real_distribution<double> dist(-1.0, 1.0); int m = 500; int k = 1000; int n = 2000; double *A = (double *)mkl_malloc(m * k * sizeof(double), 64); double *B = (double ...Read now
Unlock full access