Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 22, 2022
1 parent 2af13c8 commit 231262d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions c_api/src/taichi_core_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,18 @@ void ti_destroy_runtime(TiRuntime runtime) {
TI_CAPI_TRY_CATCH_END();
}

void ti_set_runtime_capabilities_ext(TiRuntime runtime, uint32_t capability_count, TiCapabilityLevelInfo* capabilities) {
void ti_set_runtime_capabilities_ext(TiRuntime runtime,
uint32_t capability_count,
TiCapabilityLevelInfo *capabilities) {
TI_CAPI_TRY_CATCH_BEGIN();
TI_CAPI_ARGUMENT_NULL(runtime);

Runtime *runtime2 = (Runtime *)runtime;
taichi::lang::DeviceCapabilityConfig devcaps;
for (uint32_t i = 0; i < capability_count; ++i) {
const auto &cap_level_info = capabilities[i];
devcaps.set((taichi::lang::DeviceCapability)cap_level_info.capability, cap_level_info.level);
devcaps.set((taichi::lang::DeviceCapability)cap_level_info.capability,
cap_level_info.level);
}
runtime2->get().set_current_caps(std::move(devcaps));

Expand Down
2 changes: 1 addition & 1 deletion taichi/rhi/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ class Device {
inline const DeviceCapabilityConfig &get_current_caps() const {
return caps_;
}
inline void set_current_caps(DeviceCapabilityConfig&& caps) {
inline void set_current_caps(DeviceCapabilityConfig &&caps) {
caps_ = std::move(caps);
}
};
Expand Down

0 comments on commit 231262d

Please sign in to comment.