I have tried to test my code and confronted with st strange:
making local pointers with an EXPLICIT lower bound seems to generate faster code.
Is this right? In case it is, why?
Thanks a lot @François Jacq for your useful comments.
I have seen that different compilers have different behavior in this.
For example, it seems that intel compiler has the save attribute per default while Gnu compiler does not.
To be completely on the safe side as I asked before:
If a pointer...
Link
"The section (5.2.3) of the F2008 standard referring to the implicit SAVE attribute does not distinguish between the cases of POINTER or not-POINTER."
If in my program (subroutines or functions) I have local pointer variables like
real function f(v)
real, dimension(:), intent(in) ...
Hellow everybody,
I am wondering whether there would be a way in FORTRAN to get a pointer address to an available datatype.
For example:
I have the below data type
module dt
type data
integer, dimension(3) :: comp
real, dimension(:), pointer :: a => null
end type
end module dt
and I would...
Hi,
is there sb who can kindly describe for me what is the difference between elemental and pure function in FORTRAN and when we should use which.
Thanks a lot in advance.
cheers,
...end module
program test
use all
implicit none
integer, pointer :: a=>null()
integer, pointer :: b=>null()
allocate(a)
a=10
print*,associated(a)
call deall(a)
print*,associated(a)
End Program test
the subroutine can not deallocate the pointer which according to text book...
Hi,
I have some complications in OO programing, which I do not see in c++.
Does anyone have any solution to this:
TYPE A
CLASS(B) :: b
END TYPE A
TYPE B
CLASS(A) :: a
END TYPE B
This is not allowed in principle, because B has to be defined before it is used in the definition of A.
Because...
Dear gullipe,
thanks a lot for the code, but I am wondering whether the TIFF format would be the same as bmp, I mean the procedure in both format is the same or not.
I have also found a library, libtiff, for reading and writing TIFF images, which is in c, I am wondering whether we have anything...
Thanks a lot for your answer.
I mean 3D image processing and I am dealing with tiff images.
I want to read tiff images do some operations and write them back.
Please someone give me an idea.
Best regards,
Hi !,
Does any one know about image processing libraries for Fortran 2003. I
want to read images, convert it into a matrix, do some manipulation and
save it back as images. Even ideas about how to do this will be appreciated.
Many thanks,
This is the whole error.
Please tell me what should I do?
Integer, Parameter :: cns1=Z'DEADBEEF'
1
Error: Arithmetic overflow converting INTEGER(16) to INTEGER(4) at (1). This check can be disabled with the option -fno-range-check
regards,
yes d is unsigned int
But my program in FORTRAN gives error, so it is not OK:
Error: Arithmetic overflow converting INTEGER(16) to INTEGER(4)
Please tell me what should I do, if I want to convert it to higher precision I will come with a lot of problem, should I do that is there any...
Hi,
Is there any one familiar with c++ who can help me implement this one in Fortran
static const unsigned int d1=0xDEADBEEF ^ (0x1fc4ce47*(d^(d>>13)));
Is the below one is the correct implementation:
Integer :: d1, d
Integer, Parameter :: cns1=Z'DEADBEEF'
Integer, Parameter ...
Sorry I also have another question:
static const unsigned int oWeylOffset=0x8009d14b;
what does the above expression means?
I know the whole meaning of that, my question arises from that I have read that:
unsigned int is 4 Bytes precision but the above number is more than the range of 4...
...so excuse me for my question.
Please sb kindly tell me what does the below sentence means?
static const unsigned int d1=0xDEADBEEF ^ (0x1fc4ce47*(d^(d>>13)));
My question is about what is 0xDEADBEEF or 0x1fc4ce47 ?
If I want to write a description for this so any programmer no matter what...
I forgot to mention, I do not know whether I should pass the whole data structure to the routine or not?
It is a very big data structure, is it correct to pass the whole of it in the routine. there are lots of variables that will not be used in this subroutine, does not it take a lot of memory...
...:: la
End Subroutine
or
Call check(n, person(:)%lsi, person(:)%lsa)
Subroutine check(n, li, la)
Integer, Intent(In) :: n
Integer, Dimension(1:*), Intent(In) :: li
Integer, Dimension(1:*), Intent(In) :: la
End Subroutine
or if I define the new structure like
Type new
Sequence
Integer...
Hello to all,
I have a question that bothers me a lot and I could not find any answer.
I have some structures in my code, that are very useful in parallel programing using MPI, the problem is sometimes in sorting they will cause a lot of latency.
like the below one
Type person
Sequence...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.