}
}
+/* Returns the width of the widest dimension in the grid of the given
+ run command. */
+size_t
+pocl_cmd_max_grid_dim_width (_cl_command_run *cmd)
+{
+ return max (max (cmd->pc.local_size[0] * cmd->pc.num_groups[0],
+ cmd->pc.local_size[1] * cmd->pc.num_groups[1]),
+ cmd->pc.local_size[2] * cmd->pc.local_size[2]);
+}
+
+
/* CPU driver stuff */
#ifdef HAVE_DLFCN_H
return module_fn;
}
-/* Returns the width of the widest dimension in the grid of the given
- run command. */
-size_t
-pocl_cmd_max_grid_dim_width (_cl_command_run *cmd)
-{
- return max (max (cmd->pc.local_size[0] * cmd->pc.num_groups[0],
- cmd->pc.local_size[1] * cmd->pc.num_groups[1]),
- cmd->pc.local_size[2] * cmd->pc.local_size[2]);
-}
/* Look for a dlhandle in the dlhandle cache for the given kernel command.
If found, push the handle up in the cache to improve cache hit speed,
#endif
+
#define MIN_MAX_MEM_ALLOC_SIZE (128*1024*1024)
/* accounting object for the main memory */