About
Docs
Files
Support
Index

Essentials
AutoDocs
Library functions
Cooperate
Process mastering
Debug
Own debugging kit
FGE
Smart modeid pick
Loader
Shared lib. loader
Macros
Helper macros
Structs
All the structures
Logs
Library changelogs
Tools
Progs baked inside

MACROS
LP2IEEE()A
QBASEASSIGN()A
QBASEASSIGN2()A
QBASEDECL()A
QBASEDECL2()A
QBASEJUMPTAB()A
QBASELOCAL()A
QBASEPOINTER()A
QBASERESOLVE()A
QBASESLOTS()A
QDEV_HLP_ASMDIVU()A
QDEV_HLP_ASMMULU()A
QDEV_HLP_DELTAITER()A
QDEV_HLP_DELTASCAN()A
QDEV_HLP_DFUNC()A
QDEV_HLP_DIVUQUAD()A
QDEV_HLP_DSTOTV()A
QDEV_HLP_GETREG()A
QDEV_HLP_ISLISTEMPTY()A
QDEV_HLP_ITERATE()A
QDEV_HLP_MULUQUAD()A
QDEV_HLP_NOINTSEC()A
QDEV_HLP_NOSWITCH()A
QDEV_HLP_PROCDECL()A
QDEV_HLP_PROCEXIT()A
QDEV_HLP_REMOTE()A
QDEV_HLP_RESGLOB()A
QDEV_HLP_SETREG()A
QDEV_HLP_TASKDECL()A
QDEV_HLP_TVTODS()A
REGARG()A
REGVAR()A
__LOADA4()A
__SAVEA4()A
QDEVDEBUG()P
QDEVDEBUGIO()P
MFADD()I
MFCGE()I
MFCLE()I
MFCMP()I
MFDIV()I
MFFIX()I
MFFLT()I
MFMUL()I
MFSUB()I
MFVALUE()I
QDEV_HLP_ABS()I
QDEV_HLP_ADDTV()I
QDEV_HLP_ASMALIAS()I
QDEV_HLP_ASMENTRY()I
QDEV_HLP_BADDR()I
QDEV_HLP_BYTESPERROW()I
QDEV_HLP_EQUALIZEUC()I
QDEV_HLP_EQUALIZELC()I
QDEV_HLP_E_DIVULONG10()I
QDEV_HLP_FFPTOIEEE()I
QDEV_HLP_FLIP()I
QDEV_HLP_FNV32CSUM()I
QDEV_HLP_FNV32HASH()I
QDEV_HLP_IEEETOFFP()I
QDEV_HLP_LCOPYMEM()I
QDEV_HLP_LSHIFT64()I
QDEV_HLP_MAX()I
QDEV_HLP_MIN()I
QDEV_HLP_MKBADDR()I
QDEV_HLP_MKSTR()I
QDEV_HLP_MULU32X32()I
QDEV_HLP_N_DIVULONG10()I
QDEV_HLP_N_MULUXXX10()I
QDEV_HLP_NEG()I
QDEV_HLP_QUICKFILL()I
QDEV_HLP_SWAPQUAD()I
QDEV_HLP_POPCOUNT()I
QDEV_HLP_RASSIZE()I
QDEV_HLP_ROUNDPOW2()I
QDEV_HLP_RSHIFT64()I
QDEV_HLP_SUBTV()I
QDEV_HLP_SWAPLONG()I
QDEV_HLP_SWAPQUAD()I
QDEV_HLP_SWAPWORD()I



Q
D
E
V
_
H
L
P
_
D
E
L
T
A
I
T
E
R
(
)

SOURCE: qdev_macros.txt 1.16 (12/09/2014) English

                                 AMIGA - PUBLIC
 ----------------------------------------------------------------------------

   NAME

      QDEV_HLP_DELTAITER() - Allows to traverse Amiga, doubly
                             linked list in a fast way.



   SYNOPSIS

      QDEV_HLP_DELTAITER(lh, type, h, t);

      QDEV_HLP_DELTAITER(
                  struct List *, <type>, <node_h>, <node_t>);



   FUNCTION

      This macro allows to traverse the Amiga, doubly linked
      list by reducing number of iterations by a half by
      examining head and tail entries at once. Principle of
      operation on a list of 10 nodes explained:

      Regular walkthrough gets slower and slower as it goes.
      1    2    3    4    5    6    7    8    9    10
      ->   ->   ->   ->   ->   ->   ->   ->   ->   -> E = End

      Delta scan slows down only to a certain point (half the
      regular scan).
      1    2    3    4    5    6    7    8    9    10
      ->   ->   ->   ->   -> E <-   <-   <-   <-   <-

      So it looks like this in reality which means that even
      entry miss is faster and bottom entries can be found
      with the same overhead as the top ones:

      1 & 10    2 & 9     3 & 8     4 & 7     5 & 6
      ->        ->        ->        ->        ->      E



   INPUTS

      list - Addr. of the list (struct List, struct MinList).

      type - Typecasting of the <node_(h|t)> pointer.

      h    - Head node pointer (entry from the top).

      t    - Tail node pointer (entry from the bottom).



   RETURNS

      No output.



   BASES

      None.



   NOTES

      This macro does not cache ln_Succ, ln_Pred pointers so
      it is not safe to call 'Remove()' during iteration!

      This macro was designed mainly to quickly compare the
      node addresses. It is most probably useless for other
      purposes (counting, data extraction, etc). Use helper
      macros QDEV_HLP_DELTA#? to match and stop at the delta
      point.

      All OS lists can be traversed with this macro but some
      sort of arbitration must be provided. This is typically
      to be Forbid()/Permit() pair.



   SEE ALSO

      QDEV_HLP_ISLISTEMPTY(), QDEV_HLP_ITERATE(),
      QDEV_HLP_DELTASCAN()



   EXAMPLE

      #include <proto/exec.h>
      #include <qdev.h>

      LONG isonlist(struct List *lh, void *node)
      {
        REGISTER struct Node *a;
        REGISTER struct Node *b;
        REGISTER LONG res = 0;

        /*
         * Enter forbidden state in case of OS list.
        */
        QDEV_HLP_NOSWITCH
        (
          QDEV_HLP_DELTAITER(lh, struct Node *, a, b)
          {
            if (((res = QDEV_HLP_DELTAADDR(node, a, b)))   ||
                  QDEV_HLP_DELTACOND(struct Node *, a, b))
            {
              break;
            }
          }
        );

        return res;
      }
     


   BUGS

      None known.



 ----------------------------------------------------------------------------
    


No more fear cus pure HTML is here!
Copyright (C) 2013-2014 by Burnt Chip Dominators