Caffe2 - C++ API
A deep learning, cross platform ML framework
Related Pages
Modules
Data Structures
Files
C++ API
Python API
GitHub
File List
Globals
binaries
print_core_object_sizes_gpu.cc
1
17
#include <iostream>
18
19
#include "caffe2/core/init.h"
20
#include "caffe2/core/operator.h"
21
#include "caffe2/core/context.h"
22
#include "caffe2/core/context_gpu.h"
23
#include "caffe2/proto/caffe2_pb.h"
24
25
#define PRINT_SIZE(cls) \
26
std::cout << "Size of " #cls ": " << sizeof(cls) << " bytes." \
27
<< std::endl;
28
29
int
main(
int
/* unused */
,
char
**
/* unused */
) {
30
PRINT_SIZE(
caffe2::Blob
);
31
PRINT_SIZE(
caffe2::Tensor
);
32
PRINT_SIZE(
caffe2::CPUContext
);
33
PRINT_SIZE(
caffe2::CUDAContext
);
34
PRINT_SIZE(
caffe2::OperatorBase
);
35
PRINT_SIZE(caffe2::OperatorDef);
36
PRINT_SIZE(
caffe2::Operator<caffe2::CPUContext>
);
37
PRINT_SIZE(
caffe2::Operator<caffe2::CUDAContext>
);
38
PRINT_SIZE(
caffe2::TypeMeta
);
39
PRINT_SIZE(
caffe2::Workspace
);
40
return
0;
41
}
caffe2::Blob
Blob is a general container that hosts a typed pointer.
Definition:
blob.h:24
caffe2::CPUContext
The CPU Context, representing the bare minimum of what a Context class in Caffe2 should implement...
Definition:
context.h:40
nom::repr::Tensor
Definition:
NeuralNet.h:158
caffe2::Workspace
Workspace is a class that holds all the related objects created during runtime: (1) all blobs...
Definition:
workspace.h:47
caffe2::Operator
Definition:
operator.h:677
caffe2::TypeMeta
TypeMeta is a thin class that allows us to store the type of a container such as a blob...
Definition:
typeid.h:324
caffe2::OperatorBase
Definition:
operator.h:38
caffe2::CUDAContext
Definition:
context_gpu.h:164
Generated on Thu Mar 21 2019 13:06:10 for Caffe2 - C++ API by
1.8.11