diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2018-03-27 17:15:49 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:49:16 +0000 |
commit | fbb805450c1509cee2d9270bc8e04ce9165ac4bc (patch) | |
tree | a97ace1862360e232268b5071b79d6cdaf887455 /arm_compute/graph2/backends/GLES/GCDeviceBackend.h | |
parent | 3672df36e7b61f280d66b6cbb11c2b4254fbbc8c (diff) | |
download | ComputeLibrary-fbb805450c1509cee2d9270bc8e04ce9165ac4bc.tar.gz |
COMPMID-1028: Add GLES backend
Change-Id: If3172cdb6528dbc20262836174aedaef52c78bdb
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/126111
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'arm_compute/graph2/backends/GLES/GCDeviceBackend.h')
-rw-r--r-- | arm_compute/graph2/backends/GLES/GCDeviceBackend.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/arm_compute/graph2/backends/GLES/GCDeviceBackend.h b/arm_compute/graph2/backends/GLES/GCDeviceBackend.h new file mode 100644 index 0000000000..22ba91496b --- /dev/null +++ b/arm_compute/graph2/backends/GLES/GCDeviceBackend.h @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2018 ARM Limited. + * + * SPDX-License-Identifier: MIT + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +#ifndef __ARM_COMPUTE_GRAPH2_GCDEVICEBACKEND_H__ +#define __ARM_COMPUTE_GRAPH2_GCDEVICEBACKEND_H__ + +#include "arm_compute/graph2/IDeviceBackend.h" + +#include "arm_compute/runtime/GLES_COMPUTE/GCBufferAllocator.h" + +namespace arm_compute +{ +namespace graph2 +{ +namespace backends +{ +/** GLES Compute device backend */ +class GCDeviceBackend final : public IDeviceBackend +{ +public: + /** Default Constructor */ + GCDeviceBackend(); + + // Inherited overridden methods + void initialize_backend() override; + void setup_backend_context(GraphContext &ctx) override; + std::unique_ptr<ITensorHandle> create_tensor(const Tensor &tensor) override; + std::unique_ptr<ITensorHandle> create_subtensor(ITensorHandle *parent, TensorShape shape, Coordinates coords, bool extend_parent) override; + std::unique_ptr<arm_compute::IFunction> configure_node(INode &node, GraphContext &ctx) override; + Status validate_node(INode &node) override; + std::shared_ptr<arm_compute::IMemoryManager> create_memory_manager(MemoryManagerAffinity affinity) override; + +private: + GCBufferAllocator _allocator; /**< GLES buffer affinity allocator */ +}; +} // namespace backends +} // namespace graph2 +} // namespace arm_compute +#endif //__ARM_COMPUTE_GRAPH2_GCDEVICEBACKEND_H__ |