Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:49:55

0001 #pragma once
0002 /**
0003 SU.hh
0004 ======
0005 
0006 NB: no Thrust types used in this interface, Thust is kept entirely in the SU.cu implementation
0007 that is nvcc compiled
0008 
0009 **/
0010 
0011 template <typename T> struct qselector ;
0012 
0013 struct sphoton ;
0014 struct sphoton_selector ;
0015 
0016 struct sphotonlite ;
0017 struct sphotonlite_selector ;
0018 
0019 
0020 
0021 #include "SYSRAP_API_EXPORT.hh"
0022 
0023 struct SYSRAP_API SU
0024 {
0025     template<typename T>
0026     static T* upload(const T* h, size_t num_items );
0027 
0028     template<typename T>
0029     static void deprecated_select_copy_device_to_host( T** h, unsigned& num_select,  T* d, unsigned num_d, const qselector<T>& selector  );
0030 
0031     template<typename T>
0032     static unsigned count_if( const T* d, unsigned num_d,  const qselector<T>& selector ) ;
0033 
0034     template<typename T>
0035     static T* device_alloc( unsigned num );
0036 
0037 
0038 
0039 
0040     template<typename T>
0041     static void device_zero( T* d, unsigned num );
0042 
0043     template<typename T>
0044     static void copy_if_device_to_device_presized( T* d_select, const T* d, unsigned num_d, const qselector<T>& selector );
0045 
0046     template<typename T>
0047     static void copy_device_to_host_presized( T* h, const T* d, unsigned num );
0048 
0049 
0050     static size_t count_if_sphoton(     const sphoton* d,     size_t num_d, const sphoton_selector&     photon_selector );
0051     static size_t count_if_sphotonlite( const sphotonlite* d, size_t num_d, const sphotonlite_selector& photonlite_selector );
0052 
0053     static void copy_if_device_to_device_presized_sphoton(     sphoton*     d_select, const sphoton*     d, size_t num_d, const sphoton_selector&     photon_selector );
0054     static void copy_if_device_to_device_presized_sphotonlite( sphotonlite* d_select, const sphotonlite* d, size_t num_d, const sphotonlite_selector& photonlite_selector );
0055 
0056 
0057     // try "untyped" byte moving "_sizeof" funcs  : handy for quick testing
0058     static char* device_alloc_sizeof( unsigned num, unsigned sizeof_item );
0059     static void copy_host_to_device_sizeof( char* d, const char* h, unsigned num, unsigned sizeof_item );
0060     static void copy_device_to_host_sizeof( char* h, const char* d, unsigned num, unsigned sizeof_item );
0061     static char* upload_array_sizeof(const char* array, unsigned num_items, unsigned sizeof_item );
0062 
0063 
0064 
0065 };
0066 
0067 
0068 
0069