void move_camera(int nc, int krp) { double curr_time = 0; while (curr_time < dtp) { null_buf(nc, krp); move_particles(nc, krp); final_buf(nc, krp); curr_time += dtp_var[krp]; } }
void TestBoundedBuffer::TestConstruction() { unsigned char buf [300]; ZeroMemory(buf, 300); buf[0] = 1; BoundedBuffer boundedBuf(buf, 300); assertMessage(boundedBuf.m_iMaxSize == 300, _T("Buffer bounds not being set")); assertMessage(boundedBuf.m_pBuf != NULL, _T("Failed to allocated the local (I work on this) buffer")); assertMessage(boundedBuf.m_pBuf[0] == 1, _T("Didn't copy buffer from source to temporary copy")); assertMessage((void*)(boundedBuf.m_pBuf) != (void*)(&buf), _T("Buffer internal pointer not set")); BoundedBuffer null_buf(NULL, 100); assertMessage(null_buf.m_iMaxSize == 100, _T("Buffer bounds not being set")); assertMessage(null_buf.m_pBuf != NULL, _T("Failed to allocated the local (I work on this) buffer")); assertMessage(null_buf.m_pBuf[0] == 0, _T("Didn't null out the desired buffer space.")); BoundedBuffer empty_buf(NULL, 0); assertMessage(empty_buf.m_iMaxSize == 0, _T("Buffer bounds not being set")); assertMessage(empty_buf.m_pBuf == NULL, _T("Failed to allocated the local (I work on this) buffer")); }