- #1
seneika
- 4
- 0
Hi. I'm trying to make a pointer point to sections of a rank-2 array given by specific values of
it's second index. I other words: given a table I wan't a pointer to point to specific columns, making of it a "filtered" table.
The method I was trying was like
to point to columns col1 and col3, rows 1 to k.
However, I've been told in the Intel forum that this procedure would consist in targeting an array
subsection with a vector subscript, which is forbiden in the standard by the constraint C724 of
F2008.
Is there any other way of doing this?
I'm not using a scalar triplet on the second index because, in practice, I'll select more columns without a regular stride, so a rule like col1:colN:stride doesn't seem to be of use.
Thanks.
it's second index. I other words: given a table I wan't a pointer to point to specific columns, making of it a "filtered" table.
The method I was trying was like
Code:
DOUBLE PRECISION, DIMENSION(M,N), TARGET :: arrA
DOUBLE PRECISION, DIMENSION(:,:), POINTER :: ptr1
...
ptr1 => arrA(1:k,(/col1,col3/))
to point to columns col1 and col3, rows 1 to k.
However, I've been told in the Intel forum that this procedure would consist in targeting an array
subsection with a vector subscript, which is forbiden in the standard by the constraint C724 of
F2008.
Is there any other way of doing this?
I'm not using a scalar triplet on the second index because, in practice, I'll select more columns without a regular stride, so a rule like col1:colN:stride doesn't seem to be of use.
Thanks.