Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // ~/o/sysrap/tests/squad_test.sh 
0002 
0003 #include "scuda.h"
0004 #include "squad.h"
0005 
0006 void test_load_array()
0007 {
0008     std::array<double, 16> a ; 
0009     for(int i=0 ; i < 16 ; i++) a[i] = double(i*100) ; 
0010 
0011     quad4 p ; 
0012     p.load(a) ; 
0013     std::cout << p << std::endl ; 
0014 
0015 }
0016 
0017 void test_load_data()
0018 {
0019     std::array<double, 16> a ; 
0020     for(int i=0 ; i < 16 ; i++) a[i] = double(i*100) ; 
0021     const double* ptr = a.data() ; 
0022 
0023     quad4 p ; 
0024     p.load(ptr, 16) ; 
0025     std::cout << p << std::endl ; 
0026 }
0027 
0028 /*
0029 void test_dquad4()
0030 {
0031     dquad4 dq4 ; 
0032     dq4.zero(); 
0033 
0034     assert( sizeof(dq4) == sizeof(double)*16 ); 
0035 
0036     std::cout << "dq4.d0.f " << dq4.q0.f  << std::endl ; 
0037 
0038     std::cout << "dq4      " << dq4 << std::endl ; 
0039 
0040     std::cout << "dq4.q0   " << dq4.q0 << std::endl ; 
0041 }
0042 */
0043 
0044 
0045 void test_qvals_uint3()
0046 {
0047 
0048     uint3 pidxyz ; 
0049     qvals(pidxyz, "PIDXYZ", "-1:-1:-1", -1 ) ; 
0050 
0051     std::cout << " pidxyz" << pidxyz << "\n" ; 
0052 
0053 
0054 
0055 }
0056 
0057 
0058 int main()
0059 {
0060     /*
0061     test_load_array(); 
0062     test_load_data(); 
0063     test_dquad4(); 
0064     */
0065     test_qvals_uint3(); 
0066 
0067     return 0 ; 
0068 }