|
|
|||
File indexing completed on 2026-04-09 07:49:06
0001 /** 0002 QPMTTest.cc 0003 ============= 0004 0005 The lpmtcat 0,1,2 correspond to NNVT,HAMA,NNVT_HiQE 0006 ---------------------------------------------------- 0007 0008 :: 0009 0010 In [6]: np.where( t.qpmt.src_lcqs[:,0] == 0 ) ## NNVT 0011 Out[6]: 0012 (array([ 55, 98, 137, 267, 368, 372, 374, 378, 388, 391, 393, 394, 396, 398, 404, 409, ..., 17198, 17199, 17201, 17205, 17206, 17209, 17219, 17224, 17231, 17234, 0013 17242, 17255, 17327, 17504, 17526, 17537]),) 0014 0015 In [7]: np.where( t.qpmt.src_lcqs[:,0] == 1 ) ## HAMA 0016 Out[7]: 0017 (array([ 0, 1, 3, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ..., 17596, 17597, 17598, 17599, 17600, 17601, 17602, 17603, 17604, 17605, 0018 17606, 17607, 17608, 17609, 17610, 17611]),) 0019 0020 In [8]: np.where( t.qpmt.src_lcqs[:,0] == 2 ) ## NNVT_HiQE 0021 Out[8]: 0022 (array([ 2, 4, 6, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, ..., 17575, 17576, 17577, 17578, 17579, 17580, 17581, 17582, 17583, 17584, 0023 17585, 17586, 17587, 17588, 17589, 17590]),) 0024 0025 In [9]: np.unique( t.qpmt.src_lcqs[:,0], return_counts=True ) 0026 Out[9]: (array([0, 1, 2], dtype=int32), array([2720, 4997, 9895])) 0027 0028 In [10]: np.unique( t.qpmt.src_lcqs[:,0], return_counts=True )[1].sum() 0029 Out[10]: 17612 0030 0031 0032 2025/06 0033 ---------- 0034 0035 :: 0036 0037 In [3]: np.c_[np.unique( t.qpmt.src_lcqs[:,0], return_counts=True )] 0038 Out[3]: 0039 array([[ 0, 2738], 0040 [ 1, 4955], 0041 [ 2, 9919]]) 0042 0043 In [4]: tab = np.c_[np.unique( t.qpmt.src_lcqs[:,0], return_counts=True )] 0044 0045 In [5]: tab[:,1].sum() 0046 Out[5]: np.int64(17612) 0047 0048 0049 **/ 0050 0051 #include <cuda_runtime.h> 0052 #include "OPTICKS_LOG.hh" 0053 #include "SPMT.h" 0054 #include "QPMTTest.h" 0055 0056 int main(int argc, char** argv) 0057 { 0058 OPTICKS_LOG(argc, argv); 0059 0060 std::cout << "QPMTTest.main.Before:" << QPMT<float>::Desc() << std::endl ; 0061 0062 const NPFold* jpmt_f = SPMT::CreateFromJPMTAndSerialize(); 0063 0064 LOG_IF(fatal, jpmt_f==nullptr) << " jpmt_f==nullptr : probably GEOM,${GEOM}_CFBaseFromGEOM envvars not setup ?" ; 0065 if(jpmt_f==nullptr) return 0 ; 0066 0067 QPMTTest<float> t(jpmt_f); 0068 NPFold* f = t.serialize(); 0069 cudaDeviceSynchronize(); 0070 f->save("$FOLD"); 0071 0072 std::cout << "QPMTTest.main.After:" << QPMT<float>::Desc() << std::endl ; 0073 0074 return 0 ; 0075 } 0076
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|