-
Getting Started
-
FAQs
-
Getting Performance
-
Case Studies
-
Offload™ Library
-
C++ Language Extensions
-
Runtime API
-
Command Line Options
- -snvsips3
- -offloadshowptrcalls
- -nomemcpycacheflush
- -minmemcpysize=[n]
- -memcpydmasize=[n]
- -cachesets=[n]
- -warnonouterreadswrites
- -offloadshowptrcalls
- -BEspul[opt]
- -BEspuL[opt]
- -finline-limit=[n]
- -unroll-factor=[n]
- -outputoffloadcode
- -fno-access-control
- -O[n]
- -BEO[n]
- -BEspuopt:[opt]
- -showcallstackonduplerror
- -ignoretrapwordonspu
- -save-temps
- -ocdir [dir]
- -warnouterthiscalls
-
The liboffload header
-
Software caching library
-
Data locality library
-
Constructs library
-
PS3 SDK Function Overloads
-
Technical Information
-
Compiler Errors
- Summary
- Offload1101
- Offload3001
- Offload3005
- Offload3007
- Offload4000
- Offload4001
- Offload4002
- Offload4003
- Offload4105
- Offload4106
- Offload4107
- Offload2401
- Offload2400
- Offload2302
- Offload1108
- Offload1109
- Offload1115
- Offload1122
- Offload1201
- Offload1202
- Offload2000
- Offload2100
- Offload2200
- Offload2301
- Offload4108
-
Compiler Advice
-
Compiler Warnings
-
-
Features
-
Calling PPU functions from SPU
-
Accessing Global Variables
-
PPU virtual methods on SPU
-
Exploiting SPU Performance
-
Using Altivec Instrinsics
-
Using SPU Instrinsics
-
The Software Cache
-
Type Safe Pointers
-
VMX2SPU Engine
-
Compiler Advice
-
Implicit Function Duplication
-
Structure Type Duplication
-
Helpful command line options
-
Offload (SPU) Job functions
-
Core compiler features
-
Features
Core compiler features
__cp_typestringliteral
Intrinsic To Turn Types Into String Literals
This article was updated on 2012-01-12 13:06:38
As of release 2.5 (19th Dec 2011) the Offload™ C++ compiler provides the intrinsic __cp_typestringliteral(type) which returns the string literal of a type. This can be useful for example when debugging templated code, but also to determine the type of variables or typedefs whose declarations do not make it obvious what the actual type is (for example could be declared using another typedef or template).
#include <iostream>
template <class T> void f(T)
{
printf(\"The type is %s \\n\",__cp_typestringliteral(T));
}
template <class T> struct str {};
int main()
{
f(str<int>());
f([](){return str<double>();});
printf("std::cout is of type %s\n", __cp_typestringliteral(decltype(std::cout)) );
}
The above code prints:
The type is struct str<int >
The type is lambda<mainlambdatest2.cpp(13)>
std::cout is of type class std::basic_ostream<char ,std::char_traits<char > >

