Sequential and Shared-Memory Parallel Algorithms for Partitioned Local Depths