MCPcopy Create free account
hub / github.com/davisking/dlib / set_size

Method set_size

dlib/cuda/gpu_data.h:72–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70 void async_copy_to_device() const{}
71
72 void set_size(size_t new_size)
73 {
74 if (new_size == 0)
75 {
76 data_size = 0;
77 host_current = true;
78 device_current = true;
79 device_in_use = false;
80 data_host.reset();
81 data_device.reset();
82 }
83 else if (new_size != data_size)
84 {
85 data_size = new_size;
86 host_current = true;
87 device_current = true;
88 device_in_use = false;
89 data_host.reset(new float[new_size], std::default_delete<float[]>());
90 data_device.reset();
91 }
92 }
93#endif
94
95 const float* host() const

Callers 15

mpcMethod · 0.45
policyMethod · 0.45
decompressMethod · 0.45
bottom_up_clusterFunction · 0.45
segment_number_lineFunction · 0.45
newman_cluster_splitFunction · 0.45
batch_normalizeFunction · 0.45
batch_normalize_convFunction · 0.45
operator()Method · 0.45
operator()Method · 0.45
deserializeFunction · 0.45
batch_normalizeFunction · 0.45

Calls 1

resetMethod · 0.45

Tested by

no test coverage detected