Saiba como desenvolver Apps para múltiplos sistemas operacionais e dispositivos móveis usando HTML5.
Com uma única base de código em HTML5, você pode gerar apps nativos para iOS, Android, Windows 8 e Windows Phone, Tizen e diversos outros sistemas operacionais móveis.
Usando o Intel XDK e outras ferramentas gratuitas da Intel, você consegue aprender rapidamente tudo o que precisa para iniciar o desenvolvimento de apps ainda hoje.
O Android NDK é a ferramenta que permite a utilização de código nativo (C/C++) em sua aplicação Android. Nesta apresentação conheça alguns usos interessantes do NDK, as vantagens e desvantagens de utilizá-lo, além de como começar a usar esta ferramenta com o Android Studio.
Saiba como desenvolver Apps para múltiplos sistemas operacionais e dispositivos móveis usando HTML5.
Com uma única base de código em HTML5, você pode gerar apps nativos para iOS, Android, Windows 8 e Windows Phone, Tizen e diversos outros sistemas operacionais móveis.
Usando o Intel XDK e outras ferramentas gratuitas da Intel, você consegue aprender rapidamente tudo o que precisa para iniciar o desenvolvimento de apps ainda hoje.
O Android NDK é a ferramenta que permite a utilização de código nativo (C/C++) em sua aplicação Android. Nesta apresentação conheça alguns usos interessantes do NDK, as vantagens e desvantagens de utilizá-lo, além de como começar a usar esta ferramenta com o Android Studio.
Getting Started with IntelliJ IDEA as an Eclipse UserZeroTurnaround
**Note: This is a sneak preview of the full report, which you can get on RebelLabs: http://zeroturnaround.com/rebellabs/getting-started-with-intellij-idea-as-an-eclipse-user/
---
My name is Anton, and I’m an IntelliJ IDEA addict. Whew, it feels good to say it out loud. The choice of IDE for developers is one of the most contentious debates in the software game. But why? After all, aren’t all IDEs more or less the same?
Perhaps you are Eclipse users who are interested in trying out IntelliJ IDEA, or perhaps considering the migration. Moving from Eclipse to IDEA can be quite overwhelming. My main purpose in writing this report is to show Eclipse users, specifically, how to get started using IDEA faster and with less headaches.
For the full report, check it out on RebelLabs:
http://zeroturnaround.com/rebellabs/getting-started-with-intellij-idea-as-an-eclipse-user/
Slides from a quick and dirty presentation I gave to colleagues on Continuous Integration, Unit / Spec testing, etc.
CREDIT: this is very much in the Zach Holman school of presentation. I borrowed a lot of inspiration (and some colors/fonts) from his designs. Attribution was given.
Optimization Deep Dive: Unreal Engine 4 on IntelIntel® Software
This talk covers the work Intel and Epic Games have done together to enable improved performance of UE4 on Intel platforms, including DirectX 12 and Android. Many techniques presented are general and apply to all games and engines.
Desenvolvimento de Aplicativo Multiplataforma com Intel® XDKEvandro Paes
O objetivo da apresentação é mostrar como desenvolver de forma fácil e rápida aplicativos móveis híbridos com a ferramenta Intel XDK. Abordarei sobre aplicativos híbridos, framewroks de desenvolvimento mobile, sobre a ferramenta e suas funcionalidades, além da demonstração de um aplicativo.
At only 499$, Recon Jet is a proven smartglasses solution which is easy to find in retail worldwide. Its OS, based on Android AOSP, is easy to develop for and this deck gives you all the keys to do it!
Mastering the NDK with Android Studio 2.0 and the gradle-experimental pluginXavier Hallade
Android Studio is finally fully supporting the NDK so you can easily integrate C/C++ inside Android applications.
While this support is still experimental, it’s promising and worth already doing the final jump from other IDEs and build systems.
After a short introduction on what is the NDK, learn how to use it from Android Studio while avoiding several classic pitfalls.
Apresentação do Intel Perceptual Computing SDK, que permite que os desenvolvedores criar aplicações que percebam as ações do usuário e proporcionem interfaces naturais, intuitivas e imersivas
Getting Started with IntelliJ IDEA as an Eclipse UserZeroTurnaround
**Note: This is a sneak preview of the full report, which you can get on RebelLabs: http://zeroturnaround.com/rebellabs/getting-started-with-intellij-idea-as-an-eclipse-user/
---
My name is Anton, and I’m an IntelliJ IDEA addict. Whew, it feels good to say it out loud. The choice of IDE for developers is one of the most contentious debates in the software game. But why? After all, aren’t all IDEs more or less the same?
Perhaps you are Eclipse users who are interested in trying out IntelliJ IDEA, or perhaps considering the migration. Moving from Eclipse to IDEA can be quite overwhelming. My main purpose in writing this report is to show Eclipse users, specifically, how to get started using IDEA faster and with less headaches.
For the full report, check it out on RebelLabs:
http://zeroturnaround.com/rebellabs/getting-started-with-intellij-idea-as-an-eclipse-user/
Slides from a quick and dirty presentation I gave to colleagues on Continuous Integration, Unit / Spec testing, etc.
CREDIT: this is very much in the Zach Holman school of presentation. I borrowed a lot of inspiration (and some colors/fonts) from his designs. Attribution was given.
Optimization Deep Dive: Unreal Engine 4 on IntelIntel® Software
This talk covers the work Intel and Epic Games have done together to enable improved performance of UE4 on Intel platforms, including DirectX 12 and Android. Many techniques presented are general and apply to all games and engines.
Desenvolvimento de Aplicativo Multiplataforma com Intel® XDKEvandro Paes
O objetivo da apresentação é mostrar como desenvolver de forma fácil e rápida aplicativos móveis híbridos com a ferramenta Intel XDK. Abordarei sobre aplicativos híbridos, framewroks de desenvolvimento mobile, sobre a ferramenta e suas funcionalidades, além da demonstração de um aplicativo.
At only 499$, Recon Jet is a proven smartglasses solution which is easy to find in retail worldwide. Its OS, based on Android AOSP, is easy to develop for and this deck gives you all the keys to do it!
Mastering the NDK with Android Studio 2.0 and the gradle-experimental pluginXavier Hallade
Android Studio is finally fully supporting the NDK so you can easily integrate C/C++ inside Android applications.
While this support is still experimental, it’s promising and worth already doing the final jump from other IDEs and build systems.
After a short introduction on what is the NDK, learn how to use it from Android Studio while avoiding several classic pitfalls.
Apresentação do Intel Perceptual Computing SDK, que permite que os desenvolvedores criar aplicações que percebam as ações do usuário e proporcionem interfaces naturais, intuitivas e imersivas
As restrições das plataformas móveis, a concorrência e a facilidade dos usuários em recomendar ou criticar as aplicações tornaram o desafio dos desenvolvedores muito maior nas lojas de aplicativos. Além das preocupações com arquitetura e um bom plano de testes, as restrições de bateria e desempenho menor que as plataformas tradicionas exigem mais criatividade para encontrar o melhor balanço entre responsividade e consumo de energia. Nosso foco será apresentar um guia prático de como criar software eficiente no uso de energia, discutir quando precisamos lidar com o balanço entre resposta ao usuário e uso de energia visitando as principais ferramentas que auxiliam o desenvolvedor a melhorar o uso de energia e a responsividade de sua aplicação. Venha conhecer o trabalho que a Intel Software está fazendo no ecossitema Android que beneficia o desenvolvimento para todos dispositivos.
The Android NDK is a set of tools that allows the integration of native code (C/C++) in your Android app. In this presentation get know interesting usages of NDK, advantages and disadvantages, and how to stat using it with Android Studio.
Bring Intelligence to the Edge with Intel® Movidius™ Neural Compute StickDESMOND YUEN
Motiviation to move intelligence to the edge
Edge compute use cases
Barriers to moving intelligence to the edge
Deep learning algorithms – can they run on an edge device?
Movidius Neural Compute Stick (arch,usage, etc)
Deploying Image Classifiers on Intel® Movidius™ Neural Compute StickIntel® Software
In this webinar, Ashwin Vijayakumar will walk through the process of profiling pre-trained neural networks designed for image classification, identify a good balance between accuracy and real-time performance, and write a simple Python* script to deploy these classifiers on the Intel® Movidius™ Neural Compute Stick.
Preparing the Data Center for the Internet of ThingsIntel IoT
Intel’s Mark Skarpness provides an overview of the Internet of Things and discusses how the data center is essential for the IoT.
For more information go to www.intel.com/iot
BigDL: A Distributed Deep Learning Library on Spark: Spark Summit East talk b...Spark Summit
BigDL is a distributed deep Learning framework built for Big Data platform using Apache Spark. It combines the benefits of “high performance computing” and “Big Data” architecture, providing native support for deep learning functionalities in Spark, orders of magnitude speedup than out-of-box open source DL frameworks (e.g., Caffe/Torch) wrt single node performance (by leveraging Intel MKL), and the scale-out of deep learning workloads based on the Spark architecture. We’ll also share how our users adopt BigDL for their deep learning applications (such as image recognition, object detection, NLP, etc.), which allows them to use their Big Data (e.g., Apache Hadoop and Spark) platform as the unified data analytics platform for data storage, data processing and mining, feature engineering, traditional (non-deep) machine learning, and deep learning workloads.
Esta palestra tem como objetivo demonstrar ao desenvolvedor, de forma prática, como a modernização de código traz um ganho de desempenho considerável explorando diferentes níveis de paralelismo (vetorização e multithreading) disponíveis nas arquiteturas multi-core (processadores Core™ e Xeon®) e many-core (co-processador Xeon Phi™). De forma breve, também será abordado nesta palestra temas como “Visão da Intel para computação Exascale” e iniciativas da Intel® em HPC no Brasil.
Conheça as novidades que o KitKat trouxe relacionadas a economia, como isso pode afetar sua aplicação e como você pode ajudar o Android a gastar menos energia
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIVladimir Iglovikov, Ph.D.
Presented by Vladimir Iglovikov:
- https://www.linkedin.com/in/iglovikov/
- https://x.com/viglovikov
- https://www.instagram.com/ternaus/
This presentation delves into the journey of Albumentations.ai, a highly successful open-source library for data augmentation.
Created out of a necessity for superior performance in Kaggle competitions, Albumentations has grown to become a widely used tool among data scientists and machine learning practitioners.
This case study covers various aspects, including:
People: The contributors and community that have supported Albumentations.
Metrics: The success indicators such as downloads, daily active users, GitHub stars, and financial contributions.
Challenges: The hurdles in monetizing open-source projects and measuring user engagement.
Development Practices: Best practices for creating, maintaining, and scaling open-source libraries, including code hygiene, CI/CD, and fast iteration.
Community Building: Strategies for making adoption easy, iterating quickly, and fostering a vibrant, engaged community.
Marketing: Both online and offline marketing tactics, focusing on real, impactful interactions and collaborations.
Mental Health: Maintaining balance and not feeling pressured by user demands.
Key insights include the importance of automation, making the adoption process seamless, and leveraging offline interactions for marketing. The presentation also emphasizes the need for continuous small improvements and building a friendly, inclusive community that contributes to the project's growth.
Vladimir Iglovikov brings his extensive experience as a Kaggle Grandmaster, ex-Staff ML Engineer at Lyft, sharing valuable lessons and practical advice for anyone looking to enhance the adoption of their open-source projects.
Explore more about Albumentations and join the community at:
GitHub: https://github.com/albumentations-team/albumentations
Website: https://albumentations.ai/
LinkedIn: https://www.linkedin.com/company/100504475
Twitter: https://x.com/albumentations
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!SOFTTECHHUB
As the digital landscape continually evolves, operating systems play a critical role in shaping user experiences and productivity. The launch of Nitrux Linux 3.5.0 marks a significant milestone, offering a robust alternative to traditional systems such as Windows 11. This article delves into the essence of Nitrux Linux 3.5.0, exploring its unique features, advantages, and how it stands as a compelling choice for both casual users and tech enthusiasts.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofsAlex Pruden
This paper presents Reef, a system for generating publicly verifiable succinct non-interactive zero-knowledge proofs that a committed document matches or does not match a regular expression. We describe applications such as proving the strength of passwords, the provenance of email despite redactions, the validity of oblivious DNS queries, and the existence of mutations in DNA. Reef supports the Perl Compatible Regular Expression syntax, including wildcards, alternation, ranges, capture groups, Kleene star, negations, and lookarounds. Reef introduces a new type of automata, Skipping Alternating Finite Automata (SAFA), that skips irrelevant parts of a document when producing proofs without undermining soundness, and instantiates SAFA with a lookup argument. Our experimental evaluation confirms that Reef can generate proofs for documents with 32M characters; the proofs are small and cheap to verify (under a second).
Paper: https://eprint.iacr.org/2023/1886
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
4. Apps
Home
Application
Framework
User
Experience
Apps
As Engrenagens do Robô
Contacts
Phone
Browser
Activity Manager
Windows*
Manager
Content Providers
View System
Package Manager
Telephony
Manager
Resource
Manager
Location Manager
Libraries
…
Notification Manager
Android* Runtime
Surface Manager
Media
Framework
SQLite
OpenGL* ES
FreeType
WebKit
SGL
Middleware
…
SSL
libc
Core Libraries
Dalvik Virtual Machine
…
Operating
System
Linux* Kernel
4
Display Driver
Camera Driver
Flash Memory
Driver
Binder (IPC) Driver
Keypad Driver
WiFi Driver
Audio Drivers
Power Management
5. Nativo VS. Dalvik*
• O que é uma aplicação
Android* nativa?
• O que a Intel já faz
por você?
Android Runtime
Dalvik Virtual
Machine
Core Libraries
5
6. Por quê utilizar código nativo?
Performance
Jogos
Processamento Gráfico
Criptografia
Algoritmos de baixo nível
Acesso direto à CPU, GPU e outros recursos de
HW
• Reuso de código
• E por que não utilizar?
•
•
•
•
•
•
• Performance
• Complexidade
6
8. Android* Native Development Kit (NDK)
• O que é?
• Conjunto de ferramentas que permitem a implementação
de partes da aplicação Android utilizando código nativo
em linguagens como C ou C++.
• A interação entre o código nativo e a app Android é feita
utilizando Java Native Interface (JNI).
9. Java Native Interface (JNI)
• O que é?
• Interface padrão de programação para interoperabilidade entre
bibliotecas nativas de uma plataforma e a máquina virtual
Java.
• Quando usar?
• Acessar funcionalidades dependentes de plataforma não
providas pela API padrão do Java.
• Re-uso de código.
• Porções de código que precisam de tuning de performance.
9
10. Fluxo de Desenvolvimento com NDK
C/C++
Code
ndkbuild
Makefile
Java*
calls
GDB
debug
JNI
APP_ABI := all
or APP_ABI := x86
Android* ApplicationsJava Application
SDK APIs
Java Framework
JNI
Native Libs
Bionic C Library
10
NDK APIs
11. Conheça os limites: A Bionic C
• Biblioteca C otimizada para a plataforma
Android.
• Mais leve que a GNU C.
• Não segue o padrão POSIX.
• Suporte limitado à pthreads.
• Acesso às propriedades do Android
12
13. Instalando o Android* NDK
• Baixe o SDK:
http://developer.android.com/too
ls/sdk/ndk
• Baixe o Intel Beacon Mountain:
http://software.intel.com/enus/vcsource/tools/beaconmountai
n
• Integre com o ADT e o
CDT no Eclipse*
17. Hello NDK!
• Agora que temos um projeto pronto para
utilizar código nativo. Qual o próximo
passo?
• Como integrar o código Java com o C++?
19
18. Integrando Funções Nativas com Java
• Declarar métodos nativos em Java:
• public native String getHelloMessage();
• A aplicação Java deve carregar a biblioteca
antes de utilizá-la:
• System.loadLibrary("HelloNDK");
• Implementar em sua biblioteca nativa os
métodos a serem utilizados pela aplicação
• Os pontos de entrada da biblioteca podem ser criados de duas
formas: com a ferramenta Javah ou as registrando na função
JNI_onLoad na biblioteca.
20
19. Javah
• Gera os “header stubs” apropriados para
JNI à partir das classes Java já compiladas.
• Example:
> javah –d jni –classpath bin/classes
com.example.hellojni.HelloJni
• Gera o arquivo: com_example_hellojni_HelloJni.h
• Com a definição: JNIEXPORT jstring JNICALL
Java_com_example_hellojni_HelloJni_stringFromJNI(JN
IEnv *, jobject);
21
21. JNI_onLoad
• Registro das funções JNI no carregamento
da biblioteca.
• Utilizado nos módulos nativos do AOSP.
• Sujeito a menos erros durante refatoração.
• Melhor local para lidar com o caching de
referências à objetos Java.
23
22. JNI_onLoad
• Declare a função C++ em sua lib:
jstring stringFromJNI(JNIEnv* env, jobject thiz)
{
return env->NewStringUTF("Hello from JNI !");
}
• Crie o mapeamento de funções expostas:
static JNINativeMethod exposedMethods[] = {
{"stringFromJNI","()Ljava/lang/String;",(void*)stringFromJNI},}
• Utilize a ferramenta javap para obter a assinatura dos
métodos nativos:
javap -s -classpath binclasses -p com.example.hellojni.HelloJni
-> Signature: ()Ljava/lang/String;
24
24. Estamos prontos? Não!
• Utilizar o arquivo Application.mk para descrever
sua app:
•
•
•
•
Diretório: jni
Descrever os módulos necessários
Arquiteturas suportadas: ABI
Arquivo opcional mas importante para garantir que seus
módulos nativos sejam compilados para diversas plataformas.
APP_ABI := armeabi armeabi-v7a x86
Ou
APP_ABI := all
26
25. Build it!
• Utilizando Eclipse*
• Com a integração ADT e NDK no Eclipse* basta compilar a app
para gerar as bibliotecas e empacotar seu apk.
• Hardcore Mode
• Utilizar o script ndk_build para gerar os módulos.
• No diretório raíz de sua app execute:
• $NDK/ndk_build
27
30. Legal Disclaimer
• Roadmap Notice: All products, computer systems, dates and figures specified are preliminary based on current
expectations, and are subject to change without notice.
• Intel® Virtualization Technology (Intel® VT) requires a computer system with an enabled Intel® processor, BIOS, and
virtual machine monitor (VMM). Functionality, performance or other benefits will vary depending on hardware and
software configurations. Software applications may not be compatible with all operating systems. Consult your PC
manufacturer. For more information, visit http://www.intel.com/go/virtualization.
• Software Source Code Disclaimer: Any software source code reprinted in this document is furnished under a software
license and may only be used or copied in accordance with the terms of that license.
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 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.
33
31. Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for
optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3,
and SSE3 instruction sets and other optimizations. Intel does not guarantee the availability,
functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel.
Microprocessor-dependent optimizations in this product are intended for use with Intel
microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel
microprocessors. Please refer to the applicable product User and Reference Guides for more
information regarding the specific instruction sets covered by this notice.
Notice revision #20110804
34
32. Risk Factors
The above statements and any others in this document that refer to plans and expectations for the third quarter, the year and the future are forward-looking
statements that involve a number of risks and uncertainties. Words such as “anticipates,” “expects,” “intends,” “plans,” “believes,” “seeks,” “estimates,” “may,”
“will,” “should” and their variations identify forward-looking statements. Statements that refer to or are based on projections, uncertain events or assumptions
also identify forward-looking statements. Many factors could affect Intel’s actual results, and variances from Intel’s current expectations regarding such factors
could cause actual results to differ materially from those expressed in these forward-looking statements. Intel presently considers the following to be the
important factors that could cause actual results to differ materially from the company’s expectations. Demand could be different from Intel's expectations due to
factors including changes in business and economic conditions; customer acceptance of Intel’s and competitors’ products; supply constraints and other disruptions
affecting customers; changes in customer order patterns including order cancellations; and changes in the level of inventory at customers. Uncertainty in global
economic and financial conditions poses a risk that consumers and businesses may defer purchases in response to negative financial events, which could
negatively affect product demand and other related matters. Intel operates in intensely competitive industries that are characterized by a high percentage of
costs that are fixed or difficult to reduce in the short term and product demand that is highly variable and difficult to forecast. Revenue and the gross margin
percentage are affected by the timing of Intel product introductions and the demand for and market acceptance of Intel's products; actions taken by Intel's
competitors, including product offerings and introductions, marketing programs and pricing pressures and Intel’s response to such actions; and Intel’s ability to
respond quickly to technological developments and to incorporate new features into its products. The gross margin percentage could vary significantly from
expectations based on capacity utilization; variations in inventory valuation, including variations related to the timing of qualifying products for sale; changes in
revenue levels; segment product mix; the timing and execution of the manufacturing ramp and associated costs; start-up costs; excess or obsolete inventory;
changes in unit costs; defects or disruptions in the supply of materials or resources; product manufacturing quality/yields; and impairments of long-lived assets,
including manufacturing, assembly/test and intangible assets. Intel's results could be affected by adverse economic, social, political and physical/infrastructure
conditions in countries where Intel, its customers or its suppliers operate, including military conflict and other security risks, natural disasters, infrastructure
disruptions, health concerns and fluctuations in currency exchange rates. Expenses, particularly certain marketing and compensation expenses, as well as
restructuring and asset impairment charges, vary depending on the level of demand for Intel's products and the level of revenue and profits. Intel’s results could
be affected by the timing of closing of acquisitions and divestitures. Intel's results could be affected by adverse effects associated with product defects and errata
(deviations from published specifications), and by litigation or regulatory matters involving intellectual property, stockholder, consumer, antitrust, disclosure and
other issues, such as the litigation and regulatory matters described in Intel's SEC reports. An unfavorable ruling could include monetary damages or an injunction
prohibiting Intel from manufacturing or selling one or more products, precluding particular business practices, impacting Intel’s ability to design its products, or
requiring other remedies such as compulsory licensing of intellectual property. A detailed discussion of these and other factors that could affect Intel’s results is
included in Intel’s SEC filings, including the company’s most recent reports on Form 10-Q, Form 10-K and earnings release.
35
36. Memory handling of Java objects
• Memory handling of Java objects is done by
the JVM:
• You only deal with references to these
objects.
• Each time you get a reference, you must not
forget to delete it after use so the JVM can
free it later
• local references are automatically freed when
the native call returns to Java
• Global references are only created by
NewGlobalRef()
37. Creating a Java string
C:
jstring string =
(*env)->NewStringUTF(env, "new Java String");
C++:
jstring string = env->NewStringUTF("new Java String");
Main difference with compiling JNI code in C and in C++ is the nature of env as you can see
it here.
Remember that otherwise, the API is the same.
38. Getting a C/C++ string from Java
string
const char *nativeString = (*env)>GetStringUTFChars(javaString, null);
…
(*env)->ReleaseStringUTFChars(env, javaString,
nativeString);
//more secure and efficient:
int tmpjstrlen = env->GetStringUTFLength(tmpjstr);
char* fname = new char[tmpjstrlen + 1];
env->GetStringUTFRegion(tmpjstr, 0, tmpjstrlen, fname);
fname[tmpjstrlen] = 0;
…
delete fname;
39. Handling Java exceptions
// call to java methods may throw Java exceptions
jthrowable ex = (*env)->ExceptionOccurred(env);
if (ex!=NULL) {
(*env)->ExceptionClear(env);
// deal with exception
}
(*env)->DeleteLocalRef(env, ex);
40. Calling Java methods
On an object instance:
jclass clazz = (*env)->GetObjectClass(env, obj);
jmethodID mid = (*env)->GetMethodID(env, clazz,
"methodName", "(…)…");
if (mid != NULL)
(*env)->Call<Type>Method(env, obj, mid, parameters…);
Static call:
jclass clazz = (*env)->FindClass(env, "java/lang/String");
jmethodID mid = (*env)->GetStaticMethodID(env, clazz,
"methodName", "(…)…");
if (mid != NULL)
(*env)->CallStatic<Type>Method(env, clazz, mid,
parameters…);
• (…)…: method signature
• parameters: list of parameters expected by the Java method
• <Type>: Java method return type
41. Throwing Java exceptions
jclass clazz =
(*env->FindClass(env, "java/lang/Exception");
if (clazz!=NULL)
(*env)->ThrowNew(env, clazz, "Message");
The exception will be thrown only when the JNI call returns to Java, it will not break
the current native code execution.
43. Debugging with GDB and Eclipse
• Native support must be added to your project
• Pass NDK_DEBUG=1 to the ndk-build command, from the
project properties:
NDK_DEBUG flag is supposed to be automatically set for a debug
build, but this is not currently the case.
44. Debugging with GDB and Eclipse*
• When NDK_DEBUG=1 is specified, a
“gdbserver” file is added to your libraries
45. Debugging with GDB and Eclipse*
• Debug your project as a native Android*
application:
46. Debugging with GDB and Eclipse
• From Eclipse “Debug” perspective, you can manipulate
breakpoints and debug your project
• Your application will run before the debugger is
attached, hence breakpoints you set near application
launch will be ignored
Editor's Notes
Reuso de códigolegadoounão.
http://docs.oracle.com/javase/6/docs/technotes/guides/jni/http://docs.oracle.com/javase/6/docs/technotes/guides/jni/spec/intro.htmlSuacriaçãofoifeitaparaunificar a forma de fornecercódigonativopara a JVM, desta forma:Vendors de diferentes JVMs e criadores de ferramentasnãoprecisariammais se preocupar com a implementação de diferentes interfaces;Desenvolvedorespoderiamcriarumaversão de seucódigonativo e elefuncionariajunto com diferentes VMsNo final substituipadrões de interfaceamentocomo o Netscape JRI, Microsoft RNI e o COM.O que é possívelfazer com jni:Criar, inspecionar e atualizarobjetos JavaChamarmétodos JavaPegar e lançarexceçõesCarregar classes e obtersuasinformaçõesEfetuarverificação de tiposdurante a execução
Default system STL support: cassertcctypecerrnocfloatclimitscmathcsetjmpcsignalcstddefcstdintcstdiocstdlibcstringctimecwchar new stl_pair.htypeinfo utilityAnything else is _not_ supported, including std::string or std::vector.Static linking is only supported if the application has only one native moduleDon’t forget to load the used library before yours (ieSystem.loadLibrary("stlport_shared"); )LOCAL_CPPFLAGS := -frtti –fexceptions also works, but LOCAL_CPP_FEATURES is a cleaner way to declare it.Source:ndk\docs\CPLUSPLUS-SUPPORT.html
Com um projeto Android jácriado é possíveladicionarsuporte àumabibliotecanativautilizando o próprio Eclipse*
Credit: TodorMinchevSystem.loadLibrary() will automatically translate MyLib to libMyLib.soThat’s better than using System.load() that takes the path to the .so file.IDZ:To use native c/c++ code in our java source file, we first need to declare JNI call and load the native library.This is a very simple case for declaring and using JNI native calls in Android* App Java sources. Next, there is two solutions: use “javah” tool to generate the JNI header stubs for native code, and add or modify native code to comply with JNI native headers, or load C++ library and map native calls during class load.
Proven method: That’s how native code is integrated in AOSP itself : http://code.metager.de/source/xref/android/4.0.3/frameworks-base/services/jni/You get all the native methods registration issues during the load of the library instead of during further function callsYou get rid of functions with a lengthy name that will break when refactoring other parts of the codeYou can add/remove native functions easily (you don’t need to write error prone names by hand or re-run javah and copy/paste parts of it)There is no more potential issue with symbol table (really useful when you want to mix C/C++ code)It is also the best spot to cache Java class/objects references
Javap => Java Class File Disassembler (http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javap.html)Here it is in C++ as this method is the most useful for C++ code.You’ll see on a following slide the only difference between C and C++ JNI codes.Java VM’s representation of type signatures:http://docs.oracle.com/javase/6/docs/technotes/guides/jni/spec/types.html#wp16432Complete output of javap:C:\Users\xhallade\workspace\HelloJni>javap -s -classpath bin\classes -p com.example.hellojni.HelloJniCompiled from "HelloJni.java"public class com.example.hellojni.HelloJni extends android.app.Activity{static {}; Signature: ()Vpublic com.example.hellojni.HelloJni(); Signature: ()Vpublic void onCreate(android.os.Bundle); Signature: (Landroid/os/Bundle;)Vpublic native java.lang.StringstringFromJNI(); Signature: ()Ljava/lang/String;public native java.lang.StringunimplementedStringFromJNI(); Signature: ()Ljava/lang/String;}
Add this function to your library. It will be the entry point called during load of your library and it is doing the mapping previously defined.It’s also a good place to get the reference to the JavaVM and other objects (like the main activity) to cache them.Source: developer.android.com and marakana android NDK series
ABI = Android Binary Interfaceadb shell getprop | grepabi
Se vocêchegouatéaquiparabéns! Agora sua app estáredonda e vocêpodedistribuir. Será?E quandoos bugs aparecemcomodebugarseusmódulosnativos?
You may be limited to 16 local references within your JNI environment, so don’t forget to call DeleteLocalRef() after use.
Don’t count on these automatically frees too much
Previous call for creating a String may return a null object, then it’s likely that an exception has occured.Here is the way to get that exception.
You CANNOT do everything in C/C++, only a restricted amount of libraries are exposed in C.Calling Java methods from C/C++ is something you may have to do extensively.Java VM’s representation of type signatures:http://docs.oracle.com/javase/6/docs/technotes/guides/jni/spec/types.html#wp16432http://docs.oracle.com/javase/6/docs/technotes/guides/jni/spec/functions.html