void advance_eye_paths(void* buffers[], void* args_orig) { const timeval start_time = my_WallClockTime(); // cl_args const starpu_args args; unsigned iteration; starpu_codelet_unpack_args(args_orig, &args, &iteration); // buffers // hit point static info HitPointPosition* const hit_points = reinterpret_cast<HitPointPosition* const>(STARPU_VECTOR_GET_PTR(buffers[0])); // eye paths EyePath* const eye_paths = reinterpret_cast<EyePath* const>(STARPU_VECTOR_GET_PTR(buffers[1])); const unsigned eye_paths_count = STARPU_VECTOR_GET_NX(buffers[1]); // seed buffer Seed* const seed_buffer = reinterpret_cast<Seed* const>(STARPU_VECTOR_GET_PTR(buffers[2])); advance_eye_paths_impl(hit_points, // hit_points_count, eye_paths, eye_paths_count, seed_buffer, // seed_buffer_count, args.cpu_scene, args.config->max_eye_path_depth, starpu_combined_worker_get_size()); const timeval end_time = my_WallClockTime(); task_info("CPU", 0, starpu_combined_worker_get_size(), iteration, start_time, end_time, "(3) advance_eye_paths"); }
void func_cpu(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args) { int *value = (int *)STARPU_VARIABLE_GET_PTR(descr[0]); int rank; starpu_codelet_unpack_args(_args, &rank); FPRINTF_MPI(stderr, "Executing codelet with value %d and rank %d\n", *value, rank); STARPU_ASSERT_MSG(*value == rank, "Received value %d is not the expected value %d\n", *value, rank); }
void func_cpu(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args) { int node; int rank; starpu_codelet_unpack_args(_args, &node); starpu_mpi_comm_rank(MPI_COMM_WORLD, &rank); FPRINTF_MPI(stderr, "Expected node: %d - Actual node: %d\n", node, rank); assert(node == rank); }
void func_cpu_args(void *descr[], void *_args) { int *x0 = (int *)STARPU_VARIABLE_GET_PTR(descr[0]); float *x1 = (float *)STARPU_VARIABLE_GET_PTR(descr[1]); int ifactor; float ffactor; starpu_codelet_unpack_args(_args, &ifactor, &ffactor); *x0 = *x0 * ifactor; *x1 = *x1 * ffactor; }