Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #!/bin/bash -l 
0002 usage(){ cat << EOU
0003 sbigint_test.sh
0004 ===================
0005 
0006 A 32 step photon history can be represented
0007 by an 128 bit integer.  Unfortunately 64 bit
0008 is the largest size int thats in the C++ standard. 
0009 
0010 What operations are needed:
0011 
0012 * count unique values in large array of int128 
0013 * find indices of occurrences of a value in the array  
0014 
0015 
0016 
0017 :google:`std::vector of __int128`
0018 
0019 https://codereview.stackexchange.com/questions/220809/128-bit-unsigned-integer
0020 
0021 HMM: dealing with __int128 doesnt look easy
0022 
0023 
0024 https://chromium.googlesource.com/external/github.com/abseil/abseil-cpp/+/HEAD/absl/numeric/int128.h
0025 
0026 https://forums.swift.org/t/128-bit-operations-in-swift/21639/13
0027 
0028 https://github.com/Jitsusama/UInt128
0029 
0030 
0031 
0032 EOU
0033 }
0034 
0035 
0036 name=sbigint_test
0037 
0038 TMP=${TMP:-/tmp/$USER/opticks}
0039 export FOLD=$TMP/$name
0040 
0041 mkdir -p $FOLD
0042 bin=$FOLD/$name
0043 
0044 gcc $name.cc -std=c++11 -lstdc++ -o $bin && $bin
0045 
0046 
0047