Caffe2 - C++ API
A deep learning, cross platform ML framework
Related Pages
Modules
Data Structures
Files
C++ API
Python API
GitHub
File List
Globals
caffe2
mobile
contrib
opengl
operators
gl_tiling_utils.h
1
#pragma once
2
#include <cmath>
3
4
struct
point
{
5
int
x;
6
int
y;
7
};
8
9
struct
tile_descriptor
{
10
point
tile_dims;
11
point
tile_size;
12
int
tiles;
13
};
14
15
namespace
caffe2
{
16
inline
static
void
squareFactors(
int
N,
int
& r1,
int
& r2) {
17
int
f = sqrt(N);
18
19
if
(f * f == N) {
20
r1 = r2 = f;
21
}
else
{
22
while
(N % f != 0) {
23
f--;
24
}
25
r1 = N / f;
26
r2 = f;
27
}
28
}
29
30
inline
static
void
computeOutputTiles(
int
output_channels,
int
& output_tile_x,
int
& output_tile_y) {
31
squareFactors((output_channels + 3) / 4, output_tile_x, output_tile_y);
32
}
33
}
// namespace caffe2
caffe2
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition:
convert_encoded_to_raw_leveldb.cc:47
tile_descriptor
Definition:
gl_tiling_utils.h:9
point
Definition:
gl_tiling_utils.h:4
Generated on Thu Apr 19 2018 13:03:54 for Caffe2 - C++ API by
1.8.11