#NEWLINE# def subquantizer_flops( D , M , clusters = 256 ) : #NEWLINE# #INDENT# "\n    Given the dimension of the data, the number of subquantizers and the\n    subquantizer vocabulary size, compute the number of flops to compute\n    a projected query's LOPQ distance for a single half of the query.\n    " #NEWLINE# return ( ( ( ( M / 2 ) * ( M / M ) ) * clusters ) * 2 )