diff options
author | Alex Sakhartchouk <alexst@google.com> | 2012-03-28 14:18:15 -0700 |
---|---|---|
committer | Alex Sakhartchouk <alexst@google.com> | 2012-03-28 14:18:15 -0700 |
commit | b43a1e5ddf274eb5e01dc8e450bd15b640bebe9f (patch) | |
tree | bf9d1b5d92ef8f65afd8c51016a5da7130bc6d3e /libs/rs/tests | |
parent | f9c1f9935b349fe1a3f27be4462026dd212f8b78 (diff) | |
download | frameworks_base-b43a1e5ddf274eb5e01dc8e450bd15b640bebe9f.zip frameworks_base-b43a1e5ddf274eb5e01dc8e450bd15b640bebe9f.tar.gz frameworks_base-b43a1e5ddf274eb5e01dc8e450bd15b640bebe9f.tar.bz2 |
Moving libRS
Change-Id: I1e42204e862585b9c2f7818b615890c60f08faf6
Diffstat (limited to 'libs/rs/tests')
-rw-r--r-- | libs/rs/tests/Android.mk | 36 | ||||
-rw-r--r-- | libs/rs/tests/ScriptC_mono.cpp | 118 | ||||
-rw-r--r-- | libs/rs/tests/ScriptC_mono.h | 55 | ||||
-rw-r--r-- | libs/rs/tests/compute.cpp | 58 |
4 files changed, 0 insertions, 267 deletions
diff --git a/libs/rs/tests/Android.mk b/libs/rs/tests/Android.mk deleted file mode 100644 index 627ff72..0000000 --- a/libs/rs/tests/Android.mk +++ /dev/null @@ -1,36 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - compute.cpp \ - ScriptC_mono.cpp - -LOCAL_SHARED_LIBRARIES := \ - libRS \ - libz \ - libcutils \ - libutils \ - libEGL \ - libGLESv1_CM \ - libGLESv2 \ - libui \ - libbcc \ - libbcinfo \ - libgui - -LOCAL_MODULE:= rstest-compute - -LOCAL_MODULE_TAGS := tests - -intermediates := $(call intermediates-dir-for,STATIC_LIBRARIES,libRS,TARGET,) -librs_generated_headers := \ - $(intermediates)/rsgApiStructs.h \ - $(intermediates)/rsgApiFuncDecl.h -LOCAL_GENERATED_SOURCES := $(librs_generated_headers) - -LOCAL_C_INCLUDES += frameworks/base/libs/rs -LOCAL_C_INCLUDES += $(intermediates) - - -include $(BUILD_EXECUTABLE) - diff --git a/libs/rs/tests/ScriptC_mono.cpp b/libs/rs/tests/ScriptC_mono.cpp deleted file mode 100644 index a6c63a8..0000000 --- a/libs/rs/tests/ScriptC_mono.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -/* - * This file is auto-generated. DO NOT MODIFY! - * The source Renderscript file: mono.rs - */ - - -#include "ScriptC_mono.h" - -static const unsigned char __txt[] = { - 0xde,0xc0,0x17,0x0b,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0xd0,0x04,0x00,0x00, - 0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x42,0x43,0xc0,0xde,0x21,0x0c,0x00,0x00, - 0x31,0x01,0x00,0x00,0x01,0x10,0x00,0x00,0x12,0x00,0x00,0x00,0x07,0x81,0x23,0x91, - 0x41,0xc8,0x04,0x49,0x06,0x10,0x32,0x39,0x92,0x01,0x84,0x0c,0x25,0x05,0x08,0x19, - 0x1e,0x04,0x8b,0x62,0x80,0x14,0x45,0x02,0x42,0x92,0x0b,0x42,0xa4,0x10,0x32,0x14, - 0x38,0x08,0x18,0x49,0x0a,0x32,0x44,0x24,0x48,0x0a,0x90,0x21,0x23,0xc4,0x52,0x80, - 0x0c,0x19,0x21,0x72,0x24,0x07,0xc8,0x48,0x11,0x62,0xa8,0xa0,0xa8,0x40,0xc6,0xf0, - 0x01,0x00,0x00,0x00,0x49,0x18,0x00,0x00,0x08,0x00,0x00,0x00,0x0b,0x8c,0x00,0x04, - 0x41,0x10,0x04,0x09,0x01,0x04,0x41,0x10,0x04,0x89,0xff,0xff,0xff,0xff,0x1f,0xc0, - 0x60,0x81,0xf0,0xff,0xff,0xff,0xff,0x03,0x18,0x00,0x00,0x00,0x89,0x20,0x00,0x00, - 0x14,0x00,0x00,0x00,0x32,0x22,0x48,0x09,0x20,0x64,0x85,0x04,0x93,0x22,0xa4,0x84, - 0x04,0x93,0x22,0xe3,0x84,0xa1,0x90,0x14,0x12,0x4c,0x8a,0x8c,0x0b,0x84,0xa4,0x4c, - 0x10,0x54,0x73,0x04,0x60,0x40,0x60,0x06,0x80,0xc4,0x1c,0x01,0x42,0x64,0x04,0x60, - 0x18,0x81,0x20,0xe8,0x94,0xc1,0x20,0x44,0x69,0x18,0x81,0x10,0x8a,0xb0,0x0e,0xb1, - 0x61,0x84,0x41,0x28,0x83,0x70,0x8e,0x5e,0x11,0x8e,0xa3,0x38,0x10,0x30,0x8c,0x30, - 0x00,0x00,0x00,0x00,0x13,0xb0,0x70,0x90,0x87,0x76,0xb0,0x87,0x3b,0x68,0x03,0x77, - 0x78,0x07,0x77,0x28,0x87,0x36,0x60,0x87,0x74,0x70,0x87,0x7a,0xc0,0x87,0x36,0x38, - 0x07,0x77,0xa8,0x87,0x72,0x08,0x07,0x71,0x48,0x87,0x0d,0xf2,0x50,0x0e,0x6d,0x00, - 0x0f,0x7a,0x30,0x07,0x72,0xa0,0x07,0x73,0x20,0x07,0x7a,0x30,0x07,0x72,0xd0,0x06, - 0xe9,0x10,0x07,0x7a,0x80,0x07,0x7a,0x80,0x07,0x6d,0x90,0x0e,0x78,0xa0,0x07,0x78, - 0xa0,0x07,0x78,0xd0,0x06,0xe9,0x10,0x07,0x76,0xa0,0x07,0x71,0x60,0x07,0x7a,0x10, - 0x07,0x76,0xd0,0x06,0xe9,0x30,0x07,0x72,0xa0,0x07,0x73,0x20,0x07,0x7a,0x30,0x07, - 0x72,0xd0,0x06,0xe9,0x60,0x07,0x74,0xa0,0x07,0x76,0x40,0x07,0x7a,0x60,0x07,0x74, - 0xd0,0x06,0xe6,0x30,0x07,0x72,0xa0,0x07,0x73,0x20,0x07,0x7a,0x30,0x07,0x72,0xd0, - 0x06,0xe6,0x60,0x07,0x74,0xa0,0x07,0x76,0x40,0x07,0x7a,0x60,0x07,0x74,0xd0,0x06, - 0xf6,0x60,0x07,0x74,0xa0,0x07,0x76,0x40,0x07,0x7a,0x60,0x07,0x74,0xd0,0x06,0xf6, - 0x10,0x07,0x72,0x80,0x07,0x7a,0x60,0x07,0x74,0xa0,0x07,0x71,0x20,0x07,0x78,0xd0, - 0x06,0xe1,0x00,0x07,0x7a,0x00,0x07,0x7a,0x60,0x07,0x74,0xd0,0x06,0xee,0x30,0x07, - 0x72,0xd0,0x06,0xb3,0x60,0x07,0x74,0xa0,0xf3,0x40,0x86,0x04,0x32,0x42,0x44,0x04, - 0x60,0x20,0x30,0x77,0x81,0x59,0x0a,0x34,0x44,0x51,0x00,0x00,0x08,0x00,0x00,0x00, - 0x80,0x21,0x4a,0x03,0x04,0x00,0x00,0x00,0x00,0x00,0x0c,0x51,0x20,0x20,0x00,0x00, - 0x00,0x00,0x00,0x60,0x88,0x22,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x59,0x20,0x00, - 0x08,0x00,0x00,0x00,0x32,0x1e,0x98,0x10,0x19,0x11,0x4c,0x90,0x8c,0x09,0x26,0x47, - 0xc6,0x04,0x43,0x02,0x85,0x50,0x06,0x44,0x4a,0x80,0xc4,0x18,0x81,0xce,0x9a,0x73, - 0xfe,0x01,0x00,0x00,0x79,0x18,0x00,0x00,0x69,0x00,0x00,0x00,0x43,0x88,0x29,0x98, - 0x84,0x05,0x87,0x3d,0x94,0x83,0x3c,0xcc,0x43,0x3a,0xbc,0x83,0x3b,0x2c,0x08,0xe2, - 0x60,0x08,0x31,0x11,0x53,0xb1,0x20,0x52,0x87,0x70,0xb0,0x87,0x70,0xf8,0x05,0x78, - 0x08,0x87,0x71,0x58,0x87,0x70,0x38,0x87,0x72,0xf8,0x05,0x77,0x08,0x87,0x76,0x28, - 0x87,0x05,0x63,0x30,0x0e,0xef,0xd0,0x0e,0x6e,0x50,0x0e,0xf8,0x10,0x0e,0xed,0x00, - 0x0f,0xec,0x50,0x0e,0x6e,0x10,0x0e,0xee,0x40,0x0e,0xf2,0xf0,0x0e,0xe9,0x40,0x0e, - 0x6e,0x20,0x0f,0xf3,0xe0,0x06,0xe8,0x50,0x0e,0xec,0xc0,0x0e,0xef,0x30,0x0e,0xef, - 0xd0,0x0e,0xf0,0x50,0x0f,0xf4,0x50,0x0e,0x43,0x04,0x00,0x19,0x42,0x4c,0xc8,0x94, - 0x2c,0x20,0xce,0x21,0x15,0xdc,0x81,0x1e,0x16,0x04,0x75,0x30,0x84,0x98,0x96,0x49, - 0x58,0x60,0x8c,0x83,0x29,0xb0,0xc3,0x3b,0x84,0x03,0x3d,0x0c,0x21,0xa6,0x66,0x72, - 0x16,0x14,0xe7,0x20,0x0a,0xef,0xf0,0x0e,0xec,0xb0,0x40,0x88,0x83,0x38,0x18,0x22, - 0x4c,0xd0,0x02,0x42,0x1e,0xde,0xe1,0x1d,0xe8,0x61,0x88,0x30,0x49,0x0b,0x82,0x39, - 0x18,0x42,0x4c,0xd4,0x54,0x2d,0x78,0xde,0xa1,0x1d,0xdc,0x21,0x1d,0xe0,0xe1,0x1d, - 0xe8,0xa1,0x1c,0xdc,0x81,0x1e,0xc0,0x60,0x1c,0xd0,0x21,0x1c,0xe4,0x61,0x08,0x31, - 0x59,0x06,0xb0,0x20,0x9a,0x85,0x74,0x68,0x07,0x78,0x60,0x87,0x72,0x00,0x83,0x51, - 0x78,0x83,0x51,0x58,0x83,0x35,0x00,0x03,0x5a,0x10,0x85,0x50,0x08,0x85,0x11,0xc7, - 0x18,0xc0,0x83,0x3c,0x84,0xc3,0x39,0xb4,0x43,0x38,0x4c,0x11,0x80,0x61,0xc4,0x34, - 0x06,0xef,0x00,0x0f,0xf4,0x90,0x0e,0xed,0x90,0x0e,0xfa,0x10,0x0e,0xf4,0x90,0x0e, - 0xef,0xe0,0x0e,0xbf,0xc0,0x0e,0xe5,0x60,0x0f,0xe5,0xc0,0x0e,0x53,0x02,0x63,0x84, - 0x33,0x06,0xf2,0x30,0x0f,0xbf,0x50,0x0e,0xf8,0x00,0x0f,0xef,0x20,0x0f,0xf4,0xf0, - 0x0b,0xf6,0x10,0x0e,0xf2,0x30,0x65,0x38,0x14,0x66,0x04,0x34,0x06,0xf2,0x30,0x0f, - 0xbf,0xf0,0x0e,0xe2,0xa0,0x0e,0xe5,0x30,0x0e,0xf4,0xf0,0x0b,0xf3,0xc0,0x0e,0xef, - 0x40,0x0f,0xf3,0x30,0x05,0x18,0x71,0x8d,0x81,0x3c,0xcc,0xc3,0x2f,0x94,0x03,0x3e, - 0xc0,0xc3,0x3b,0xc8,0x03,0x3d,0xfc,0x82,0x39,0xbc,0x83,0x3c,0x94,0x43,0x38,0x8c, - 0x03,0x3a,0xfc,0x82,0x3b,0x84,0x43,0x3b,0x94,0xc3,0x94,0xe0,0x19,0x21,0x8d,0x81, - 0x3c,0xcc,0xc3,0x2f,0x94,0x03,0x3e,0xc0,0xc3,0x3b,0xc8,0x03,0x3d,0xfc,0x82,0x39, - 0xbc,0x83,0x3c,0x94,0x43,0x38,0x8c,0x03,0x3a,0x4c,0x09,0x22,0x00,0x00,0x00,0x00, - 0x79,0x18,0x00,0x00,0x0b,0x00,0x00,0x00,0x33,0x08,0x80,0x1c,0xc4,0xe1,0x1c,0x66, - 0x14,0x01,0x3d,0x88,0x43,0x38,0x84,0xc3,0x8c,0x42,0x80,0x07,0x79,0x78,0x07,0x73, - 0x98,0xb1,0x0c,0xe6,0x00,0x0f,0xe1,0x30,0x0e,0xe3,0x50,0x0f,0xf2,0x10,0x0e,0xe3, - 0x90,0x0f,0x00,0x00,0x71,0x20,0x00,0x00,0x13,0x00,0x00,0x00,0x06,0x40,0x18,0x62, - 0x33,0x99,0x40,0x61,0x6c,0x8e,0xb3,0xd8,0x00,0x11,0x39,0xce,0x64,0x04,0x51,0x24, - 0xb9,0xcd,0x03,0x08,0x0a,0xe7,0x2c,0x4e,0xc4,0xf3,0x3c,0x6f,0x05,0xcd,0x3f,0xdf, - 0x83,0x33,0x75,0xd5,0xfd,0x17,0xec,0x6f,0x01,0x86,0xf0,0x2d,0x0e,0x30,0x99,0x81, - 0xf6,0xcf,0xf5,0x1e,0x49,0x29,0x20,0x28,0x9c,0xb3,0x38,0x51,0xeb,0xf0,0x3c,0xcf, - 0x77,0xd5,0xfd,0x17,0x00,0x00,0x00,0x00,0x61,0x20,0x00,0x00,0x21,0x00,0x00,0x00, - 0x13,0x04,0x41,0x2c,0x10,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x04,0x46,0x00,0x68, - 0xcd,0x00,0x90,0x9b,0x01,0x18,0x6b,0x38,0xe9,0x52,0x4e,0x3f,0xb1,0x8d,0xd9,0xf8, - 0xab,0x4d,0x5f,0xf6,0x3d,0xa2,0x63,0x0d,0x40,0x20,0x8c,0x00,0x00,0x00,0x00,0x00, - 0xb4,0x8c,0x11,0x03,0x42,0x08,0x88,0x69,0x90,0x81,0x72,0xa2,0x11,0x83,0x42,0x08, - 0x8a,0x0a,0x9a,0x63,0x78,0xac,0x66,0x90,0xe1,0x7a,0xa4,0x11,0x03,0x42,0x08,0x0c, - 0x6c,0x30,0x82,0xc9,0x06,0x00,0xc3,0x81,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00, - 0xb6,0x40,0x54,0x3f,0xd2,0x18,0x43,0x51,0xfd,0x0e,0x35,0x01,0x01,0x31,0x00,0x00, - 0x03,0x00,0x00,0x00,0x5b,0x06,0x20,0x98,0xb6,0x0c,0x47,0x30,0x01,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -}; - -ScriptC_mono::ScriptC_mono(RenderScript *rs, const char *cacheDir, size_t cacheDirLength) : - ScriptC(rs, __txt, sizeof(__txt), "mono.rs", 4, cacheDir, cacheDirLength) { -} - -ScriptC_mono::~ScriptC_mono() { -} - -void ScriptC_mono::forEach_root(const Allocation *ain, const Allocation *aout) const { - forEach(0, ain, aout, NULL, 0); -} - diff --git a/libs/rs/tests/ScriptC_mono.h b/libs/rs/tests/ScriptC_mono.h deleted file mode 100644 index 69c41ac..0000000 --- a/libs/rs/tests/ScriptC_mono.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -/* - * This file is auto-generated. DO NOT MODIFY! - * The source Renderscript file: mono.rs - */ - - -#include "ScriptC.h" - -class ScriptC_mono : protected ScriptC { -private: - int32_t __gInt; - bool __gBool; -public: - ScriptC_mono(RenderScript *rs, const char *cacheDir, size_t cacheDirLength); - virtual ~ScriptC_mono(); - - void set_gInt(int32_t v) { - setVar(0, v); - __gInt = v; - } - int32_t get_gInt() const { - return __gInt; - } - - float get_cFloat() const { - return 1.2f; - } - - void set_gBool(bool v) { - setVar(2, v); - __gBool = v; - } - bool get_gBool() const { - return __gBool; - } - - void forEach_root(const Allocation *ain, const Allocation *aout) const; -}; diff --git a/libs/rs/tests/compute.cpp b/libs/rs/tests/compute.cpp deleted file mode 100644 index 42eaa52..0000000 --- a/libs/rs/tests/compute.cpp +++ /dev/null @@ -1,58 +0,0 @@ - -#include "RenderScript.h" -#include "Element.h" -#include "Type.h" -#include "Allocation.h" - -#include "ScriptC_mono.h" - -int main(int argc, char** argv) -{ - - RenderScript *rs = new RenderScript(); - printf("New RS %p\n", rs); - - bool r = rs->init(16); - printf("Init returned %i\n", r); - - const Element *e = Element::RGBA_8888(rs); - printf("Element %p\n", e); - - Type::Builder tb(rs, e); - tb.setX(128); - tb.setY(128); - const Type *t = tb.create(); - printf("Type %p\n", t); - - - Allocation *a1 = Allocation::createSized(rs, e, 1000); - printf("Allocation %p\n", a1); - - Allocation *ain = Allocation::createTyped(rs, t); - Allocation *aout = Allocation::createTyped(rs, t); - printf("Allocation %p %p\n", ain, aout); - - ScriptC_mono * sc = new ScriptC_mono(rs, NULL, 0); - printf("new script\n"); - - uint32_t *buf = new uint32_t[t->getCount()]; - for (uint32_t ct=0; ct < t->getCount(); ct++) { - buf[ct] = ct | (ct << 16); - } - //ain->copy1DRangeFrom(0, 128*128, (int32_t *)buf, 128*128*4); - ain->copy1DRangeFromUnchecked(0, t->getCount(), buf, t->getCount()*4); - - - - sc->forEach_root(ain, aout); - printf("for each done\n"); - - - printf("Deleting stuff\n"); - delete sc; - delete t; - delete a1; - delete e; - delete rs; - printf("Delete OK\n"); -} |