Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jrenaud90 committed Dec 1, 2024
1 parent 03b4e33 commit 1b6de42
Showing 1 changed file with 28 additions and 21 deletions.
49 changes: 28 additions & 21 deletions CyRK/cy/cysolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,31 +62,38 @@ CySolverBase::CySolverBase(
this->storage_sptr->update_message("CySolverBase Initializing.");

// Build storage for args
if (args_ptr && (size_of_args > 0))
if (0)
{
// Allocate memory for the size of args.
// Store void pointer to it.
printf("Pre resize\n");
this->args_char_vec.resize(size_of_args);

// Copy over contents of arg
char* args_in_as_char_ptr = (char*)args_ptr;
printf("Pre Copy Over: arg_in_char = %p; sizeof = %d; args_in_char+size = %p\n", args_in_as_char_ptr, size_of_args, args_in_as_char_ptr + size_of_args);
this->args_char_vec.insert(this->args_char_vec.begin(), args_in_as_char_ptr, args_in_as_char_ptr + size_of_args);
// std::memcpy(this->args_ptr, args_ptr, size_of_args);

this->args_ptr = (void*)this->args_char_vec.data();
printf("Post\n");
if (args_ptr && (size_of_args > 0))
{
// Allocate memory for the size of args.
// Store void pointer to it.
printf("Pre resize\n");
this->args_char_vec.resize(size_of_args);

// Copy over contents of arg
char* args_in_as_char_ptr = (char*)args_ptr;
printf("Pre Copy Over: arg_in_char = %p; sizeof = %d; args_in_char+size = %p\n", args_in_as_char_ptr, size_of_args, args_in_as_char_ptr + size_of_args);
this->args_char_vec.insert(this->args_char_vec.begin(), args_in_as_char_ptr, args_in_as_char_ptr + size_of_args);
// std::memcpy(this->args_ptr, args_ptr, size_of_args);

this->args_ptr = (void*)this->args_char_vec.data();
printf("Post\n");
}
else
{
this->args_char_vec.resize(8);
for (size_t i = 0; i < 8; i++)
{
this->args_char_vec[i] = 0;
}

this->args_ptr = (void*)this->args_char_vec.data();
}
}
else
{
this->args_char_vec.resize(8);
for (size_t i = 0; i < 8; i++)
{
this->args_char_vec[i] = 0;
}

this->args_ptr = (void*)this->args_char_vec.data();
this->args_ptr = args_ptr;
}

// Check for errors
Expand Down

0 comments on commit 1b6de42

Please sign in to comment.