Add shared memory version reduce.