// File: huiwenliuge[P]EmoAnaer/src/RNNet.cpp
// Function: RNNet::RNNForward_CROSSENTROPY_Nthread(char const*, int)
double RNNet::RNNForward_CROSSENTROPY_Nthread(const char* pathRoot,int Nthread){
    
    char* psen=(char*)calloc(sizeof(char),41);
    int pathrootlen=strlen(pathRoot);   
    strcpy(psen,pathRoot);
    strcpy(psen+pathrootlen,"Material/");
    FreeSen();
    Sentence sentmp=FetchSent(psen);
    free(psen);
    flag = totnum-1;
    
    std::thread th[Nthread];
    int n;
   
    for(n=0;n<Nthread;++n){
        th[n]=std::thread(_Forward_CROSSENTROPY_SingleTask,\
            this,&sentmp,n);
    }
    for(n=0;n<Nthread;++n)
        th[n].join();
    
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
movl $0x1, %edi
movl $0x29, %esi
callq 0x20b0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2070
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2120
movq -0x28(%rbp), %rdi
movslq -0x2c(%rbp), %rax
addq %rax, %rdi
leaq 0x438c(%rip), %rsi      # 0x80bb
callq 0x2120
movq -0x90(%rbp), %rdi
callq 0x3520
movq -0x90(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x3050
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
callq 0x21a0
movq -0x90(%rbp), %rax
movq 0x50(%rax), %rcx
decq %rcx
movq %rcx, 0x48(%rax)
movl -0x1c(%rbp), %eax
movq %rax, -0x88(%rbp)
movq %rsp, %rcx
movq %rcx, -0x40(%rbp)
leaq 0xf(,%rax,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x80(%rbp)
movq %rcx, %rsp
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
je 0x3df7
movq -0x80(%rbp), %rax
movq -0x88(%rbp), %rdx
shlq $0x3, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0xa0(%rbp)
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x58d0
movq -0xa8(%rbp), %rax
movq -0xa0(%rbp), %rcx
addq $0x8, %rax
cmpq %rcx, %rax
movq %rax, -0x98(%rbp)
jne 0x3dc6
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x3eac
movq -0x90(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq 0x15c(%rip), %rsi       # 0x3f80
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rdx
leaq -0x68(%rbp), %rcx
leaq -0x4c(%rbp), %r8
callq 0x58f0
jmp 0x3e3b
movq -0x80(%rbp), %rdi
movslq -0x4c(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
leaq -0x58(%rbp), %rsi
callq 0x59c0
leaq -0x58(%rbp), %rdi
callq 0x5a00
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x3dfe
movq -0x80(%rbp), %rcx
movq %rdx, %rsi
movq -0x88(%rbp), %rdx
movq %rsi, -0xb8(%rbp)
movq %rax, %rsi
movq -0xb8(%rbp), %rax
movq %rsi, -0x70(%rbp)
movl %eax, -0x74(%rbp)
shlq $0x3, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, -0xb0(%rbp)
je 0x3f71
jmp 0x3f43
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x3edb
movq -0x80(%rbp), %rax
movslq -0x4c(%rbp), %rcx
leaq (%rax,%rcx,8), %rdi
callq 0x2210
jmp 0x3ece
jmp 0x3ed0
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x3eb3
movq -0x80(%rbp), %rcx
movq -0x88(%rbp), %rdx
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
shlq $0x3, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, -0xc0(%rbp)
je 0x3f32
movq -0xc0(%rbp), %rdi
addq $-0x8, %rdi
movq %rdi, -0xc8(%rbp)
callq 0x5a00
movq -0x80(%rbp), %rcx
movq -0xc8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0xc0(%rbp)
jne 0x3f04
movq -0x40(%rbp), %rax
movq %rax, %rsp
movsd -0x8(%rbp), %xmm0
movq %rbp, %rsp
popq %rbp
retq
movq -0xb0(%rbp), %rdi
addq $-0x8, %rdi
movq %rdi, -0xd0(%rbp)
callq 0x5a00
movq -0x80(%rbp), %rcx
movq -0xd0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0xb0(%rbp)
jne 0x3f43
jmp 0x3f73
movq -0x70(%rbp), %rdi
callq 0x2230
nopl (%rax)