api_device_triangles Last update: 17.07.2025 1#pragma once 2 3#include <rocky20/api/rocky_model_api.hpp> 4 5namespace device 6{ 7 8template <class backend, typename Callable> 9__global__ void execute_triangles_function( 10 SDeviceModel* device_data, double current_time, 11 Callable triangle_f_ptr, 12 void* udf_data 13) 14{ 15 IRockyDeviceModel device_model_api; 16 device_model_api._impl.model = device_data; 17 device_model_api._impl.current_time = current_time; 18 19 const cuda_general& general = device_data->get_general(); 20 21 int thread_start, thread_step, thread_stop; 22 backend::ThreadIteration(thread_start, thread_step, thread_stop, general.ntrn_active); 23 for (int i = thread_start; i < thread_stop; i += thread_step) 24 { 25 IRockyBoundaryTriangle triangle_api(i, device_data); 26 triangle_f_ptr(device_model_api, triangle_api, udf_data); 27 } 28} 29 30} // namespace device IRockyDeviceModelDefinition rocky_model_api.hpp:19 IRockyGeometryTriangleDefinition rocky_boundary_api.hpp:134