Skip to content

Commit 6a62346

Browse files
committed
cargo fmt update
1 parent c06655c commit 6a62346

17 files changed

Lines changed: 1410 additions & 1230 deletions

examples/basic.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
use opencl3::command_queue::{CommandQueue, CL_QUEUE_PROFILING_ENABLE};
15+
use opencl3::Result;
16+
use opencl3::command_queue::{CL_QUEUE_PROFILING_ENABLE, CommandQueue};
1617
use opencl3::context::Context;
17-
use opencl3::device::{get_all_devices, Device, CL_DEVICE_TYPE_GPU};
18+
use opencl3::device::{CL_DEVICE_TYPE_GPU, Device, get_all_devices};
1819
use opencl3::kernel::{ExecuteKernel, Kernel};
1920
use opencl3::memory::{Buffer, CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY};
2021
use opencl3::program::Program;
21-
use opencl3::types::{cl_event, cl_float, CL_BLOCKING, CL_NON_BLOCKING};
22-
use opencl3::Result;
22+
use opencl3::types::{CL_BLOCKING, CL_NON_BLOCKING, cl_event, cl_float};
2323
use std::ptr;
2424

2525
const PROGRAM_SOURCE: &str = r#"

examples/clinfo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
use opencl3::device::{device_type_text, vendor_id_text, Device, CL_DEVICE_TYPE_ALL};
1615
use opencl3::Result;
16+
use opencl3::device::{CL_DEVICE_TYPE_ALL, Device, device_type_text, vendor_id_text};
1717

1818
/// Finds all the OpenCL platforms and devices on a system.
1919
///

examples/opencl2image.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414

1515
use cl3::ext::CL_IMAGE_FORMAT_NOT_SUPPORTED;
1616
use cl3::memory::{CL_MEM_OBJECT_IMAGE2D, CL_MEM_WRITE_ONLY, CL_RGBA, CL_UNSIGNED_INT8};
17-
use cl3::types::{cl_image_desc, cl_image_format, CL_NON_BLOCKING};
17+
use cl3::types::{CL_NON_BLOCKING, cl_image_desc, cl_image_format};
1818
use libc::c_void;
19-
use opencl3::command_queue::{CommandQueue, CL_QUEUE_PROFILING_ENABLE};
19+
use opencl3::Result;
20+
use opencl3::command_queue::{CL_QUEUE_PROFILING_ENABLE, CommandQueue};
2021
use opencl3::context::Context;
21-
use opencl3::device::{Device, CL_DEVICE_TYPE_GPU};
22+
use opencl3::device::{CL_DEVICE_TYPE_GPU, Device};
2223
use opencl3::kernel::{ExecuteKernel, Kernel};
2324
use opencl3::memory::Image;
24-
use opencl3::program::{Program, CL_STD_2_0};
25+
use opencl3::program::{CL_STD_2_0, Program};
2526
use opencl3::types::cl_event;
26-
use opencl3::Result;
2727

2828
const PROGRAM_SOURCE: &str = r#"
2929
kernel void colorize(write_only image2d_t image)

examples/opencl2serde.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
use opencl3::Result;
1516
use opencl3::command_queue::CommandQueue;
1617
use opencl3::context::Context;
17-
use opencl3::device::{get_all_devices, Device, CL_DEVICE_TYPE_GPU};
18+
use opencl3::device::{CL_DEVICE_TYPE_GPU, Device, get_all_devices};
1819
use opencl3::error_codes::cl_int;
1920
use opencl3::kernel::{ExecuteKernel, Kernel};
2021
use opencl3::memory::{CL_MAP_READ, CL_MAP_WRITE};
21-
use opencl3::program::{Program, CL_STD_2_0};
22+
use opencl3::program::{CL_STD_2_0, Program};
2223
use opencl3::svm::{ExtendSvmVec, SvmVec};
2324
use opencl3::types::CL_BLOCKING;
24-
use opencl3::Result;
2525
use serde::de::DeserializeSeed;
2626
use std::ptr;
2727

examples/opencl2svm.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
use opencl3::command_queue::{CommandQueue, CL_QUEUE_PROFILING_ENABLE};
15+
use opencl3::Result;
16+
use opencl3::command_queue::{CL_QUEUE_PROFILING_ENABLE, CommandQueue};
1617
use opencl3::context::Context;
17-
use opencl3::device::{Device, CL_DEVICE_TYPE_GPU};
18+
use opencl3::device::{CL_DEVICE_TYPE_GPU, Device};
1819
use opencl3::error_codes::cl_int;
1920
use opencl3::kernel::{ExecuteKernel, Kernel};
2021
use opencl3::memory::{CL_MAP_READ, CL_MAP_WRITE};
21-
use opencl3::program::{Program, CL_STD_2_0};
22+
use opencl3::program::{CL_STD_2_0, Program};
2223
use opencl3::svm::SvmVec;
2324
use opencl3::types::CL_BLOCKING;
24-
use opencl3::Result;
2525

2626
const PROGRAM_SOURCE: &str = r#"
2727
kernel void inclusive_scan_int (global int* output,

0 commit comments

Comments
 (0)