|
| 1 | +##===---------- memory/__init__.py - dpctl module -------*- Python -*------===## |
| 2 | +## |
| 3 | +## Data Parallel Control (dpCtl) |
| 4 | +## |
| 5 | +## Copyright 2020 Intel Corporation |
| 6 | +## |
| 7 | +## Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | +## you may not use this file except in compliance with the License. |
| 9 | +## You may obtain a copy of the License at |
| 10 | +## |
| 11 | +## http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | +## |
| 13 | +## Unless required by applicable law or agreed to in writing, software |
| 14 | +## distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | +## See the License for the specific language governing permissions and |
| 17 | +## limitations under the License. |
| 18 | +## |
| 19 | +##===----------------------------------------------------------------------===## |
| 20 | +## |
| 21 | +## \file |
| 22 | +## This top-level dpctl module. |
| 23 | +## |
| 24 | +##===----------------------------------------------------------------------===## |
| 25 | +""" |
| 26 | + Data Parallel Control Memory |
| 27 | +
|
| 28 | + `dpctl.memory` provides Python objects for untyped USM memory |
| 29 | + container of bytes for each kind of USM pointers: shared pointers, |
| 30 | + device pointers and host pointers. |
| 31 | +
|
| 32 | + Shared and host pointers are accessible from both host and a device, |
| 33 | + while device pointers are only accessible from device. |
| 34 | +
|
| 35 | + Python objects corresponding to shared and host pointers implement |
| 36 | + Python simple buffer protocol. It is therefore possible to use these |
| 37 | + objects to maniputalate USM memory using NumPy or `bytearray`, |
| 38 | + `memoryview`, or `array.array` classes. |
| 39 | + |
| 40 | +""" |
| 41 | +from ._memory import MemoryUSMShared, MemoryUSMDevice, MemoryUSMHost |
0 commit comments