MCPcopy Create free account
hub / github.com/colmap/colmap / FillWithVector

Method FillWithVector

src/colmap/mvs/gpu_mat.h:399–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397
398template <typename T>
399void GpuMat<T>::FillWithVector(const T* values) {
400 T* values_device;
401 CUDA_SAFE_CALL(cudaMalloc((void**)&values_device, depth_ * sizeof(T)));
402 CUDA_SAFE_CALL(cudaMemcpy(
403 values_device, values, depth_ * sizeof(T), cudaMemcpyHostToDevice));
404 internal::FillWithVectorKernel<T>
405 <<<gridSize_, blockSize_>>>(values_device, View());
406 CUDA_SYNC_AND_CHECK();
407 CUDA_SAFE_CALL(cudaFree(values_device));
408}
409
410template <typename T>
411void GpuMat<T>::FillWithRandomNumbers(const T min_value,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected