-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest_old.cpp
More file actions
28 lines (26 loc) · 745 Bytes
/
test_old.cpp
File metadata and controls
28 lines (26 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "Linear_event.hxx"
#include <algorithm>
#include <iostream>
#include <chrono>
#include <stdlib.h>
#include <time.h>
int main(){
const int batchsize =1;
float inputss[100 * batchsize];
std::fill_n(inputss, 100 * batchsize, 0.0);
/*
for (int i = 0; i < 100 * batchsize; i++){
srand(time(0));
inputss[i] = rand();
}
*/
auto t1 = std::chrono::high_resolution_clock::now();
auto out = TMVA_SOFIE_Linear_event::infer(inputss);
auto t2 = std::chrono::high_resolution_clock::now();
for (auto& i: out){
std::cout << i << ",";
}
//free(inputss);
auto duration = std::chrono::duration_cast<std::chrono::microseconds>( t2 - t1 ).count();
std::cout << std::endl << duration << std::endl;
}