// File: /workspace/github_cpp_makefile_star2_O2/xbai0624[P]dnn/src/ConstructLayer.cpp
// Function: ConstructLayer::SetupDropOutFilterPool()
void ConstructLayer::SetupDropOutFilterPool()
{
    //std::cout<<"INFO: setting up drop-out filter pools."<<std::endl;
    if(__activeFlag.size() <= 0)
    {
        std::cout<<__func__<<" Error: Filters must be initialized before setting up filter pool."
            <<std::endl;
        exit(0);
    }
    assert(__activeFlag[0].Dimension().first > 0);
    assert(__dropOutBranches >= 1);
    assert(__dropOut > 0.); // one cannot drop all neurons/matrix_elements

    // 1) generate drop-out pool for each filter
    std::vector<std::vector<Filter2D>> _p;
    for(auto &i: __activeFlag)
    {
        std::vector<Filter2D> tmp = i.GenerateCompleteDropOutSet(__dropOutBranches, __dropOut);
        _p.push_back(tmp);
    }

    // 2) fill accordingly to the drop-out pool
    for(int drop_id=0;drop_id<__dropOutBranches;drop_id++)
    {
        std::vector<Filter2D> tmp;
        for(auto &i: _p)
        {
            tmp.push_back(i[drop_id]);
        }
        __activeFlagPool.push_back(tmp);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq 0x108(%rdi), %rdi
cmpq %rdi, 0x110(%rbx)
je 0xc286
callq 0x1145e
testq %rax, %rax
je 0xc2b7
cmpl $0x0, 0x3cc(%rbx)
jle 0xc2d6
movsd 0x3d8(%rbx), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0xc2f5
xorpd %xmm0, %xmm0
leaq 0x20(%rsp), %r14
andq $0x0, 0x10(%r14)
movapd %xmm0, (%r14)
movq 0x108(%rbx), %r15
movq 0x110(%rbx), %r13
movq %rsp, %r12
cmpq %r13, %r15
je 0xc1fe
movslq 0x3cc(%rbx), %rdx
movsd 0x3d8(%rbx), %xmm0
movq %r12, %rdi
movq %r15, %rsi
callq 0x11488
movq %r14, %rdi
movq %r12, %rsi
callq 0x11832
movq %r12, %rdi
callq 0x1114a
addq $0x18, %r15
jmp 0xc1c6
leaq 0x120(%rbx), %rax
movq %rax, 0x18(%rsp)
xorl %r12d, %r12d
movq %rsp, %r15
movslq 0x3cc(%rbx), %rax
cmpq %rax, %r12
jge 0xc26d
andq $0x0, 0x10(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
movq 0x20(%rsp), %r13
movq 0x28(%rsp), %rbp
imulq $0x18, %r12, %r14
cmpq %rbp, %r13
je 0xc253
movq (%r13), %rsi
addq %r14, %rsi
movq %r15, %rdi
callq 0x11368
addq $0x18, %r13
jmp 0xc239
movq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x11832
movq %r15, %rdi
callq 0x1114a
incq %r12
jmp 0xc210
leaq 0x20(%rsp), %rdi
callq 0x11128
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x26d4b(%rip), %rdi     # 0x32fd8
leaq 0x160f6(%rip), %rsi     # 0x2238a
callq 0x4240
leaq 0x16101(%rip), %rsi     # 0x223a1
movq %rax, %rdi
callq 0x4240
movq %rax, %rdi
callq 0x4130
xorl %edi, %edi
callq 0x4260
leaq 0x16126(%rip), %rdi     # 0x223e4
leaq 0x15415(%rip), %rsi     # 0x216da
leaq 0x1613e(%rip), %rcx     # 0x2240a
movl $0xa82, %edx            # imm = 0xA82
callq 0x4180
leaq 0x16163(%rip), %rdi     # 0x22440
leaq 0x153f6(%rip), %rsi     # 0x216da
leaq 0x1611f(%rip), %rcx     # 0x2240a
movl $0xa83, %edx            # imm = 0xA83
callq 0x4180
leaq 0x1615b(%rip), %rdi     # 0x22457
leaq 0x153d7(%rip), %rsi     # 0x216da
leaq 0x16100(%rip), %rcx     # 0x2240a
movl $0xa84, %edx            # imm = 0xA84
callq 0x4180
jmp 0xc31d
movq %rax, %rbx
jmp 0xc328
jmp 0xc31d
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1114a
leaq 0x20(%rsp), %rdi
callq 0x11128
movq %rbx, %rdi
callq 0x43b0