Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/cuda/src/lib/include/diderot/util.cuh
ViewVC logotype

Diff of /branches/cuda/src/lib/include/diderot/util.cuh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5621, Mon Aug 2 20:52:59 2021 UTC revision 5622, Tue Aug 3 19:27:35 2021 UTC
# Line 36  Line 36 
36      HD      HD
37      size_t size () const noexcept { return SZ; }      size_t size () const noexcept { return SZ; }
38    
39        cudaError_t copy_to_device_async(array<T, SZ> *tgt) {
40            return cudaMemcpyAsync(tgt->_elems, this->_elems, sizeof(T) * SZ, cudaMemcpyHostToDevice);
41        }
42    
43        cudaError_t copy_to_device(array<T, SZ> *tgt) {
44            return cudaMemcpy(tgt->_elems, this->_elems, sizeof(T) * SZ, cudaMemcpyHostToDevice);
45        }
46  };  };
47  HD  HD
48  inline float sign (float x) { return (x > 0) - (x < 0); }  inline float sign (float x) { return (x > 0) - (x < 0); }

Legend:
Removed from v.5621  
changed lines
  Added in v.5622

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0