MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / DevDataTable

Method DevDataTable

ngscuda/cuda_ngstd.hpp:286–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284 public:
285
286 DevDataTable (FlatTable<T> t2)
287 {
288 size = t2.Size();
289 if (size == 0) return;
290
291 index = new size_t[size+1];
292 for (int i = 0; i <= size; i++)
293 index[i] = t2.IndexArray()[i];
294
295 int sizedata = t2.AsArray().Size();
296 dev_data = Dev<T>::Malloc(sizedata);
297 cudaMemcpy (dev_data, t2.Data(), sizeof(T)*sizedata, cudaMemcpyHostToDevice);
298 }
299
300 ~DevDataTable ()
301 {

Callers

nothing calls this directly

Calls 3

AsArrayMethod · 0.80
SizeMethod · 0.45
DataMethod · 0.45

Tested by

no test coverage detected