---
title: "sparse_get_vector_nonzero_count_double(_:_:_:)"
framework: accelerate
role: symbol
role_heading: Function
path: "accelerate/sparse_get_vector_nonzero_count_double(_:_:_:)"
---

# sparse_get_vector_nonzero_count_double(_:_:_:)

Returns the number of nonzero values in the double-precision dense vector x.

## Declaration

```swift
func sparse_get_vector_nonzero_count_double(_ N: sparse_dimension, _ x: UnsafePointer<Double>!, _ incx: sparse_stride) -> Int
```

## Parameters

- `N`: The number of elements in the dense vector x.
- `x`: Pointer to the vector x.
- `incx`: Increment between valid values in the dense vector x. Negative strides are supported.

## Return Value

Return Value The count of the nonzero values in the vector x.

## Discussion

Discussion important: Apple provides the BLAS and LAPACK libraries under the Accelerate framework to be in line with LAPACK 3.9.1. Starting with iOS 26, iPadOS 26, macOS 26, tvOS 26, visionOS 26, and watchOS 26, the libraries are in line with LAPACK 3.12.0. These new interfaces provide additional functionality, as well as a new ILP64 interface. To use the new interfaces, define ACCELERATE_NEW_LAPACK before including the Accelerate or vecLib headers. For ILP64 interfaces, also define ACCELERATE_LAPACK_ILP64. For Swift projects, specify ACCELERATE_NEW_LAPACK=1 and ACCELERATE_LAPACK_ILP64=1 as preprocessor macros in Xcode build settings under Apple Clang - Preprocessing > Preprocessor Macros.

## See Also

### Sparse Utility Operations

- [sparse_get_vector_nonzero_count_float(_:_:_:)](accelerate/sparse_get_vector_nonzero_count_float(_:_:_:).md)
- [sparse_pack_vector_double(_:_:_:_:_:_:)](accelerate/sparse_pack_vector_double(_:_:_:_:_:_:).md)
- [sparse_pack_vector_float(_:_:_:_:_:_:)](accelerate/sparse_pack_vector_float(_:_:_:_:_:_:).md)
- [sparse_unpack_vector_double(_:_:_:_:_:_:_:)](accelerate/sparse_unpack_vector_double(_:_:_:_:_:_:_:).md)
- [sparse_unpack_vector_float(_:_:_:_:_:_:_:)](accelerate/sparse_unpack_vector_float(_:_:_:_:_:_:_:).md)
