Commit a7f8896e4f2acc74f1545c8a0d8f15a67b71ee6c

Authored by DepthDeluxe
1 parent 2d80685b

removed Mat debug utilities

Showing 1 changed file with 0 additions and 62 deletions
openbr/plugins/cuda/util.cpp deleted
1 -#include <iostream>  
2 -#include <fstream>  
3 -using namespace std;  
4 -  
5 -#include <Eigen/Dense>  
6 -  
7 -namespace br {  
8 - void dumpMatrixFloat(Eigen::MatrixXf& mat, char* filename) {  
9 - ofstream myFile;  
10 - myFile.open(filename);  
11 -  
12 - myFile << mat.rows() << " x " << mat.cols() << endl << endl;  
13 -  
14 - for (int i=0; i < mat.rows(); i++) {  
15 - for (int j=0; j < mat.cols(); j++) {  
16 - myFile << mat.data()[i*mat.cols()+j] << "\t";  
17 - }  
18 - myFile << endl;  
19 - }  
20 -  
21 - myFile.close();  
22 - }  
23 - void dumpMatrixDouble(Eigen::MatrixXd& mat, char* filename) {  
24 - ofstream myFile;  
25 - myFile.open(filename);  
26 -  
27 - myFile << mat.rows() << " x " << mat.cols() << endl << endl;  
28 -  
29 - for (int i=0; i < mat.rows(); i++) {  
30 - for (int j=0; j < mat.cols(); j++) {  
31 - myFile << mat.data()[i*mat.cols()+j] << "\t";  
32 - }  
33 - myFile << endl;  
34 - }  
35 -  
36 - myFile.close();  
37 - }  
38 - void dumpVectorFloat(Eigen::VectorXf& mat, char* filename) {  
39 - ofstream myFile;  
40 - myFile.open(filename);  
41 -  
42 - myFile << mat.rows() << endl << endl;  
43 -  
44 - for (int i=0; i < mat.rows(); i++) {  
45 - myFile << mat.data()[i] << endl;  
46 - }  
47 -  
48 - myFile.close();  
49 - }  
50 - void dumpVectorDouble(Eigen::VectorXd& mat, char* filename) {  
51 - ofstream myFile;  
52 - myFile.open(filename);  
53 -  
54 - myFile << mat.rows() << endl << endl;  
55 -  
56 - for (int i=0; i < mat.rows(); i++) {  
57 - myFile << mat.data()[i] << endl;  
58 - }  
59 -  
60 - myFile.close();  
61 - }  
62 -}