MCPcopy Create free account
hub / github.com/Xtra-Computing/thundersvm / get_dot_product_dns_dns

Method get_dot_product_dns_dns

src/thundersvm/kernelmatrix.cpp:198–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198void KernelMatrix::get_dot_product_dns_dns(const SyncArray<int> &idx, SyncArray<kernel_type> &dot_product) const {
199 SyncArray<kernel_type> data_rows(idx.size() * n_features_);
200 data_rows.mem_set(0);
201 SyncArray<kernel_type> origin_dense(n_instances_ * n_features());
202 origin_dense.mem_set(0);
203 SyncArray<int> origin_idx(n_instances_);
204 int *origin_idx_data = origin_idx.host_data();
205 for (int i = 0; i < n_instances_; ++i) {
206 origin_idx_data[i] = i;
207 }
208 get_working_set_ins(val_, col_ind_, row_ptr_, idx, data_rows, idx.size(), n_features_);
209 get_working_set_ins(val_, col_ind_, row_ptr_, origin_idx, origin_dense, origin_idx.size(), n_features_);
210 dns_dns_mul(data_rows, idx.size(), origin_dense, dot_product);
211}
212#endif

Callers

nothing calls this directly

Calls 5

get_working_set_insFunction · 0.85
dns_dns_mulFunction · 0.85
mem_setMethod · 0.80
sizeMethod · 0.45
host_dataMethod · 0.45

Tested by

no test coverage detected