SciPAL: Scientific Parallel Algorithms Library for OpenMP and CUDA