MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / caffe_set

Function caffe_set

rtpose_wrapper/src/caffe/util/math_functions.cpp:57–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55
56template <typename Dtype>
57void caffe_set(const int N, const Dtype alpha, Dtype* Y) {
58 if (alpha == 0) {
59 memset(Y, 0, sizeof(Dtype) * N); // NOLINT(caffe/alt_fn)
60 return;
61 }
62 for (int i = 0; i < N; ++i) {
63 Y[i] = alpha;
64 }
65}
66
67template void caffe_set<int>(const int N, const int alpha, int* Y);
68template void caffe_set<float>(const int N, const float alpha, float* Y);

Callers 15

ClearParamDiffsMethod · 0.85
TYPED_TESTFunction · 0.85
TYPED_TESTFunction · 0.85
load_batchMethod · 0.85
LayerSetUpMethod · 0.85
Backward_cpuMethod · 0.85
Backward_cpuMethod · 0.85
Forward_cpuMethod · 0.85
Forward_cpuMethod · 0.85
Backward_cpuMethod · 0.85
Backward_cpuMethod · 0.85
ReshapeMethod · 0.85

Calls

no outgoing calls

Tested by 4

TYPED_TESTFunction · 0.68
TYPED_TESTFunction · 0.68
CheckGradientSingleMethod · 0.68
GetObjAndGradientMethod · 0.68