Add cross products for producers and filters

Note: The current implementation is incompatible with g++ versions
before 4.9 but works fine with clang.