GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: TESTS/TEST_TENSOR/main.cpp Lines: 18 18 100.0 %
Date: 2026-03-27 22:08:32 Branches: 12 12 100.0 %

Line Branch Exec Source
1
/***************************************
2
	Auteur : Pierre Aubert
3
	Mail : pierre.aubert@lapp.in2p3.fr
4
	Licence : CeCILL-C
5
****************************************/
6
7
#include "PTensor.h"
8
9
using namespace std;
10
11
///Test the PTensor
12
1
void testPTensor(){
13
2
	PTensor<float> tensor;
14
1
	tensor.resize(AllocMode::NONE, 4lu, 5lu);
15
1
	tensor.fill(1.0f);
16
1
	cout << tensor << endl;
17
18
2
	PTensor<float> alignedTensor;
19
1
	alignedTensor.resize(AllocMode::ALIGNED, 4lu, 5lu);
20
1
	alignedTensor.fill(1.0f);
21
1
	cout << alignedTensor << endl;
22
23
2
	PTensor<float> paddedTensor;
24
1
	paddedTensor.resize(AllocMode::PADDING, 4lu, 5lu);
25
1
	paddedTensor.fill(1.0f);
26
1
	paddedTensor.setPaddingValue(42.f);
27
1
	cout << paddedTensor << endl;
28
1
}
29
30
1
int main(int argc, char** argv){
31
1
	testPTensor();
32
1
	return 0;
33
}
34
35