Why CUDA simply supply asum(absolute addition) API? Why there is no sum?

The Api cublasSasum is to calculate the sum of absolute value of the vector, why there is no simpler api which just calculate sum of the vector?

take a look : thrust::transform_reduce
[url]thrust: Transformed Reductions

As for “why?”: cublas?asum exists because the CUBLAS API closely follows the original BLAS API, which is a de-facto standard when it comes to linear algebra libraries and precedes CUBLAS by a couple of decades.