This code is a Tensor-Transpose Analyzer for LibRI.
( also, it represents my Entrance into the underlying algorithm of LibRI. )
Given the labels of a list of 2-or-3-dimentional tensors to be multiplied, this code will search an optimized sequence of following operations:
tensor3_transposetensor3_mergegemm('NN'/'TN'/'NT'/'NN')- exchange
 
to do the multiplication correctly, which minimizes the number of calls to the time-consuming functiontensor3_transpose.
make with googletest and run ./search_test > result.txt.
cal_func_b01s in LibRI have been written as test cases.
cal_func_bx2s in LibRI are input to the search algorithm.
Actually, I don't think this code is really useful, you know ...
I just regard it as a game, which reminds me of my undergraduate years.