You can get a pointer to the n-th element of a vector `v`

using `pointer(v,n)`

. The difference between two consecutive indices gives accordingly the size occupied by one element in the vector. You can then compare that to the actual size of the elements of `v`

:

```
v = Vector( [(1., 2., 3.), (4., 5., 6.), (7., 8., 9.)] )
d = Signed(pointer(v,2) - pointer(v,1)) # = 24
d == sizeof(eltype(v)) ? "contiguous" : "non-contiguous or padded"
# prints "contiguous"
```

If you work with `Array`

then the above should always hold if `eltype(v)`

is a bitstype; check with `Base.isbits(eltype(v))`

. For other element types or `AbstractArray`

in general, it is not necessarily the case.

Also, if `v`

were a `SubArray`

, you could directly use `Base.iscontiguous(v)`

, which unfortunately is not implemented for plain `Array`

types…

```
s = SubArray( v, (1:3,)) # make a subarray from `v`
Base.iscontiguous(s) # returns true
```