In both cases is an index.
In the first one is the index in the logical(1) array. In the second one is the bit index.
Is a flag for activate or deactivate the node.
( in the second case, the value of ACTIVE is missed, but is just the bit position for the flag)
Thanks for the answer.
The type(node) have several variables ( coord, veloc, force, ...). I thing if I use 4-logical(1) is not really expensive for the memory.
The most important thing is the speed, then if the use of logical is faster than the bit functions, thats enough for me.
thanks again.
Hi,
I need use flag variables for intensive use in user defined types, but I'm not sure about the faster way for this. I'm considering two posibilities. The first one is use directly logical variables, as follow:
type node_t
....
logical(1), dimension(4) :: flag
...
end type
integer...
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.