2 * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 #include <arm_compute/graph/Graph.h>
21 #include <arm_compute/graph/Nodes.h>
23 #include "io_accessor.h"
25 extern "C" JNIEXPORT jstring JNICALL
26 Java_com_samsung_testaclexec_ActivityMain_RunACLJNI(JNIEnv *env, jobject)
28 using arm_compute::DataType;
29 using arm_compute::TensorInfo;
30 using arm_compute::TensorShape;
31 using arm_compute::graph::Graph;
32 using arm_compute::graph::TargetHint;
33 using arm_compute::graph::Tensor;
35 arm_compute::graph::Graph graph;
36 TargetHint target_hint = TargetHint::OPENCL;
40 << Tensor(TensorInfo(TensorShape(3U, 3U, 1U, 1U), 1, DataType::F32),
41 std::unique_ptr<InputAccessor>(new InputAccessor(autoinc)))
42 << arm_compute::graph::ConvolutionLayer(
43 3U, 3U, 1U, std::unique_ptr<WeightAccessor>(new WeightAccessor(autoinc)),
44 std::unique_ptr<BiasAccessor>(new BiasAccessor()),
45 arm_compute::PadStrideInfo(1, 1, 0, 0))
46 << Tensor(std::unique_ptr<OutputAccessor>(new OutputAccessor()));
50 std::string hello = "SoftMax Run OK";
52 return env->NewStringUTF(hello.c_str());