Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev remove cuda tex refs v2 #460

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[depthMap] move camera struct in CUDA portion
  • Loading branch information
Carsten Griwodz committed Aug 9, 2018
commit 288b973c10bce6e24f86d0c27c184a888e7ed46e
34 changes: 0 additions & 34 deletions src/aliceVision/depthMap/cuda/cameraStruct.hpp

This file was deleted.

38 changes: 1 addition & 37 deletions src/aliceVision/depthMap/cuda/commonStructures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,45 +11,9 @@
namespace aliceVision {
namespace depthMap {

cameraStruct::cameraStruct()
: cam( nullptr ),
tex_rgba_hmh( nullptr ),
camId( -1 ),
rc( -1 ),
scale( -1 )
{ }

cameraStruct::cameraStruct( const cameraStruct& orig )
: cam( orig.cam ),
tex_rgba_hmh( orig.tex_rgba_hmh ),
camId( orig.camId ),
rc( orig.rc ),
scale( orig.scale )
{ }

cameraStruct& cameraStruct::operator=( const cameraStruct& orig )
{
cam = orig.cam;
tex_rgba_hmh = orig.tex_rgba_hmh;
camId = orig.camId;
rc = orig.rc;
scale = orig.scale;

return *this;
}

cameraStruct::~cameraStruct()
{
}

void cameraStruct::makeTexRGBA( int w, int h )
{
tex_rgba_hmh.reset( new CudaHostMemoryHeap<uchar4, 2>(CudaSize<2>( w, h ) ) );
}

void cameraStruct::setTexRGBA( int x, int y, const uchar4& val )
{
tex_rgba_hmh->operator()(x,y) = val;
delete cam;
}

} // namespace depthMap
Expand Down