Skip to content

Conversation

@lplewa
Copy link
Contributor

@lplewa lplewa commented Apr 11, 2025

fixes: #1080

Description

Checklist

  • Code compiles without errors locally
  • All tests pass locally
  • CI workflows execute properly
  • CI workflows, not executed per PR (e.g. Nightly), execute properly
  • New tests added, especially if they will fail without my changes
  • Added/extended example(s) to cover this functionality
  • Extended the README/documentation
  • All newly added source files have a license
  • All newly added source files are referenced in CMake files
  • Logger (with debug/info/... messages) is used
  • All API changes are reflected in docs and def/map files, and are tested

@lplewa lplewa requested a review from a team as a code owner April 11, 2025 10:56
@lplewa lplewa changed the title add const in api add missing const in external umf api Apr 11, 2025
@lplewa lplewa force-pushed the const_api branch 3 times, most recently from 26e2716 to dc6d570 Compare April 11, 2025 12:45
// in an mmap call like this:
// mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0)
umf_memory_provider_ops_t *provider_ops = umfOsMemoryProviderOps();
const umf_memory_provider_ops_t *provider_ops = umfOsMemoryProviderOps();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compat tests should fail here - I need to investigate this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/home/runner/work/unified-memory-framework/unified-memory-framework/tag_version/examples/basic/basic.c: In function ‘main’:
/home/runner/work/unified-memory-framework/unified-memory-framework/tag_version/examples/basic/basic.c:25:47: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
   25 |     umf_memory_provider_ops_t *provider_ops = umfOsMemoryProviderOps();
      |                                               ^~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/unified-memory-framework/unified-memory-framework/tag_version/examples/basic/basic.c:72:39: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
   72 |     umf_memory_pool_ops_t *pool_ops = umfScalablePoolOps();
      |                                       ^~~~~~~~~~~~~~~~~~

@bratpiorka bratpiorka merged commit ebcbc07 into oneapi-src:main Apr 14, 2025
87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

functions umf<pool/provider name>ops() should return const ptr.

3 participants