generalized product quantization code