Skip to content

Commit

Permalink
Merge pull request #1372 from eisenhauer/FFSupstream
Browse files Browse the repository at this point in the history
FFS upstream
  • Loading branch information
eisenhauer authored Apr 11, 2019
2 parents 2d6a4ef + 70c7bc1 commit 8a84920
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion thirdparty/ffs/ffs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ option(FFS_USE_DILL "Enable Dill code generation" ON)
if(FFS_USE_DILL)
find_package(dill 2.3.1 REQUIRED)
set(HAVE_DILL_H ON)
set(FFS_CONVERSION_GENERATION_DEFAULT 0)
set(FFS_CONVERSION_GENERATION_DEFAULT ${DILL_HAS_NATIVE_DCG})
set(DO_DCG TRUE)
target_link_libraries(ffs PRIVATE dill::dill)
list(APPEND _pkg_config_private_reqs "dill >= ${dill_VERSION}")
Expand Down
12 changes: 12 additions & 0 deletions thirdparty/ffs/ffs/ffs/ffs_conv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1531,6 +1531,18 @@ new_convert_field(char *src_field_addr, char *dest_field_addr,
if (conv->iovar->type_desc.type == FMType_pointer) {
array_of_pointers = (conv->iovar->type_desc.next->next->type == FMType_pointer);
}
/* changes here */
if (data_already_copied &&
!conv->src_field.byte_swap &&
(conv->src_field.src_float_format == conv->src_field.target_float_format) &&
(conv->src_field.size == conv->dest_size) &&
(conv->subconversion == NULL) &&
(next->type != FMType_pointer) &&
(next->type != FMType_string) &&
((conv->src_field.data_type != string_type))) {
/* Nothing but data movement required */
break;
}
for (i=0; i< elements ; i++) {
new_convert_field(new_src, new_dest, conv_status, conv,
next, data_already_copied);
Expand Down

0 comments on commit 8a84920

Please sign in to comment.