jacobiandoubletests.cpp
Go to the documentation of this file.
00001 #include "jacobiandoubletests.hpp"
00002 
00003 namespace KDL {
00004 
00005 
00006 void checkDoubleOps() {
00007     KDL_CTX;
00008         checkUnary<OpTan,double>::check();
00009         checkUnary<OpExp,double>::check();
00010         checkUnary<OpSin,double>::check();
00011         checkUnary<OpCos,double>::check();
00012         checkUnary<OpLog,double>::check(&posrandom);
00013         checkUnary<OpAtan,double>::check();
00014         checkUnary<OpAsin,double>::check(&random,1E-8,1E-3);
00015         checkUnary<OpAcos,double>::check(&random,1E-8,1E-3);
00016         checkUnary<OpSqrt,double>::check(&posrandom);
00017         checkBinary<OpMult,double,double>::check();
00018         checkBinary<OpAtan2,double,double>::check(1E-8,1E-3);
00019 }
00020 
00021 /*
00022 void checkDoubleCodeSize() {
00023         PV<double> a(2);
00024         PV<double> b(2);
00025         PV<double> res(2);
00026         random(a);
00027         random(b);
00028         checkDoubleCodeSizeMult(a,b,res);
00029 }
00030 ** VISUAL C++ assembler code : 
00031  * Shows that there is little overhead from the framework
00032  * There is some overhead because of the isConstant() tests, but this pays itself back
00033  * if one deals with e.g. Frames or higher number of derivatives.
00034  *
00035 ?checkDoubleCodeSizeMult@@YAXABV?$PV@N@@0AAV1@@Z PROC NEAR ; checkDoubleCodeSizeMult, COMDAT
00036 
00037 ; 60   :        res = a*b;
00038 
00039         mov     ecx, DWORD PTR _b$[esp-4]
00040         mov     edx, DWORD PTR _res$[esp-4]
00041         push    esi
00042         mov     esi, DWORD PTR _a$[esp]
00043         fld     QWORD PTR [esi]
00044         mov     al, BYTE PTR [esi+16]
00045         test    al, al
00046         fmul    QWORD PTR [ecx]
00047         push    edi
00048         fstp    QWORD PTR [edx]
00049         je      SHORT $L13435
00050         mov     al, BYTE PTR [ecx+16]
00051         test    al, al
00052         je      SHORT $L13435
00053         mov     eax, 1
00054         jmp     SHORT $L13436
00055 $L13435:
00056         xor     eax, eax
00057 $L13436:
00058         test    al, al
00059         mov     BYTE PTR [edx+16], al
00060         jne     SHORT $L13419
00061         mov     edi, DWORD PTR [edx+12]
00062         xor     eax, eax
00063         test    edi, edi
00064         jle     SHORT $L13419
00065         mov     edx, DWORD PTR [edx+8]
00066         push    ebx
00067 $L13417:
00068         mov     bl, BYTE PTR [esi+16]
00069         test    bl, bl
00070         je      SHORT $L13446
00071         mov     ebx, DWORD PTR [ecx+8]
00072         fld     QWORD PTR [ebx+eax*8]
00073         fmul    QWORD PTR [esi]
00074         jmp     SHORT $L13445
00075 $L13446:
00076         mov     bl, BYTE PTR [ecx+16]
00077         test    bl, bl
00078         je      SHORT $L13447
00079         mov     ebx, DWORD PTR [esi+8]
00080         fld     QWORD PTR [ebx+eax*8]
00081         fmul    QWORD PTR [ecx]
00082         jmp     SHORT $L13445
00083 $L13447:
00084         mov     ebx, DWORD PTR [ecx+8]
00085         fld     QWORD PTR [ebx+eax*8]
00086         mov     ebx, DWORD PTR [esi+8]
00087         fmul    QWORD PTR [esi]
00088         fld     QWORD PTR [ebx+eax*8]
00089         fmul    QWORD PTR [ecx]
00090         faddp   ST(1), ST(0)
00091 $L13445:
00092         fstp    QWORD PTR [edx+eax*8]
00093         inc     eax
00094         cmp     eax, edi
00095         jl      SHORT $L13417
00096         pop     ebx
00097 $L13419:
00098         pop     edi
00099         pop     esi
00100 
00101 ; 61   : }
00102 
00103 *
00104 void checkDoubleCodeSizeMult(const PV<double>& a,const PV<double>& b,PV<double>& res) {
00105         res = a*b;
00106 }*/
00107 
00108 } // namespace
00109 
00110 


orocos_kdl
Author(s):
autogenerated on Mon Oct 6 2014 03:11:16